Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: GHA testflight #4

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

WIP: GHA testflight #4

wants to merge 14 commits into from

Conversation

jowparks
Copy link
Contributor

@jowparks jowparks commented Mar 25, 2024

There are a few options for uploading builds to testflight:

  1. Via XCode on dev machine: https://developer.apple.com/documentation/xcode/distributing-your-app-for-beta-testing-and-releases.
  • Pro: very simple, point and click for deployment process
  • Con: requires developer with environment setup on local machine and proper certs
  1. Fastlane: used to streamline the deployment process from non-gui systems
  • Pro: can be used locally, or in GHA
  • Con: another layer of tooling/abstraction, requires payment after certain level of usage
  1. xctool upload: Can use raw cli tools for building/archiving/uploading to testflight/App Store Connect
  • Pro: free, no abstraction, similar to our code signing process for node app
  • Con: most complicated of three options

I attempted to use method 3, here is the journey (which is slightly incomplete).

Few hurdles when trying to get GHA running testflight creation:

  1. Rust targets - Need the proper targets installed on the runner, when trying to build ran into issues and just added rustup target install for all missing targets.
  2. pod install - We need to run this command to get the xcworkspace to be generated in the mobile-app/ios directory. This XCode object is needed for publishing the project. The macos-latest runners have a bug because they are running older versions of XCode, so I needed to patch the Podfile after creation. Bug report here: [SDK 50] Pod install error: The Swift pod ExpoModulesCore depends upon glog, which does not define modules. expo/expo#25905 . I tried overcome this issue by using macos-13 runners, which succeed without the patch, but there is a bug in their filesystem that doesn't allow access of the runners to the generated files in the ios directory.
  3. Need a separate .mobileprovision for uploading apps to app store. This profile needs to be able to upload to the app store, there is an explicit option for this when you go through the creation wizard on app store connect. I provisioned one via App Store Connect, serialized to base64 via base64 -i "/Users/.../AppStoreMobileAppProfile.mobileprovision" | pbcopy and added as secret to github actions. See 1password for copy of data ExportOptionsAppStore
  4. Final issue which I haven't overcome, conflict in autogenerated xcworkspace from expo prebuild which wants to autosign, when performing from cli you need to change settings in project to manual via Xcode... but we are autogenerating ios dir with prebuild . Below is the error message generated from GHA run:
/Users/runner/work/mobile-wallet/mobile-wallet/packages/mobile-app/ios/mobileapp.xcodeproj: 
error: mobileapp has conflicting provisioning settings. 
mobileapp is automatically signed, but provisioning profile AppStoreMobileAppProfile has been manually specified.
 Set the provisioning profile value to "Automatic" in the build settings editor, 
 or switch to manual signing in the Signing & Capabilities editor. 
 (in target 'mobileapp' from project 'mobileapp')

@jowparks jowparks changed the title Gha testflight GHA testflight Mar 27, 2024
@jowparks jowparks changed the title GHA testflight WIP: GHA testflight Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant