Any workarounds until the update for 2019.4 LTS is out? We updated to LTS to prevent exactly those untested things - it’s a little bit frustrating to be honest
As a dirty workaround, keep this default catalog handy and just paste it in your build folder (/Unity-iPhone/Images.xcassets/) before you build. It will let the “append” build through and will get deleted automatically.
It’s really annoying doing this every time but better than wasting minutes with the replace option
You only need the “LaunchImage.launchimage” directory, not its contents.
Here’s a build preprocessor that creates it automatically before each build:
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
public class IosAppendExceptionFix : IPreprocessBuildWithReport
{
public int callbackOrder => 0;
public void OnPreprocessBuild(BuildReport report)
{
if (report.summary.platform != BuildTarget.iOS)
return;
var buildPath = report.summary.outputPath;
var catalogPath = Path.Combine(buildPath, "Unity-iPhone", "Images.xcassets");
if (!Directory.Exists(catalogPath)) {
Debug.LogError("Could not find assets catalog at path: " + catalogPath);
return;
}
var launchimagePath = Path.Combine(catalogPath, "LaunchImage.launchimage");
if (Directory.Exists(launchimagePath)) {
// Nothing to do
return;
}
Debug.Log("Created LaunchImage.launchimage directory to work around exception during Unity iOS append builds");
Directory.CreateDirectory(launchimagePath);
}
}
/_Scripts/IosAppendExceptionFix.cs(4,19): error CS0234: The type or namespace name ‘Build’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
Assets/_Scripts/IosAppendExceptionFix.cs(5,19): error CS0234: The type or namespace name ‘Build’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
@savantedroid You need to place the script in a folder called Editor. You can place that Editor folder as a subfolder anywhere in your project hierarchy, doesn’t have to be at top-level.
hi I have another question, after rebuild the project, the podfile has been overwrite too.
I have to copy a copy and overwrite it on the file
And execute pod install once
Is this related to this script, or is it a current bug in 2019.4.lts?
Serious Bug in Unity: All of the IOS, Apple TV, and devs on my team are unable to build due to Unity not properly creating the new spec for Launchscreen.storyboard, or adhering to the xcode project storyboard build implementation for Apple Devices.
Also, the 2020 builds arent recognizing the new Metal implementation in the builds they create now for some reason… something to do with Apple new Arm64 builds and a huge issue with Unity creating the Game Center capability in xcode project builds…
Unfortunately because of this, we have to stop our updates to IOS and Apple’s App Store this month until a bug fix comes through for 2019.4 LTS or 2018.4 LTS.
Diving into Xcode to solve the launchscreen storyboard issue is very troubling for our studio due to the nature of how much we create new ios updates and builds… please help us Unity