通过 Cocoapods 集成 Apptentive iOS SDK 时,出现以下错误:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ATConnect", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_ATAppRatingFlow", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_ATSurveys", 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)
应该如何修复这些错误?
最佳答案
我们发现,将 Apptentive cocoa pod 添加到现有 Xcode 项目中可能不包含我们需要的一些框架。
检查您的链接器标志:
Target > Build Settings > Other Linker Flags
您应该看到
-lApptentiveConnect
列为链接器标志:... -ObjC -lApptentiveConnect ...
您还应该看到我们列出的所需框架:
-ObjC -lApptentiveConnect -framework Accelerate -framework CoreData -framework CoreGraphics -framework CoreText -framework Foundation -framework QuartzCore -framework SystemConfiguration -framework UIKit -framework CoreTelephony -framework StoreKit
关于ios - 通过 Cocoapods 集成 Apptentive iOS SDK 时出现 undefined symbol 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20864172/