[Solved] iOS apps distributed to the App store crash

Problem

After distributing a UE5 iOS app using Photorealistic 3D Tiles to the App Store or TestFlight, the app crashes immediately after launching.
It works fine with local builds (same build configuration as when distributed).
It also works fine in a project that excludes Photorealistic 3D Tiles and only has Cesium SunSky.
Could you give me some advice?

Crash logs

App crashes on CesiumAsync::CachingAssetAccessor::get

Project details

Sample project with only Photorealistic 3D tiles placed in the Blank template project.
I referred to this tutorial.
https://cesium.com/learn/unreal/unreal-photorealistic-3d-tiles/

Hardware & Software details

  • macOS Sonoma 14.2.1
  • iPhone 14 iOS 17.2.1
  • Xcode 15.2
  • UE 5.3.2
  • Cesium for unreal 2.2.0

Hi @ARAkasaka,

Sorry that your app is having trouble. I’m not sure why Google Photorealistic 3D Tiles would work in a local build but not from the app store. This behavior is happening on the exact same device, correct?

To help us troubleshoot, can you test how your app functions with Cesium World Terrain (instead of Google’s data)? That may help us infer what’s happening here.

Hi @janine thanks for your response.

This behavior is happening on the exact same device, correct?

Yes, same device (iPhone14, iOS17).

To help us troubleshoot, can you test how your app functions with Cesium World Terrain (instead of Google’s data)?

Even in the case of the app that includes only Cesium World Terrain, similarly, only the distributed app crashed after launching.

I resolved this issue by forcing FMallocAnsi usage on iOS platform.

if (Target.Platform == UnrealTargetPlatform.IOS)
{
    GlobalDefinitions.Add("FORCE_ANSI_ALLOCATOR=1");
}

https://alyamkin.artstation.com/blog/9VEQ/ue4-ios-and-pointer-being-freed-was-not-allocated

Glad you were able to figure it out @ARAkasaka! Unfortunately, our team isn’t familiar with deploying to the app store, so the fix wasn’t immediately apparent. Thank you for letting us know about the solution!