gpt4 book ai didi

macos - OSX 链接错误的 Fabric 答案

转载 作者:行者123 更新时间:2023-12-04 09:58:39 27 4
gpt4 key购买 nike

尝试使用刚刚宣布的 Answers OSX平台框架:

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

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

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

并得到一堆错误:
...
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)

最佳答案

那是因为 Crashlytics框架已经包含 Answers框架本身。你只需要这样做:

播客文件:

pod 'Fabric'
pod 'Crashlytics'

你的 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]]];
...
}

关于macos - OSX 链接错误的 Fabric 答案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34887387/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com