iOS shipping build crash

Hi, I’m working on an iOS project which runs successfully when testing via the Launch menu in Unreal Editor, but crashes at the launch screen when testing the shipping build.

After generating the build (using “For Distribution” in project settings), uploading to Apple TestFlight, then downloading the app, it launches but freezes (first launch) or crashes (subsequent launches) on the launch screen.

The test case is a blank blueprint project set to Mobile / Tablet with No Starter Content.

I’m on macOS Sierra 10.12.6 with Xcode 9.1

The crash long mentions SPRINGBOARD as the termination reason, any pointers on how to fix this would be appreciated.

Crash Log

Hi Derek,

Thanks for letting us know about this issue. We just ran into this ourselves internally, and have entered UE-52328 to investigate what is happening. We are still gathering information about this, and unfortunately do not yet have a workaround or solution.

Tim

Hi,

So we have seen the SPRINGBOARD crash here locally when closing the application, so I suspect your application is just closing for some reason. The easiest way to find that out is to enable logging in a shipping build. In your game’s Target.cs (Game/Source/Game.Target.cs where Game is your game name) add

bUseLoggingInShipping = true

to the SetupGlobalEnviroment method and then you should start getting logs in a shipping build. Run the downloaded one again with logging enabled and then after the crash pull the logs off and post them. Hopefully they will give us what we need to figure out the problem.

-Pete

Hi Derek - we’re seeing the same call stack in our project. Are you playing a movie on the loading screen? Or otherwise doing anything movie related?

After a call with Martin, he suggested adding a plist entry for camera usage.

I added this to “Additional Plist Data” but it seems it did not get added to the build (I’m doing a full rebuild with shipping/distribution settings). This is what I put in the plist field: NSCameraUsageDescriptionCamera is used for VR functionality Here is the info.plist contents

Also, if it helps to diagnose the problem, this project uses the Google VR plugin.

Thanks Pete, will do. In this case the file was in Config/DefaultGame.ini

I ran the app with that setting after downloading from TestFlight, and no crash report is being generated on the device when viewing on Xcode’s device log. Any ideas what to change?

Sorry reading my previous response above, it looks like that wasn’t clear, so please rebuild the executable with that enabled.

-Pete

Peter any tips how to compile using the target.cs file? I’m only familiar with packaging through the Unreal Editor interface.

Peter OK, that worked adding the empty C++ class via the content browser. That way it automatically created the Target.cs file in /Source and I could set the variable you mentioned originally. I also had to delete the Target.cs file in /Intermediate/Source because it was causing compilation errors due to having duplicate contents.

So I packaged and uploaded to Apple TestFlight, downloaded and ran the app, and now it is working without any crashing! It seems the crash was prevented somehow in the process of setting the debug variable.

After a call with Martin, he suggested adding a plist entry for camera usage.

I added this to “Additional Plist Data” but it seems it did not get added to the build (I’m doing a full rebuild with shipping/distribution settings). This is what I put in the plist field: NSCameraUsageDescriptionCamera is used for VR functionality Here is the info.plist contents

Also, if it helps to diagnose the problem, this project uses the Google VR plugin.

Hey Derek,

This issue is being tracked here:

UE-55910 - Prompt for camera permissions when running Google VR plugin

You can check the status of it there, but since Google isn’t using our bug tracking database, it might take awhile to get updated. The last update I see is from April where google said the issue had been “escalated on our side to a major focus for our next release 1.150, that is most likely going to be available publicly at the beginning of June.”, but I haven’t confirmed that release happened or included this fix, have you happened to try the newer version from Google?

Thanks.

Oh ok, I guess we’re still waiting on them unfortunately. I’m not sure how soon we can expect a fix from them. Sorry about the inconvenience.

Did you rebuild the executable for the app with that setting enabled in the Target.cs file? This setting takes effect at compile time and so without a recompile of the executable you haven’t actually enabled logging.

-Pete

I found the Target.cs file, but am not sure how to compile without it reverting back to normal. When I edit the file, then use the Unreal Editor interface to package for shipping, the file reverts to normal state without the variable added.

You are using the Launcher version of the editor, correct? If so, you can build with the editor, but you will need to add a code file to force it to build the project. In the editor, there is a menu command to add a code class. Just adding an empty class is enough… Then when you package the game as you have in the past, it will build the executable as well.

-Pete

Hi Tim, I added a comment to Peter’s answer with more details.

Arggh, I was hoping it would give us more insight in to the problem. Do you have the original IPA? I might be able to figure it out if I ran it locally.

-Pete

I do, but now I uploaded another build and it’s crashing again - however there are no error logs even though use logging in shipping is set to true.

One thing that may help - the time that it worked without crashing, it generated a IPA named “Distro_ProjectName.ipa” whereas now (and before when it was crashing) it’s generating a “Distro_ProjectName_Shipping.ipa” file. I’m not sure how I generated the file without _Shipping before, since it forces the Shipping preset when clicking “For Distribution” in packaging settings.

The IPA without _Shipping is about +70 MB bigger.

The extra size of the shipping build is just the bundled debug information in the executable. Have you tried re-signing the shipping distribution IPA with a development certificate and run it on a local device to see if it works? Lastly, any logs from your build would potentially help us diagnose the problem.

-Pete