What is causing this Crashlytics compile warning? (Auto-Linking supplied '…' framework linker option at '…' is not a dylib)

前端 未结 6 1282
你的背包
你的背包 2020-12-03 04:05

Compiling my main target (not a test target like here) yields this error:

ld: warning: Auto-Linking supplied 
   \'~/Documents/my_app/MyApp/Crashlytics.frame         


        
相关标签:
6条回答
  • 2020-12-03 04:42

    Conversely to what I'L'I and user3517250 mention, the problem might also be that you have #import statements that shouldn't be there.

    Xcode does infer the frameworks to link against from the #import statements. If you import a framework that you don't link against, then you get this warning.

    0 讨论(0)
  • 2020-12-03 04:51

    For future reference, this can also happen if you link your test files to your app target.

    For example: https://github.com/realm/realm-cocoa/issues/1661

    0 讨论(0)
  • 2020-12-03 04:51

    I had the same problem. Maybe I messed up the initial fabric install but once I added Fabric.framework to the list of frameworks (should be in the root folder of your app by default) everything worked.

    0 讨论(0)
  • 2020-12-03 04:52

    I followed all steps provided by @i'L'i but I was not able to find Crashlytics.framework and Fabric.framework file in build phases.

    So this helped me.

    Step 1: Follow all the steps given Here.

    Step 2: Now when you are unable to find Crashlytics.framework and Fabric.framework files in Link Binary With Libraries by clicking + do following.

    2.1: Click on + button in Link Binary With Libraries.
    2.2: Click on Add Other... button.
    2.3: Now chose Crashlytic.framework and Fabric.framework from Pod folder - if using cocoapods, else choose both file from where you have downloaded it.

    Step 3: Build Succeeded, Enjoy. :)

    0 讨论(0)
  • 2020-12-03 04:53

    I had the same issue but my reason was different.

    Error Output

    ld: warning: Auto-Linking supplied '~/GameFolder/Pods/Fabric/tvOS/Fabric.framework/Fabric', framework linker option at ~/GameFolder/Pods/Fabric/tvOS/Fabric.framework/Fabric is not a dylib Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_Answers", referenced from: type metadata accessor for __ObjC.Answers in GameScene.o type metadata accessor for __ObjC.Answers in AppDelegate.o "_OBJC_CLASS_$_Crashlytics", referenced from: type metadata accessor for __ObjC.Crashlytics in AppDelegate.o "_OBJC_CLASS_$_Fabric", referenced from: type metadata accessor for __ObjC.Fabric in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Reason

    • My target was overriding the OTHER_LDFLAGS.

    Solution

    • Changed the OTHER_LDFLAGS to just inherit the Linker Flags. Basically, changed it to $(inherited)
    0 讨论(0)
  • 2020-12-03 05:02

    The Missing Link:

    This error is almost always produced by not having the binary linked to the library (In this case it would be the Crashlytics.framework):

    Link Fail

    Trying to build the target MyApp (which includes headers with #import <Crashlytics/Crashlytics.h> will produce the error:

    ld: warning: Auto-Linking supplied '../../Crashlytics.framework/Crashlytics', framework linker option at ../../Crashlytics.framework/Crashlytics is not a dylib

    Link the Framework:

    Link Success Fortunately, it should be easy to fix the problem simply by dragging the Crashlytics.framework from the Frameworks folder in the project navigator into the list of Link Binary With Libraries or by using the +.

    • Make sure you have your App selected/highlighted under Targets while doing this process.

    enter image description here

    0 讨论(0)
提交回复
热议问题