It is necessary to run 'expo publish' in order to generate a production build?

Hello there :wave:

I’ve a project which use bare workflow, and not depends of OTA updates, my question is: Even if I don’t need the OTA updates Do I need to run ‘expo publish’ before generate an IPA or APK for production?

I think. It is necessary, but maybe We can create a bare template without OTA updates or make this optional?

Hi, if you’re on the Bare workflow, you run yarn ios or yarn android to start the JavaScript bundler server and build the project binary. This requires Xcode or Android Studio, depending on the platform. For more context (and the steps before and after this), please see the Bare workflow walkthrough in docs.

Hello!
I have a similar issue, I just ejected my app under sdk37 to the bare workflow and I’m having trouble building it for iOS release (Archive).

I reproduced my problem with a brand new expo init project.
I do expo eject and here yarn ios works perfectly for development.

Then I open the workspace file in XCode and do Product => Archive. Compilation goes fine, I click on Distribute App => Development => [App Thinning: iPhone 8, Rebuild from Bitcode: true] => Export

After signing I get two .ipa files that I can install on my iPhone 8 but the app crashes at launch.
Can you help me see what I’m doing wrong here?
Thanks!

hi! it is necessary to publish by default, yeah. you can remove ota updates by doing the installation steps from expo/README.md at master · expo/expo · GitHub in reverse.

Seeing the same issue, basically when you run yarn ios, runs in debug configuration, and works fine, when run in release configuration, we see this error,

2020-04-10 18:05:17.460983+0300 collect[8448:2356523] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: '* -[NSFileManager copyItemAtPath:toPath:options:error:]: source path is nil’**

Then looked into the paths and saw this,

/var/mobile/Containers/Data/Application/C72454CA-B3C2-4E13-9DA1-EA4B70E8FA4C/Library/Application Support/.expo-internal/43b6c00fa250b3b2925695018d6fb84e0799a288213499970aa9dc2ab615aadf.ttf

Somehow the font files are not being copied anymore after updating to latest expo-cli + expo 37

Any advice here?

Having similar issue. Works in debug but not in release. I see this error.

***** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘The embedded manifest is invalid. If you are making a release build for the first time, make sure you have run expo publish at least once.’**

I’ve already run expo publish

@superbright @edwardchen - as i mentioned in my response above you do need to publish to generate a release build. @esamelson is working on changing this but this is how it works right now.

@notbrent for me the issue was not publishing.
it was the following key in the app.json

"assetBundlePatterns": [
  "**/*"
],

remove it, and it copies the assets fine. fyi

hey @superbright - you might have trouble getting new assets in OTA updates if you remove that line in app.json. instead, could you make sure you have up-to-date expo-cli and that you don’t have the expokit package in your package.json before publishing?

1 Like