This repository contains the source code for the Mammoth app for iOS, iPadOS and MacOS, released under the GNU Affero General Public License.
Feel free to take a look around. We are not yet taking patches as we still have a little bit of tidying up to do. When we do, there will be a contributor license agreement. Also, over the next week or two we'll start having some simple "infrastructure" (think: discord channel, etc.). Stay tuned... Bear with us; it's launch week and weekend!
The Mammoth Team
We use Arkana to obfuscate API keys and secrets in Mammoth, which requires the following versions:
% git clone https://github.com/TheBLVD/mammoth.git
sample.env
to .env
:% cd mammoth
% cp sample.env .env
rbenv
if not already installed. See Installing rbenv
below for instructions.% rbenv install
% bundle install
ArkanaKeys
package for managing API keys and secrets. This step can be repeated as whenever you change your .env
file's contents:% bin/arkana
rbenv
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
% brew install rbenv ruby-build
rbenv
by installing it in your zsh profile, and reload the profile (this assumes you are using zsh
by default — if you aren't, please run rbenv init
instead and follow instructions):% echo "eval \"\$(rbenv init - zsh)\"" >> ~/.zshrc
% exec zsh
% rbenv install
ruby --version
:% ruby --version
ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin22]
brew install swiftlint
If you run bin/arkana
and see the following, it can't find a valid .env
file. Make sure you've copied the provided sample correctly and that it is in
the root of the repo.
If you see this in Xcode. Then Arkana has failed to generate the local
package. Verify you have a valid .env
and run bin/arkana
from the root of
the repo.
If you run bin/arkana
and see the following:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin22/rbconfig.rb:21: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
You must use Bundler 2 or greater with this lockfile.
Ruby 3 is required. Check your ruby version ruby --version
, and check Installing rbenv
above for instructions on installing a new version.
Steps to adding a new key/value to the project using Arkana. Upfront there are two options.
Global: same key/value for staging and production
Environment: one value for staging, and separate value for production. Both will reference the same key in the app
First Step Add your env name to .arkana.yml
either under 'global_secrets'
or 'environment_secrets'
Second Step Add the key/value pair to your local .env
file and key names to
sample.env
NOTE: for global keys, they are added to the top of the file just once like this:
#.env
...
ExampleSecretKey=2903847
If you're using 'environment_secrets' you'll need 2 key/value entries with appended 'Staging' & 'Production':
#.env
...
ExampleSecretKeyStaging=03948092348504
ExampleSecretKeyProduction=02398450349
bin/arkana
.
This embeds the env values in the Arkana swift package and the are now
available to call in your code like this///randomProjectFile.swift
/// env that is global
ArkanaKeys.Global().exampleSecretKey
/// env var for staging
ArkanaKeys.Staging().exampleSecretKey
If bin/arkan
throws an error, see troublshooting above ☝.
This repository contains the source code for the Mammoth app for iOS, iPadOS and MacOS, released under the GNU Affero General Public License.
See LICENSE for details.
All conversations in Issues will be licensed under CC-0. https://creativecommons.org/publicdomain/zero/1.0/
Unless otherwise noted, all files © 2023 The BLVD. All rights reserved.