8

These errors are really confusing me, and I have no idea what I did to trigger them:

ld: warning: directory not found for option '-F/"..."'
ld: warning: ignoring file "..."/iOS 7/Crashlytics.framework/Crashlytics, file was built for unsupported file format ( 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x43 0x75 0x72 0x72 0x65 0x6E 0x74 ) which is not the architecture being linked (i386): /"..."/Crashlytics.framework/Crashlytics
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_Crashlytics", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I haven't a sweet clue what it is talking about. How do I fix it?

3
  • Are you using Xcode 5?
    – Refael.S
    Jan 6, 2014 at 2:16
  • do you have a device to try your project? as Guilherme Torres Castro suggested?
    – Refael.S
    Jan 6, 2014 at 2:19
  • 1
    I think you have a problem with paths in Build Settings
    – Refael.S
    Jan 6, 2014 at 2:20

3 Answers 3

29

From Crashlytics support:

  1. Trash Crashlytics.framework from your project.

  2. Run this in the terminal to copy the framework to your desktop:

ditto -xk /Applications/Fabric.app/Contents/Resources/com.crashlytics.sdk.ios-default.zip ~/Desktop/

  1. Add & copy the framework back into your project.
6
  • thanks! Any idea what happened in the first place? Mine broke literally in between executions.
    – rob5408
    Jul 6, 2014 at 23:13
  • Yeah, that's happened to me too. Crashlytics uses a run script and does some fancy-dancy stuff each time you build+run. My guess would be something goes wrong when the run-script gets interrupted (hitting 'stop') and it's left unfinished / broken.
    – capikaw
    Jul 7, 2014 at 14:55
  • I had a great exchange with a Crashlytics tech who said, "This usually happens when the symbolic links used by our framework are broken. Dropbox often breaks symbolic links, but it can happen through other tools as well. Are you using Dropbox by chance?" As soon as he mentioned Dropbox I realized that was my problem. He said they told Dropbox and they have no plans to not break symlinks. Oh well.
    – rob5408
    Jul 14, 2014 at 3:24
  • @rob5408, I agree, this may be more common with projects stored in a Dropbox.
    – capikaw
    Oct 9, 2014 at 20:10
  • The command didn't run so I had to download it from github.com/bpoplauschi/CrashlyticsFramework And copy crashlytics.framework to my project
    – Ali Amin
    Mar 7, 2015 at 16:17
2

I was using Crashlytics with cocoapods and confronted the same error after upgrading to Fabric.

Steps to fix:

  1. Delete "Other linker flags" and paste $(inherited) in it
  2. Delete "Other librarian flags" and paste $(OTHER_LDFLAGS)
  3. Delete Crashlytics.framework from the Pods directory
  4. Run pod install. You will see something like this in the "./Pods/Fabric/Crashlytics.framework/Versions/A/Resources/info.plist

enter image description here

0
-5

The version of the framwork you are linking to the project is build only for Device. Use fabric desktop application to link the correct framework to your project.

3
  • Not true, Crashlytics does work in the simulator. See the answer by capikaw.
    – Clafou
    Aug 20, 2014 at 19:59
  • This is simply not true. Crashlytics does not capture crash reports if the debugger is attached when using the simulator, but this does not throw any errors when building. dev.twitter.com/crashlytics/ios
    – ingh.am
    Jun 23, 2015 at 9:42
  • I edited my answer to cover the fact that Crashlytics support simulator, but the Framework he was linking with his project was wrong. May 13, 2016 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.