Getting dyld_fatal_error after updating to Xcode 6 beta 4 using swift

后端 未结 12 2146
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 14:30

I just recently downloaded Xcode 6 beta 4, and my swift project compiles with no errors but before it gets to my code I get a dyld_fatal_error just above start in the call s

12条回答
  •  眼角桃花
    2020-12-14 15:20

    For sure this error is very unhelpful:

    dyld`dyld_fatal_error:
    ->  0x1200ad088 <+0>: brk    #0x3
    

    This of course occurs only on device, not the simulator. Another good reason to always test on a device.

    Anyway, having had the same issue, a clean didn't work for me. Deleting DerivedData didn't help either. Also tried synchronising the Deployment Target versions. That didn't seem make any difference but I did it anyway.

    Solution was to add any dynamic frameworks to Embedded Binaries setting under Target -> General:

    Now I know that has been mentioned in other answers. However, if I can supplement by saying that any dependent dynamic frameworks must also be included.

    So for example if you have a dynamic framework A that depends upon dynamic framework B, then it's necessary to have A and B added to Embedded Binaries.

    Note that if the dynamic framework A depends upon any static library or framework, you will almost certainly be forced to create A as an umbrella framework that includes the dependant binaries.

    Other considerations that may or may not be important. However did personally for me result in success were;

    • paths of each dynamic library in the Inspector were set to "Relative to Group". In the screen grab above the path of the embedded binary appears correct terminating with "build/Debug-iphoneos".

    • dynamic frameworks are in embedded binaries section. Static libs and static libs wrapped up as frameworks are in Linked Frameworks and Libraries. Nothing appears in both sections.

    In setting this up XCode behaved strangely. The following proved successful:

    1. Add the dynamic framework to the embedded binaries.
    2. Find the new framework in XCode groups on the left and update the path to be "Relative to Group" as described previously.
    3. Delete the dynamic framework from embedded binaries.
    4. Add the dynamic framework to the embedded binaries again. The path should now appear correctly.
    5. Delete all references to the dynamic framework from the Linked Frameworks and Libraries section.

提交回复
热议问题