Asked  7 Months ago    Answers:  5   Viewed   37 times

This crash has been a blocking issue I used the following steps to reproduce the issue:

  • Create a Cocoa Touch Framework project
  • Add a swift file and a class Dog
  • Build a framework for device
  • Create a Single View application in Swift
  • Import framework into app project
  • Instantiate swift class from the framework in ViewController
  • Build and run an app on the device

The app immediate crashed upon launching, here is console log:

dyld: Library not loaded: @rpath/FrameworkTest03.framework/FrameworkTest03
  Referenced from: /var/mobile/Applications/FA6BAAC8-1AAD-49B4-8326-F30F66458CB6/
  Reason: image not found

I have tried to build on iOS 7.1 and 8.0 devices, they both have the same crash. However, I can build an app and run on the simulator fine. Also, I am aware that I can change the framework to form Required to Optional in Link Binary With Libraries, but it did not completely resolve the problem, the app crashed when I create an instance of Dog. The behavior is different on the device and simulator, I suspect that we can't distribute a framework for the device using a beta version of Xcode. Can anyone shed light on this?



In the target's General tab, there is an Embedded Binaries field. When you add the framework there the crash is resolved.

Reference is here on Apple Developer Forums.

Tuesday, June 1, 2021
answered 7 Months ago

This will happen, when the Always Search User Paths setting is enabled for the Framework target.

Setting it to No will resolve that error.

IMHO this is a bug in the Swift Compiler and I have filed a radar with Apple.
See rdar://21038443

Sunday, June 27, 2021
answered 6 Months ago

I contacted Apple with this issue and found a solution to my problem. Apple's Technical support made it clear, that I need to add the FrameworkB.xcodeproj to my application project, so my project structure is:

  • FrameworkTest.xcodeproj (the app project)
    • FrameworkA.xcodeproj (Cocoa Touch Framework)
      • FrameworkB.xcodeproj (Cocoa Touch Framework)
    • FrameworkB.xcodeproj (Cocoa Touch Framework)

When I have done this the application project can include FrameworkB.framework as an Embedded Library: FrameworkTest.xcodeproj build phases

This solved my problem and made it possible to run it on an iOS device.

If the build crashes on Release: Revoke your Enterprise Distribution certificate and create a new one to solve the problem. Once I did that it worked perfectly.

Friday, July 23, 2021
answered 5 Months ago

Checked the following terms,

  1. Make sure Crashlytics SDK line is after all other 3rd-party SDK lines. (it needs to be last one called in your appDidFinishLaunching method.)

  2. Force a crash and then relaunch the app. Xcode must be disconnected to stop it from intercepting the crash report. To disconnect Xcode, follow the instructions here.

  3. If you're using [Crashlytics sharedInstance] crash]; to test crashing, make sure it's not in the appDidFinishLaunching method.

These are already mentioned in support section, Here is additional ones -

  1. Check in organization -> Your App -> Missing dSYM, Is it showing any missing dSYM file

enter image description here

if yes, Then do the following step

  1. Right Click on your archive -> Show in Finder -> Right click on file and click on Show package contents
  2. Right click on dSYM file - > Show package contents -> Contents -> Resources -> DWARF (Open in terminal)
  3. Run command dwarfdump --uuid "file name you saw there in dwarf folder"

enter image description here

This will show all the associated UUID, And if any listed UUID matched with the one mentioned in missing dSYM id then just compress the dSYM folder and upload it on crashlytics Missing dSYM segment.

This step is important cause sometimes the dSYM file we extract from organizer doesn't contain correct UUID. And after uploading the wrong one we wait for its updations. So it's better to make sure you are uploading the right dSYM file.

Other than aforementioned things, Bitcode property and Debug Information Format in Build Settings also affect the crash reporting.

Friday, July 30, 2021
answered 4 Months ago

If you're targeting iOS versions less than 6.0, you'll need to make AdSupport.framework, Social.framework, and Accounts.framework optionally-linked.

Please have a look at the attached screenshot.

Cheers!!!enter image description here

Sunday, August 8, 2021
answered 4 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :