Issue with build after detach using Expo

#1

I am really enjoying Expo, I got so far with my app but then I needed to add a 360 Viewer that meant I had no choice but to detach, however I followed the documentation to detach and the add the required pods etc.

So I detached and added Pod GVRSDK/GVRView.

Build works fine when I build with Xcode to a physical device, all works great, and uses the Expo app’s published URL.

However, when if I create an Archive in Xcode and then install the .ipa file to a device everything works apart from the element that is coming from the Pod.

I am basically getting the same result as if I would just open the app URL with the Expo client.

What am I missing? Is there another step or setting to make sure that the Pod files are included in the build I make in Xcode?

Would appreciate any thoughts or suggestions.

Thanks!

#2

Hi, that’s odd. The only difference between a Debug and a Release ExpoKit build is that the release build will target your published version, whereas a Debug build will hit your local packager. Have you published your JS changes?

#3

Thanks for your response. So it seems it might be an issue with xcode not including all the libraries when building for release.

If I change the build configuration of the archive scheme in xcode to debug instead of release then then the .ipa file works! however that build is still linked to the local expo URL on my machine and not the one I have published.

Is there anyway to change that URL in the debug build configuration just to test this?

Do you know what I might need to set in xcode to be sure it includes everything needed to publish?

Thanks!!

#4

There’s not a great way of telling Xcode to fetch your published url in a Debug build. You could hotpatch EXShellManager::_isLocalDetach to just return NO from within the ExpoKit pod dependency, and that might work.

To check if your native library is present at runtime, you could go to that library and breakpoint on the call to RCT_EXPORT_MODULE() and see if it gets hit. Cocoapods should install your library regardless of whether the configuration is Debug or Release.