Search Unity

Bug Xcode Version 13.3 (13E113) error - Cycle in dependencies

Discussion in 'iOS and tvOS' started by petey, Apr 17, 2022.

  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Hi all,
    I'm getting this error in Xcode 13.3.

    Cycle in dependencies between targets 'Unity-iPhone' and 'UnityFramework'; building could produce unreliable results. This usually can be resolved by moving the target's Headers build phase before Compile Sources.
    Cycle path: Unity-iPhone → UnityFramework → Unity-iPhone
    Cycle details:


    This seems to happen on any build after the first and can be resolved with Product/Clean Build Folder.
    I was wondering if anyone knows a way to automate this step as I need my builds to make it through unattended.

    Thanks,
    Pete
     
    Suger_Ted likes this.
  2. Gillissie

    Gillissie

    Joined:
    May 16, 2011
    Posts:
    305
    I reported this issue to Apple, and they replied that it's from the UnityFramework's "build phases" having the "Headers" after the "Compile Sources". When rearranged so that Headers is before Compile Sources, this issue no longer happens.

    I did ask in a followup why it works the first time after a "Clean Build Folder", and pointed out that it just started in a recent Xcode version. I expect finger-pointing to happen between Apple and Unity before we get a good solution.

    I would love to hear from Unity on this here.
     
    kdeger, roointan, Suger_Ted and 2 others like this.
  3. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Hey thanks @Gillissie, good that you let them know. It doesn't sound like it'll be too much trouble for Unity to fix, I'll post here if I manage to find anything.
     
  4. HolyFireGames

    HolyFireGames

    Joined:
    Apr 23, 2014
    Posts:
    134
    I'm running into this same issue. I'm new to Mac OS, just got my mac book pro this weekend and trying to learn all of this so I can build to ios. Would you mind explaining how to rearrange the headers and compile sources in xcode? Thanks!
     
  5. Gillissie

    Gillissie

    Joined:
    May 16, 2011
    Posts:
    305
    Screen Shot 2022-04-20 at 12.26.50 PM.jpg
     
  6. Gillissie

    Gillissie

    Joined:
    May 16, 2011
    Posts:
    305
    I feel like we should also report this as a bug in Unity, since the Xcode project should generate properly to build without issues.
     
    RaventurnStefan likes this.
  7. Gillissie

    Gillissie

    Joined:
    May 16, 2011
    Posts:
    305
    By the way, this is Apple's response to my report:

    I reminded them that this issue just started in Xcode 13.3, so it seems like they should fix that. However, I also think Unity should fix their iOS builds so the build phases are in the correct order.
     
  8. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Thanks for the pointers!
    I made a Unity bug report so hopefully that's of some help.
     
    Suger_Ted likes this.
  9. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    Gillissie workaround above is the one recommended by apple, and we are indeed fixing this internally (no ETA for now, but indeed it would be easier for everyone if we just fixed the project by ourselves)
     
  10. HolyFireGames

    HolyFireGames

    Joined:
    Apr 23, 2014
    Posts:
    134
  11. Madfinn13

    Madfinn13

    Joined:
    Jun 27, 2018
    Posts:
    1
    You are the man! I love the great way to show this, I’m new to Xcode myself but that is just the amazing compared to other documents I could be searching through!
     
  12. p0w1nd

    p0w1nd

    Joined:
    Oct 28, 2015
    Posts:
    140
    @Gillissie solution works. Thanks!

    But hope Unity will fix this soon too.
     
  13. Gillissie

    Gillissie

    Joined:
    May 16, 2011
    Posts:
    305
    I have since upgraded to Unity 2021.3.5f1 and it does appear to be fixed.
     
    petey likes this.
  14. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    XCode 13.4.1still has this issue
    This seems to occur after build to Mac, then build to iOS after

    Clean build seems to fix it
     
  15. Caetleo

    Caetleo

    Joined:
    Mar 19, 2019
    Posts:
    25
    I did a build from newest version of unity, and opened a Xcode workspace project and after the indexing, went to do a build onto my phone and got this error. I'm using Xcode 13.4 Just updated, never had this issue before, I'm trying to fix of moving the headers. When it went to install after doing so. I get this error and this debug log

    Code (CSharp):
    1. Details
    2.  
    3. The app “HauntedEscapesHDR” on iPhone quit unexpectedly.
    4. Domain: IDEDebugSessionErrorDomain
    5. Code: 10
    6. Failure Reason: Message from debugger: Terminated due to memory issue
    7. User Info: {
    8.     DVTErrorCreationDateKey = "2022-08-28 18:13:30 +0000";
    9.     IDERunOperationFailingWorker = DBGLLDBLauncher;
    10. }
    11. --
    12.  
    13. Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    14.     "device_model" = "iPhone14,2";
    15.     "device_osBuild" = "15.4.1 (19E258)";
    16.     "device_platform" = "com.apple.platform.iphoneos";
    17.     "launchSession_schemeCommand" = Run;
    18.     "launchSession_state" = 2;
    19.     "launchSession_targetArch" = arm64;
    20.     "operation_duration_ms" = 16422;
    21.     "operation_errorCode" = 10;
    22.     "operation_errorDomain" = IDEDebugSessionErrorDomain;
    23.     "operation_errorWorker" = DBGLLDBLauncher;
    24.     "operation_name" = IDEiPhoneRunOperationWorkerGroup;
    25.     "param_consoleMode" = 0;
    26.     "param_debugger_attachToExtensions" = 0;
    27.     "param_debugger_attachToXPC" = 0;
    28.     "param_debugger_type" = 5;
    29.     "param_destination_isProxy" = 0;
    30.     "param_destination_platform" = "com.apple.platform.iphoneos";
    31.     "param_diag_MainThreadChecker_stopOnIssue" = 0;
    32.     "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    33.     "param_diag_MallocStackLogging_enableForXPC" = 1;
    34.     "param_diag_allowLocationSimulation" = 1;
    35.     "param_diag_gpu_frameCapture_enable" = 3;
    36.     "param_diag_gpu_shaderValidation_enable" = 0;
    37.     "param_diag_gpu_validation_enable" = 1;
    38.     "param_diag_memoryGraphOnResourceException" = 0;
    39.     "param_diag_queueDebugging_enable" = 0;
    40.     "param_diag_runtimeProfile_generate" = 0;
    41.     "param_diag_sanitizer_asan_enable" = 0;
    42.     "param_diag_sanitizer_tsan_enable" = 0;
    43.     "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    44.     "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    45.     "param_diag_showNonLocalizedStrings" = 0;
    46.     "param_diag_viewDebugging_enabled" = 1;
    47.     "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    48.     "param_install_style" = 0;
    49.     "param_launcher_UID" = 2;
    50.     "param_launcher_allowDeviceSensorReplayData" = 0;
    51.     "param_launcher_kind" = 0;
    52.     "param_launcher_style" = 0;
    53.     "param_launcher_substyle" = 0;
    54.     "param_runnable_appExtensionHostRunMode" = 0;
    55.     "param_runnable_productType" = "com.apple.product-type.application";
    56.     "param_runnable_swiftVersion" = "5.6.1";
    57.     "param_runnable_type" = 2;
    58.     "param_testing_launchedForTesting" = 0;
    59.     "param_testing_suppressSimulatorApp" = 0;
    60.     "param_testing_usingCLI" = 0;
    61.     "sdk_canonicalName" = "iphoneos15.5";
    62.     "sdk_osVersion" = "15.5";
    63.     "sdk_variant" = iphoneos;
    64. }
    65. --
    66.  
    67.  
    68. System Information
    69.  
    70. macOS Version 12.5.1 (Build 21G83)
    71. Xcode 13.4.1 (20504) (Build 13F100)
    72. Timestamp: 2022-08-28T14:13:30-04:00
     

    Attached Files:

  16. GameSimStudios

    GameSimStudios

    Joined:
    Nov 23, 2016
    Posts:
    1