[iOS] Missing file in RunUAT.sh build (included if built from XCode)

Hello there!

I’m trying to automate iOS builds using RunUAT.sh and removing the need to manually perform actions in XCode. I’m using Modern XCode and Automatic Code Signing with Apple Store Connect credentials. It works almost flawlessly, except that the packaged builds with this method crash on launch…

I tracked down the issue to the initialization of the Firebase SDK, that relies on the existence of a credentials file named GoogleService-Info.plistat the root of the main bundle. The initialization code makes the following check to ensure that the file is present:

NSString* Path = [[NSBundle mainBundle] pathForResource: @“GoogleService-Info” ofType: @“plist”];
return Path != nil;

The GoogleService-Info.plist file is located at the root of my project folder. If I open XCode and make the build using Product → Archive, everything runs wells and this test returns true. This works from a freshly regenerated XCode project with no manual action to add the GoogleService-Info.plist file.

When I package using exclusively RunUAT.sh, then open the produced .xcarchive in XCode and distribute it on my device, the game crashed on launch, and debugging the process shows that this file check returned false, provoking a crash in the Firebase SDK intialization.

So far I tried several combinations of using UPL and RuntimeDependencies in my Build.cs to manually include the file in the build. I see it appear in the USF or NonUSF files manifest (depending on how I add it), but it is still not found by the game, so it seems that I can include it in the .pak or in Unreal managed files, but not in the iOS Bundle that XCode seems to generate properly.

I’m stuck here, so can anyone explain to me how to tell Unreal that I need this file to be embedded in the Bundle?

Thanks!