Skip to content

Commit

Permalink
Use bundle exec for pod install
Browse files Browse the repository at this point in the history
Should avoid churn in the Podfile.lock, and ensure consistent builds
across environments.

Added as an alias because it allows for more customization with flags in
the future (such as the flag for enabling the New Architecture:
https://reactnative.dev/docs/next/the-new-architecture/use-app-template#target-os)
  • Loading branch information
lindboe committed Jul 3, 2023
1 parent 3b68701 commit 9ac0500
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 5
command: cd ios && pod install
command: cd ios && bundle exec pod install

- name: Decrypt profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output chat_expensify_appstore.mobileprovision chat_expensify_appstore.mobileprovision.gpg
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 5
command: cd ios && pod install
command: cd ios && bundle exec pod install

- name: Decrypt profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output chat_expensify_adhoc.mobileprovision chat_expensify_adhoc.mobileprovision.gpg
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ In order to have more consistent builds, we use a strict `node` and `npm` versio
## Running the iOS app 📱
For an M1 Mac, read this [SO](https://stackoverflow.com/c/expensify/questions/11580) for installing cocoapods.

* To install the iOS dependencies, run: `npm install && cd ios/ && pod install && cd ..`
* Install project gems, including cocoapods, using bundler to ensure everyone uses the same versions. In the project root, run: `bundle install`
* If you get the error `Could not find 'bundler'`, install the bundler gem first: `gem install bundler` and try again.
* If you are using MacOS and get the error `Gem::FilePermissionError` when trying to install the bundler gem, you're likely using system Ruby, which requires administrator permission to modify. To get around this, install another version of Ruby with a version manager like [rbenv](https://github.com/rbenv/rbenv#installation).
* To install the iOS dependencies, run: `npm install && npm run pod-install`
* If you are an Expensify employee and want to point the emulator to your local VM, follow [this](https://stackoverflow.com/c/expensify/questions/7699)
* To run a on a **Development Simulator**: `npm run ios`
* Changes applied to Javascript will be applied automatically, any changes to native code will require a recompile
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1141,4 +1141,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76

COCOAPODS: 1.12.1
COCOAPODS: 1.11.3
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"clean": "npx react-native clean-project-auto",
"android": "scripts/set-pusher-suffix.sh && npx react-native run-android --port=8083",
"ios": "scripts/set-pusher-suffix.sh && npx react-native run-ios --port=8082",
"pod-install": "cd ios && bundle exec pod install",
"ipad": "concurrently \"npx react-native run-ios --port=8082 --simulator=\"iPad Pro (12.9-inch) (4th generation)\"\"",
"ipad-sm": "concurrently \"npx react-native run-ios --port=8082 --simulator=\"iPad Pro (9.7-inch)\"\"",
"start": "npx react-native start",
Expand Down

0 comments on commit 9ac0500

Please sign in to comment.