通过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)
如何修复这些错误?
答案 0 :(得分:0)
我们发现将Apptentive cocoa pod添加到现有的Xcode项目可能不会包含我们需要的一些框架。
检查链接器标志:
Target > Build Settings > Other Linker Flags
您应该看到-lApptentiveConnect
列为链接器标记:
... -ObjC -lApptentiveConnect ...
您还应该看到我们列出的所需框架:
的UIKit
-ObjC -lApptentiveConnect -framework Accelerate -framework CoreData -framework CoreGraphics -framework CoreText -framework Foundation -framework QuartzCore -framework SystemConfiguration -framework UIKit -framework CoreTelephony -framework StoreKit