iOS Build Environment Help Center

Launch Screen image causes crash

append delete Phil

Hello Pierre

iOS Builder has been great for us and continues to be.

I have encountered an issue that prevents the app from launching. If I add an image to the 'iPad Launch Screen' and build, the app will build and install as normal, but instantly crashes on launch. I have the 'Launch screen type' set to 'Image and background (relative size)'. If I simply remove this image (and set the dropdown back to 'Default') then the app will launch as normal.

Is this a known issue?

Thanks
Phil

Unity 2020.3.14
iOS Builder 3.35.4
iOS SDK 14.4
Windows 10

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello,

This is probably a defect in the nib compiler, which is more than rudimentary at the moment.

There is a workaround, it is to extract the *.nib and *.storyboardc files and/or directories from an Xcode-compiled version of your app, and inject them into the Windows build thanks to a pre-packaging script. These resources never change (as long as you don't change them in the Unity editor).

I'd be happy if you send me both, by the way: the source .xib/.storyboard and the compiled .nib/.storyboardc, so as to study them and improve the nib compiler.

append delete #2. Phil

Hi Pierre

Thanks for the information. I've emailed you a copy of:

- The source storyboard
- The compiled storyboard/nib files from Xcode.
- The compiled storyboard/nib files from iOS Builder.

I hope that helps find the issue. If you are unable to provide a quick fix, would you be able to provide an example pre-packaging script that I would then modify to inject the Xcode compiled version in to the Windows build?

Thanks
Phil

append delete #3. Pierre-Marie Baty

Something like this:

% fix-storyboards.bat
@echo off
rem // substitute the compiled storyboards with the Xcode versions

set PATH_TO_XCODE_COMPILED_STORYBOARDS=C:\Users\You\Desktop\compiled xcode

rem // remove the old compiled storyboards
rmdir /s /q "%TARGET_BUILD_DIR%\YourAppName.app\LaunchScreen-iPad.storyboardc"
rmdir /s /q "%TARGET_BUILD_DIR%\YourAppName.app\LaunchScreen-iPhone.storyboardc"

rem // put the new ones in place
xcopy /e /i "%PATH_TO_XCODE_COMPILED_STORYBOARDS%\LaunchScreen-iPad.storyboardc" "%TARGET_BUILD_DIR%\YourAppName.app\LaunchScreen-iPad.storyboardc"
xcopy /e /i "%PATH_TO_XCODE_COMPILED_STORYBOARDS%\LaunchScreen-iPhone.storyboardc" "%TARGET_BUILD_DIR%\YourAppName.app\LaunchScreen-iPhone.storyboardc"
%

Warning: I haven't tested this script. It's just a batch script, so that you see the idea.

:: @Pierre-Marie Baty added on 27 Jul ’21 · 13:30

Addendum: I just tested it actually, it does work, at least for this use case. Let's hope other readers will find it useful.

append delete #4. Phil

Thanks Pierre - very helpful. That script has worked.

The launch screen now appears exactly as intended. Happy with this workaround.

Much appreciated!

Thanks
Phil

append delete #5. Pierre-Marie Baty

You're welcome. I'm sure it'll help other people too, and that was the very purpose of this forum - save precious time :-)

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty