Skip to content

Repository files navigation

Requirements:
- xcode 15.4 (install through app store)
- node 22.13.0 (install through nvm)
- ruby 3.3.0 (install through rvm)
- openssl 1.1.1 [downgrading from openssl@3](rbenv/homebrew-tap#9 (comment))
- Apple Developer Account
- [App-Specific Password](https://support.apple.com/en-us/102654)
- Will need to create Test Group manually in App Store Connect
- Ensure all contracts are agreed to in App Store Connect: https://appstoreconnect.apple.com/agreements/
- Fastlane
- Match
- Both a release and development provisioning profile and certificate are needed via match (see match commands below)
- .env file at ./ios/fastlane/env.example

Overview:
- React Native for building the app
- Use Fastlane for building and deploying the app
- Use Match for code signing (belongs to guide below): https://docs.fastlane.tools/codesigning/getting-started/

Troubleshooting
- If building hangs, run the build in xcode for more info.
- If you get "too many open files" error, run `watchman` in the terminal.
- If you get "spaceship" error, ensure all contracts are agreed to in App Store Connect: https://appstoreconnect.apple.com/agreements/
- If fastlane beta fails, run `fastlane certificates` to ensure all certificates, provisioning profiles, and team are set up correctly. Then go into xcode and select the correct provisioning profile.
- If you get xcode errors similar to "No profile" or "Provisioning profile does not contain certificate," clear out provisioning profiles at ~/Library/MobileDevice/Provisioning\ Profiles, clear certs in the Keychain Acccess app, and then run $ fastlane match appstore
-  "Error: EMFILE: too many open files, watch", I THINK just run `watchman` in the terminal.
- Something with ruby being incompatible, could be due to having rvm and rbenv managing versions.
- "undefined method `unpack1' for nil". Need to clear cookies $ rm ~/.fastlane/spaceship/[your_apple_id]/cookie, and also maybe:
    Run $ bundle clean --force
    Delete your Gemfile.lock
    Run $ bundle install again
- Bundle version not incrementing.     upload_to_testflight(
      ipa: "./builds/ReactNativeMapleTemplate.ipa",
    )

[Running on ios device](https://reactnative.dev/docs/running-on-device)
- make sure development profile is setup correctly in xcode (run $ fastlane develop, then restart xcode)
- Build and Run via xcode
- $ npm start
- reload on device
- Enable fast refresh on device (shake device to open menu, then enable)

Match commands:
Only run init once
$ fastlane match init
$ fastlane match development
$ fastlane match appstore
$ fastlane certificates
$ fastlane pilot add email@example.com

## Other REQUIRED setups
#### This is due to new react native version
#### in ios folder
$ pod install --repo-update
- update xcode

Installation Commands:
# Run this if you get "too many open files" error upon npm start
$ watchman

# Install ruby 3.3.0
$ rvm install 3.3.0 --with-openssl-dir=$(brew --prefix openssl)

# Install gems
$ bundle install


## Running the app
$ watchman
$ npm start
# wait for metro bundler to start
$ i 


# XCode Notes
 - Must use ReactNativeMapleTemplate.xcworkspace for this project
 - $ xed ./ios/ReactNativeMapleTemplate.xcworkspace
    


## Dev Tools
- CMD + D: open dev menu
- CMD + I: open inspector
- CMD + R: reload app
- CMD + SHIFT + R: reload app (force)
- CMD + SHIFT + H: open home
- CMD + SHIFT + M: open menu
- CMD + SHIFT + T: open terminal
- CMD + SHIFT + Y: open debugger



# ios testflight deployment
Guide: https://thecodingmachine.github.io/react-native-boilerplate/docs/BetaBuild/
 - Appfile contains identifiers used to connect to the Developer Portal and App Store Connect. You can read more about this file here.
 - Fastfile contains the lanes used to build and deploy the app.

Code Signing: Assures users that the app is safe to use

LEFT OFF: error: "The provided entity includes an attribute with a value that has already been used The bundle version must be higher than the previously uploaded version: ‘15’" This error started happening on second beta build.

About

good starting point for myself

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages