I’m building my app for the first time with
expo build:ios -t archive --non-interactive using CI with Github Actions and it builds correctly.
After that it runs
eas submit -p ios --latest --non-interactive but I keep getting the following error:
Set ascAppId in the submit profile (eas.json).
Error: Submission failed
The app does not yet exist on my Apple Store Connect so I can’t provide the
ascAppId. From the docs, it seems that it should be automatically created if it’s not provided.
I’m thinking of using
fastlane to create the app first if the issue persists, but Expo should be able to do it.
Note: I’m building the app directly using CI without building it first on my local machine.
In your post, please share:
eas-cli version: 0.38.3
It should create it for you, but not if you use
--non-interactive. To create that app you will need to provide your apple credentials
Since I’m doing everything on the CI is not possible for me to use the interactive option. Any workarounds?
I’m using an action that allows me to authenticate with 2FA from the CI
it just for the first submit to create that new app on appstore, each new submit can be run with non-interactive.
I’m not aware of any good way to do it. I guess it should work if you run build without
--non-interactive flag and somehow pipe all the answers to the prompt question via stdin, but it would be hard to do and very hacky.
I have a pretty edge case: I’m using Expo as a PWA wrapper for building multiple white-labeled apps that just need to be published once since the updates are made directly on the web app.
Thanks for your insights, I’m gonna have a try with stdin
Unless it’s 100+ apps I think it would be faster and more reliable to do that manually, but if you really need that automated consider using fastlane to create those apps and expo to submit them
Yes, it’s gonna be 500+ apps in the near future, so automation would save a lot of time.
Could I use fastlane after the
expo build command to create an app and get the
ascAppId, or should I build the app with fastlane from the start?
If you run
eas build with
--json option you can easily get artifact URL with sth like
jq and download it with wget. after you have ipa/aab locally it’s probably easier to handle the entire submit process(including app creation if necessary) with fastlane.
The other option would be to only create those apps once with fastlane and run build+submit with expo. Note that even if you automate creation for all of those apps, you would still need to put those ascAppId in eas.json somehow. This is probably the most complicated option to implement, but it’s also the only option where you don’t have to run each ci job on macos machines (just the one-time app creation with fastalne).
As for the running entire build and submit process via fastlane, it depends on what is easier for you and what EAS features you are using.