Skip to content

Mobile

Mobile builds are intended to be installed on a user's mobile device. These builds are accessible from the home screen, and have access to native features.

Commoners relies on Capacitor to generate the necessary files for a mobile application. To enable this feature, simply add the --target mobile flag to your build command.

One peculiar aspect of Capacitor is that mobile builds require Capacitor plugins to be explicitly listed in your package.json file, even if installed in node_modules.

iOS

If you are building for iOS, you will need Xcode installed on your Mac.

Ruby

  1. Install Homebrew
  2. Install chruby and ruby-install (brew install chruby ruby-install)
  3. Install and activate a different version of Ruby (ruby-install ruby 3.3.0 and chruby 3.3.0)

Tested Ruby Versions

  • Ruby 3.3.0

Environment Configuration

An older version of CocoaPods may be required to build the project using Capacitor.

Try running the following command to install CocoaPods:

bash
sudo gem install cocoapods:1.10.2

Publishing to TestFlight

Publishing your application requires Apple Developer Program membership.

App Store Connect Integration

To interact with the App Store Connect API, you'll need to create an API key in the App Store Connect dashboard. This key will be used to authenticate with the API and upload your build.

  • Go to App Store Connect
  • Click on "Users and Access", "Integrations", then "App Store Connect API"
  • Click on the "+" button to create a new API key
  • Provide a name, then select "Developer" access.
  • You'll then need the Issuer ID and Key ID from the key you just created
  • Finally, download the API key and store it in a secure location

Before we begin, you'll need to collect a range of different environment variables. These include:

  1. APPLE_ID - Your Apple ID email address
  2. APPLE_TEAM_ID - Your Apple Developer Team ID (found in the Membership Details section of your account)
  3. APP_STORE_CONNECT_API_KEY_ISSUER_ID - The Issuer ID from the App Store Connect API key
  4. APP_STORE_CONNECT_API_KEY_ID - The Key ID from the App Store Connect API key
  5. APP_STORE_CONNECT_API_KEY_KEY - The contents of the App Store Connect API key, copied using openssl pkcs8 -nocrypt -in path/to/key.p8 | pbcopy
  6. APP_BUNDLE_IDENTIFIER - The bundle identifier of your app (e.g. com.example.app)
  7. APP_ID - The App ID of your app
  8. TEMP_KEYCHAIN_USER - The username for the temporary keychain
  9. TEMP_KEYCHAIN_PASSWORD - The password for the temporary keychain
  10. CERTIFICATE_STORE_REPO - The repository containing your certificates (from Fastlane Match)
  11. GIT_USERNAME - Your GitHub username
  12. GIT_TOKEN - A GitHub token with access to the repository containing your certificates
  13. APP_STORE_CONNECT_TEAM_ID - Your App Store Connect Team ID
  14. MATCH_PASSWORD - The password for your Fastlane Match

Manual Publishing

Coming soon...

Android

If you are building for Android, you will need to install the following dependencies:

Released under the MIT License.