通过Cocoapods集成Apptentive iOS SDK时出现未定义的符号错误

时间:2013-12-31 23:22:42

标签: ios xcode frameworks cocoapods apptentive

通过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)

如何修复这些错误?

1 个答案:

答案 0 :(得分:0)

我们发现将Apptentive cocoa pod添加到现有的Xcode项目可能不会包含我们需要的一些框架。

检查链接器标志:

Target > Build Settings > Other Linker Flags

您应该看到-lApptentiveConnect列为链接器标记:

... -ObjC -lApptentiveConnect ...

您还应该看到我们列出的所需框架:

  • 加速
  • CoreData
  • CoreText
  • CoreGraphics中
  • CoreTelephony
  • 粉底
  • QuartzCore
  • StoreKit
  • SystemConfiguration
  • 的UIKit

    -ObjC -lApptentiveConnect -framework Accelerate -framework CoreData -framework CoreGraphics -framework CoreText -framework Foundation -framework QuartzCore -framework SystemConfiguration -framework UIKit -framework CoreTelephony -framework StoreKit