Resources are not present in final .ipa package when I try to build and package iOS app using remote connection from Windows to macOS with included frameworks with resources. This is only problem with remote connection, when I try the same on local macOS instance without remote connection, it works properly. Also it worked good in previous UE4 versions.
Steps to reproduce:
Framework with resources to include: Engine\Plugins\Runtime\Advertising\IOSTapJoy\ThirdPartyFrameworks\Tapjoy.embeddedframework.zip
Code to place in module’s Build.cs:
PublicAdditionalFrameworks.Add(
new UEBuildFramework(
“TapJoy”,
“…/…/ThirdPartyFrameworks/Tapjoy.embeddedframework.zip”,
“Resources/TapjoyResources.bundle”
)
);
Build and package project
Open package .ipa file, it should contain TapjoyResources.bundle inside but it’s not present there.
Please fix this ASAP because it breaks most of the plugins and remote building for iOS is currently completely useless.
Looking at the UBT logs, it seems that the resource bundles are copied after having built and signed the IPA and are copied from the local Engine/Intermediate/UnzippedFrameworks/ directory (where they were successfully unzipped) to the local project’s Intermediate/IOS/FrameworksAssets/ directory. I suspect they are copied to the wrong place or - more likely (as they would not be signed otherwise) - at the wrong time.
I made some progress, of course it’s more complex than expected.
The first issue is that the asset bundles are embedded into the IPA on the Windows machine, not the Mac (where the asset bundles are decompressed). The fix is to modify the file “RemoteMac.cs” (near line 563 - UE4.21.1) adding a call to rsync to sync-back the directory “Intermediate/IOS/FrameworkAssets/”. Running the Package command, this produces an IPA file on Windows containing all the needed asset bundles. But…
…Using the Launch command to run the IPA on the device, re-builds the IPA without adding the asset bundles. I’m still investigating this. I suspect that the Launch command uses a different build path respect to the Package command, and the iPhonePackager doesn’t take care of the “Intermediate/IOS/FrameworkAssets/” directory, failing to include the needed files.
I succeeded: using the patch described above and installing the app using the Project Launcher (with “by the book” cooking), I’m able - from Windows - to build remotely integrating third-party framework resources in the installed IPA. I’ll try to post some more information in the next days.
In attachment the patch file for UE4.21. To use it you must apply the patch and rebuild the solution at Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj (it works also with Rocket).