Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fabric Answers for OSX link error

Tried to use just annonced Answers framework for OSX platform:

pod 'Fabric'
pod 'Answers'
pod 'Crashlytics'

#import <Fabric/Fabric.h>
#import <Answers/Answers.h>
#import <Crashlytics/Crashlytics.h>

[Fabric with:@[[Crashlytics class], [Answers class]]];

And got bunch errors:

...
duplicate symbol _OBJC_METACLASS_$_CLSAnswersInviteEvent in:
/Users/k06a/Projects/UXMaterial/Pods/Answers/OSX/Answers.framework/Answers(CLSAnswersInviteEvent.o)
/Users/k06a/Projects/UXMaterial/Pods/Crashlytics/OSX/Crashlytics.framework/Crashlytics(CLSAnswersInviteEvent.o)
ld: 200 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
like image 280
k06a Avatar asked Jan 19 '16 21:01

k06a


1 Answers

Thats because Crashlytics framework already contains Answers framework inside itself. You just need to do this:

Podfile:

pod 'Fabric'
pod 'Crashlytics'

Your AppDelegate.m:

#import <Fabric/Fabric.h>
#import <Crashlytics/Answers.h>
#import <Crashlytics/Crashlytics.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    ...
    [Fabric with:@[[Crashlytics class], [Answers class]]];
    ...
}
like image 79
k06a Avatar answered Oct 04 '22 21:10

k06a