[ExpoKit] Building standalon iOS app doesn't include latest JS

Hi,

I’m using ExpoKit (SDK 25) for developing my app. When I run it on my phone with XCode everything works as expected and changes in code are reflected in the app. The problem starts when I try to build a standalone archive. Archives build with no errors and yet my JS bundle seems to be outdated.

I tired clearing every cache possible, searched Google up to the 3rd page and I can’t seem to find any relevant information about this.

My workflow is as follows:
Development build

  • exp start and than running code from XCode

Production build

  • update version in app.json (version and ios.buildNumber) + Info.plist (tried both Version and Build)
  • exp publish
  • build archive in XCode (Product → Archive)

Currently I’m using Crashlytics for app distribution, though if think it’s irrelevant.

What I’m doing wrong?

Hi there! It sounds like you are using a detached (ExpoKit) project.

Here is how you can debug this behavior:

  1. In your Xcode project, look in EXShell.plist and check the value for the app’s url, and if applicable, release channel. Also check EXSDKVersions.plist and take a note of the supported sdk version you have configured.
  2. In your browser, load expo.io/@your-app/your-slug?index.exp?sdkVersion=25.0.0 (where 25 is the value from EXSDKVersions.plist). If you are using release channels, you can also include a releaseChannel query parameter here.
  3. The browser should load a json file. In the contents of this file, check the value of publishedTime and make sure it looks correct (based on the last time you ran exp publish).

Another thing you can do is make sure your app.json contains a key called publishBundlePath under ios. This represents the JS cache we build for the first load of your app. After you run exp publish, make sure the file at this path gets written.

It worked. Some time ago I changed bundle name nad it turns out that EXShell.plist still had the old one. Strange thing though, because some changes were updated.

Anyway, thanks for your time.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.