App for cataloguing trees planted and allowing the recorded trees to be uploaded via a custom API to a centralised database. Mainly used by people who plant trees so they don't have to manually type coordinates with pictures they took and then try to guess the site/species afterwards.
Tree Tracker
scheme will use the API settings you configure in your secrets file.We use Rollbar for centralised error tracking, to help us troubleshoot issues with the app during real world usage.
If you wish, you can sign up for a free Rollbar account, generate your own API token and provide it through ROLLBAR_AUTH_TOKEN
to see telemetry in Rollbar during development. This can be useful if you are specifically adding telemetry features, but otherwise is probably more complex than just looking at the logs in XCode console.
If you choose not to setup Rollbar, simply add a dummy value for ROLLBAR_AUTH_TOKEN
and any Rollbar calls will silently fail.
Now, to run the project, we'll need to generate the Secrets file. This means you need to first install pouch
(the easiest is using brew install sunshinejr/formulae/pouch
). Now, you need to have these environment variables available. It would be wise to prepare this file once and keep it somewhere obvious but take care not to check it in to Git. You can simply source
the file whenever you need to regenerate Secrets.
export AWS_BUCKET_NAME=
export AWS_BUCKET_REGION=
export AWS_BUCKET_PREFIX=
export AWS_ACCESS_KEY=
export AWS_SECRET_KEY=
export PROTECT_EARTH_API_TOKEN="n|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export PROTECT_EARTH_API_BASE_URL="api.endpoint.com"
export PROTECT_EARTH_ENV_NAME=Development
export ROLLBAR_AUTH_TOKEN=yourRollbarToken
In the root folder, run pouch
, which should generate a file at ./TreeTracker/Secrets.swift
.
With all that, you can switch the scheme to Tree Tracker
and it should run just fine.
Please feel free to create issues and PRs for anything, really. However, bear in mind that this app is created for specific audience so PRs with functionality that is out of scope might not be merged (if you feel like the PR you're working on is questionable, please feel free to reach out via Issues).