After setting up your environment, you can follow the steps below to run the pass Culture mobile application on iOS.
If you encounter errors during this setup, refer to the Troubleshooting section at the end of this document.
-
install iOS dependencies
- Now you can install CocoaPods in the project
pass-culture-app-native
, that will install the gems, with:
bundle install
cd ios bundle exec pod install cd ..
you may be asked to run:
cd ios bundle exec pod repo update cd ..
- Now you can install CocoaPods in the project
If bundle exec pod install
didn't work, check in Xcode -> Settings -> Locations if you have a Command line tools installed, then revalidate the Command line tools by clicking it.
You will need to add the GoogleService-Info.plist
file in the ios
directory. You can get a copy of the testing configuration one through the password manager, or directly through the Firebase console inside Project Settings
.
In order to launch the app in the Simulator or on your external Apple device, you need to follow these steps:
-
Create an Apple Developer passCulture account
-
You need to install the version specified in
XCODE_SUPPORTED_VERSION
-
Install a simulator if not already in Xcode
-
Download the iOS certificates to your computer:
- Connect to the Apple Developer account with Xcode.
- Get invited to the Apple Developer group by an Admin.
- Download the private key via fastlane:
bundle exec fastlane ios download_certificates --env testing
- When required (multiple times), use the git ssh URL of the private certificates repository
- Get the
match repo passphrase
on Keeper in the "Tech" vault. - It might ask your session password twice to continue.
-
For Apple External Device
Connect your device to the computer and run:
yarn ios:testing --device
or use the Xcode interface. Choose a scheme (like testing), then a device and click the
Run
button in the toolbar. -
For Xcode Simulator
Run:
yarn ios:testing
or use the Xcode interface.
This will also start the metro server. If not, run in another tab:
yarn start
env: node: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code
If this error pops up while trying to build with Xcode it means that Xcode can’t find Node because the sym-link to Node is not made.
Run ln -s "\$(which node)" /usr/local/bin/node
If it says “File exists”, rm /usr/local/bin/node
and rerun the command above.
Drawback ❌: This sym-link will be obsolete as soon as the path of your node instance changes. To prevent this, you can command above to your .bashrc. Thus, the command will be run each time you open a new terminal
Add node with brew: brew install node
Drawback ❌: If you were using a node version manager (nvm, fnm, ...) you will now have two different node instances
❌ error: An organization slug is required (provide with --org)
This error means that the ~/.sentryclirc file has not been added correctly. Please run through this tutorial again
sentry reported an error: Invalid Token (http status: 401)
This error means that the sentry token you generated is invalid. Please run through this tutorial again and be careful with the scope permissions 😉
The application's Info.plist does not contain a valid CFBundleVersion
Make sure you installed jq so the CFBundleVersion can be automatically filled.
If it is installed but you still have the error, maybe Xcode doesn't find it: run which jq
. If it does NOT print /usr/local/bin/jq
, run ln -s (which jq) /usr/local/bin/jq
to create a sym-link that Xcode will find.
No binary rubies available for: osx/13.5/arm64/ruby-3.0.0. Continuing with compilation.
https://stackoverflow.com/questions/42735805/what-does-no-binary-rubies-available-mean
After the `bundle exec fastlane ios download_certificates --env testing` command, you gave the SSH git repository link and it's not doing anything.
It might be an issue with your ssh (for example if you only cloned the repository through http), try to clone the repository elsewhere using ssh and try again.`/.rvm/gems/ruby-2.7.5/gems/nap-1.1.0/lib/rest/error.rb:76:in 'require': cannot load such file -- openssl (LoadError)`
Try to change the openssl version you're on:openssl version
if it's not 1.1:
brew install [email protected]
brew unlink openssl@3
brew link [email protected]
check if the link worked:
brew link [email protected]