Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[IOS] APPENDING AN IOS BUILD FAILS DUE TO MISSING LAUNCHIMAGE PATH ERROR

Discussion in 'iOS and tvOS' started by sama-van, Jun 3, 2020.

  1. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,642
    Sorry for the Upper case, I simply copy/paste the title from the original IssueTracker :

    - https://issuetracker.unity3d.com/is...d-fails-due-to-missing-launchimage-path-error

    ... which seems close already then I would like to know if someone found some fix for this.
    I am running with the last 2020.0.2a12.


    That is a bit annoying because the build needs to be "Replace" each time, the Append method only crash the following error :


    Thanks!
     
    davidklei likes this.
  2. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,525
    Yeah, I've been getting this on 2019.4.0. Submitted a bug report yesterday.
     
  3. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,406
    it is fixed and should be released sonish in both 2020 and 2019.4
     
    sama-van likes this.
  4. TimKraemer

    TimKraemer

    Joined:
    Oct 19, 2014
    Posts:
    2
    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
     
    nickfourtimes and andymads like this.
  5. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,642
    To confirm everything is doing fine from 2020.2.0a13.
    2020.1.0b12 is also stable.
     
  6. Biggix

    Biggix

    Joined:
    Dec 8, 2014
    Posts:
    44
    Do you have an ETA for the release of the fix for 2019.4 ?

    This issue is driving development time to crazy extents.
     
  7. Numa

    Numa

    Joined:
    Oct 7, 2014
    Posts:
    81
    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 :D
     

    Attached Files:

  8. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    506
    You only need the "LaunchImage.launchimage" directory, not its contents.

    Here's a build preprocessor that creates it automatically before each build:
    Code (CSharp):
    1. using System.IO;
    2. using UnityEngine;
    3. using UnityEditor;
    4. using UnityEditor.Build;
    5. using UnityEditor.Build.Reporting;
    6.  
    7. public class IosAppendExceptionFix : IPreprocessBuildWithReport
    8. {
    9.     public int callbackOrder => 0;
    10.  
    11.     public void OnPreprocessBuild(BuildReport report)
    12.     {
    13.         if (report.summary.platform != BuildTarget.iOS)
    14.             return;
    15.  
    16.         var buildPath = report.summary.outputPath;
    17.         var catalogPath = Path.Combine(buildPath, "Unity-iPhone", "Images.xcassets");
    18.         if (!Directory.Exists(catalogPath)) {
    19.             Debug.LogError("Could not find assets catalog at path: " + catalogPath);
    20.             return;
    21.         }
    22.  
    23.         var launchimagePath = Path.Combine(catalogPath, "LaunchImage.launchimage");
    24.         if (Directory.Exists(launchimagePath)) {
    25.             // Nothing to do
    26.             return;
    27.         }
    28.  
    29.         Debug.Log("Created LaunchImage.launchimage directory to work around exception during Unity iOS append builds");
    30.         Directory.CreateDirectory(launchimagePath);
    31.     }
    32. }
     
  9. Biggix

    Biggix

    Joined:
    Dec 8, 2014
    Posts:
    44
    Thank you so much!

    On a side note, what does callbackOrder => 0; do?
     
  10. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    506
    That's modern C# syntax for
    public int callbackOrder { get { return 0; } }
    . It's called expression bodied members.
     
  11. savantedroid

    savantedroid

    Joined:
    Oct 8, 2015
    Posts:
    7
    Hi guys,

    I receive below errors:

    /_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?)

    and so on...

    Anybody have an idea what is wrong?
     
  12. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,642
    @savantedroid I would advise to mention the Unity version you are using when pasting error ;)
     
    quangtqag likes this.
  13. vl4dimir

    vl4dimir

    Joined:
    Jun 28, 2012
    Posts:
    9
    @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.
     
    quangtqag likes this.
  14. UDN_41c53a1a-0daa-4677-a552-0a2e49c9be23

    UDN_41c53a1a-0daa-4677-a552-0a2e49c9be23

    Joined:
    Dec 28, 2016
    Posts:
    12

    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?
     
  15. ilyafx

    ilyafx

    Joined:
    Jun 2, 2019
    Posts:
    1
    @Adrian thank you so much
     
  16. Jasr_88

    Jasr_88

    Joined:
    Mar 21, 2016
    Posts:
    8
    Thank you so very much for this fix, works like a charm (Using unity 2019.4.1f1)
     
    unnanego likes this.
  17. odysoftware

    odysoftware

    Joined:
    Jul 21, 2015
    Posts:
    60
    Its now listed as being fixed in 2019.4 - but I just updated to 2019.4.2f1 - still not fixed...
     
  18. qmpaden

    qmpaden

    Joined:
    Feb 2, 2019
    Posts:
    9
    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 :'(
     
    Hendrik-Mans likes this.
  19. LorenzoNuvoletta

    LorenzoNuvoletta

    Joined:
    Apr 28, 2014
    Posts:
    25
    Is there a Bug task link to monitor in which version of Unity this will be fixed?
     
  20. TimKraemer

    TimKraemer

    Joined:
    Oct 19, 2014
    Posts:
    2
    updated to 2019.4.3f1 - and it seems to be fixed, at least it works for me!
     
    Numa likes this.
  21. Kehdar

    Kehdar

    Joined:
    Oct 12, 2015
    Posts:
    1
    I still have this problem on 2020.1.0f1
     
  22. ninadpradhan

    ninadpradhan

    Joined:
    May 9, 2018
    Posts:
    8

    FYI I have 2019.4.1f1 and the issue isnt fixed in it.. however the above workaround worked for me in that version.
     
  23. ninadpradhan

    ninadpradhan

    Joined:
    May 9, 2018
    Posts:
    8
    If its the first time running the project, it fails due to "if (!Directory.Exists(catalogPath)) {", Uncommenting that fixed it for me.
     
unityunity