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
- Install Homebrew
- Install
chruby
andruby-install
(brew install chruby ruby-install
) - Install and activate a different version of Ruby (
ruby-install ruby 3.3.0
andchruby 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:
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
andKey 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:
APPLE_ID
- Your Apple ID email addressAPPLE_TEAM_ID
- Your Apple Developer Team ID (found in the Membership Details section of your account)APP_STORE_CONNECT_API_KEY_ISSUER_ID
- TheIssuer ID
from the App Store Connect API keyAPP_STORE_CONNECT_API_KEY_ID
- TheKey ID
from the App Store Connect API keyAPP_STORE_CONNECT_API_KEY_KEY
- The contents of the App Store Connect API key, copied usingopenssl pkcs8 -nocrypt -in path/to/key.p8 | pbcopy
APP_BUNDLE_IDENTIFIER
- The bundle identifier of your app (e.g.com.example.app
)APP_ID
- The App ID of your appTEMP_KEYCHAIN_USER
- The username for the temporary keychainTEMP_KEYCHAIN_PASSWORD
- The password for the temporary keychainCERTIFICATE_STORE_REPO
- The repository containing your certificates (from Fastlane Match)GIT_USERNAME
- Your GitHub usernameGIT_TOKEN
- A GitHub token with access to the repository containing your certificatesAPP_STORE_CONNECT_TEAM_ID
- Your App Store Connect Team IDMATCH_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: