Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Project won't build using Xode15 release candidate.

Discussion in 'iOS and tvOS' started by VentaGames, Sep 13, 2023.

  1. Tommy0814

    Tommy0814

    Joined:
    Jul 20, 2017
    Posts:
    2
    Updating the Unity version in Unity hub from 2022.3.9f1 to 2022.3.10f1 will solve the problem immediately, with no extra hurdles.
     
  2. JeppeNygaard

    JeppeNygaard

    Joined:
    Dec 7, 2010
    Posts:
    13
    Thank you so much - this did the trick for me! ... I updated MacOS and updated Unity to 2022.3.10f1 - now I'm happy building again!
     
    drewjosh likes this.
  3. Manish_hbb

    Manish_hbb

    Joined:
    Dec 5, 2019
    Posts:
    2
    Thanks a lot, this helped me.
    Uninstalled xcode 15 and installed xcode 14.3.1
    And I could build again
     
  4. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    https://developer.apple.com/forums/thread/735426
     
  5. Shaggy21

    Shaggy21

    Joined:
    Oct 2, 2014
    Posts:
    20
    Hey there, I'm using XCode 15 RC, MacOS Ventura 13.6 and my iPhone 13 is iOS 17, using Unity 2021.2.5f
    While the Xcode build is working, I cannot use Metal Frame Capture (I go to the Edit Scheme -> Options -> Capture GPU Frame -> select Metal, and in Build Configuration I select Release). Any idea why that is? This did work back in iOS 16 and XCode 14.3, while still using this same Unity version.

    Screenshot 2023-10-04 at 16.57.46.png
     
  6. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    261
    That works for me as well. Thanks, @dmarqs and @drewjosh for adding more details.
    I'm using Unity 2023.1.16 + Xcode 15.0
    And here is my contribution to make it even easier:

    upload_2023-10-4_16-23-59.png
     
  7. silviu-georgian77

    silviu-georgian77

    Joined:
    Jan 17, 2016
    Posts:
    12
    For everyone that is still experiencing the problem even if you've got Sonoma + Xcode 15.0 + 2022.3.10f1, try the following:

    1. Quit Unity
    2. From your game's iOS build folder, delete everything.
    3. From your game's Unity main project folder, delete the Library and Temp folders.
    4. Re-open your project and let Unity do all the re-importing.
    5. Build again and see if it works.
     
  8. archimi_swiss

    archimi_swiss

    Joined:
    Oct 13, 2014
    Posts:
    4
    I have the same problem here with Unity 2022.3.10 and Xcode 15 -> Two Errors :

    - Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.

    and

    - Linker command failed with exit code 1 (use -v to see invocation)
     
  9. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    261
    Try adding the `-ld64` following the steps:
    - https://forum.unity.com/threads/pro...release-candidate.1491761/page-2#post-9389312
     
  10. danielszweda_math

    danielszweda_math

    Joined:
    Jun 20, 2023
    Posts:
    2
    Just like some here, this issue was not solved by upgrading Unity to 2022.3.10f1. In order to simplify the process for everyone here is a post build script to resolve the issue. Happy Coding!


    Code (CSharp):
    1. using System.IO;
    2. using UnityEditor;
    3. using UnityEditor.Callbacks;
    4. using UnityEditor.iOS.Xcode;
    5. using UnityEngine;
    6.  
    7. public class AppleBuildPostProcessor: MonoBehaviour {
    8.   [PostProcessBuild(1)]
    9.   public static void OnPostProcessBuild(BuildTarget target, string path) {
    10.     if (target == BuildTarget.iOS) {
    11.       ModifyValues(path);
    12.     }
    13.   }
    14.  
    15.   private static void ModifyValues(string path) {
    16.     var projectPath = PBXProject.GetPBXProjectPath(path);
    17.     var project = new PBXProject();
    18.     project.ReadFromFile(projectPath);
    19.  
    20.     project.AddBuildProperty(frameworkTargetGuid, "OTHER_LDFLAGS", "-ld64");
    21.  
    22.     project.WriteToFile(projectPath);
    23.   }
    24. }
     
  11. this-Array

    this-Array

    Joined:
    Jun 11, 2013
    Posts:
    7
  12. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,058
    this seems no longer true
     
  13. PotatoBoomer

    PotatoBoomer

    Joined:
    May 5, 2023
    Posts:
    1
    Sonoma, xcode15,
    Report https://issuetracker.unity3d.com/is...latforms-fails-with-xcode-15-dot-0b6-or-newer implies that the issue has been fixed.

    I am still getting:

    ld: Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.

    clang: error: linker command failed with exit code 1 (use -v to see invocation)


    The solution is not to write hacky post process scripts or
    -ld_classic
    flags, butUnity should fix the issue to their product.
     
    ilezhnin likes this.
  14. mmomin_504

    mmomin_504

    Joined:
    May 8, 2021
    Posts:
    14
    Download Xcode beta 15 version 5 and placing it in the Applications folder worked for me.
    Plus
    > Unity Framework > Build Settings > Other Linker Flags (you can search for it) > double click on value + hit plus on button > add "-ld64" > hit Enter >
     
    Last edited: Oct 19, 2023
  15. nnoom1986

    nnoom1986

    Joined:
    Jan 9, 2018
    Posts:
    27
    This isn't solving it for me with Xcode 15.0.1 and Unity 2022.3.11f1. Having Beta 5 alongside the latest version was working until these latest updates, and now it's broken again with the same errors.

    Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.
    Linker command failed with exit code 1 (use -v to see invocation)
     
  16. mmomin_504

    mmomin_504

    Joined:
    May 8, 2021
    Posts:
    14
    Did you add "-ld64" or "-ld_classic" in other linker flags for Unity Framework?
    Also, please share the detailed screen shot of the error. Thanks
     
  17. this-Array

    this-Array

    Joined:
    Jun 11, 2013
    Posts:
    7
    These flags break functionality in Odin Serialization and who knows what else. My fix right now is to go back to xcode 14 which doesnt work on sonoma.
     
  18. MartinPegg

    MartinPegg

    Joined:
    Oct 7, 2016
    Posts:
    1
    It appears from my own testing that the -ld64 or -ld_classic linker is only needed if the minimum iOS target is less than 15.0. Whether or not you want to exclude anyone on iOS 14 and below is another question.
     
    g8rew, sandolkakos and mmomin_504 like this.
  19. BugiGames

    BugiGames

    Joined:
    Oct 20, 2020
    Posts:
    9
    Last edited: Nov 2, 2023 at 8:20 PM
  20. IvovdMarel

    IvovdMarel

    Joined:
    Jun 1, 2014
    Posts:
    7
    Upgrading from 2023.1.12f1 to 2023.1.18f1 fixed it for me.
     
    sandolkakos likes this.
  21. RaventurnStefan

    RaventurnStefan

    Joined:
    Aug 1, 2012
    Posts:
    43
    Unfortunately not for us, but with the workaround (-ld64) it works.