链接错误与解析框架iOS

我尝试在我的项目中导入解析框架.我确定它是喜欢我的项目,我找不到任何关于它是否“电弧敏感”.我的项目是基于弧的.

这是我得到的错误

Undefined symbols for architecture i386:
  "_SCNetworkReachabilityCreateWithName",referenced from:
      -[PFCommandCache init] in Parse(PFCommandCache.o)
      +[PFInternalUtils(Reachability) isParseReachable] in Parse(PFInternalUtils.o)
  "_SCNetworkReachabilityGetFlags",referenced from:
      ___22-[PFCommandCache init]_block_invoke in Parse(PFCommandCache.o)
      +[PFInternalUtils(Reachability) isParseReachable] in Parse(PFInternalUtils.o)
  "_SCNetworkReachabilityScheduleWithRunLoop",referenced from:
      -[PFCommandCache init] in Parse(PFCommandCache.o)
  "_SCNetworkReachabilitySetCallback",referenced from:
      -[PFCommandCache init] in Parse(PFCommandCache.o)
  "_SCNetworkReachabilityUnscheduleFromrunLoop",referenced from:
      -[PFCommandCache dealloc] in Parse(PFCommandCache.o)
  "_SecItemAdd",referenced from:
      +[PFInternalUtils savetoKeychain:data:] in Parse(PFInternalUtils.o)
  "_SecItemcopyMatching",referenced from:
      +[PFInternalUtils loadFromKeychain:] in Parse(PFInternalUtils.o)
  "_SecItemDelete",referenced from:
      +[PFInternalUtils savetoKeychain:data:] in Parse(PFInternalUtils.o)
      +[PFInternalUtils deleteFromKeychain:] in Parse(PFInternalUtils.o)
  "_UTTypecopyPreferredTagWithClass",referenced from:
      -[PFFile getMimeType] in Parse(PFFile.o)
  "_UTTypeCreatePreferredIdentifierForTag",referenced from:
      -[PFFile getMimeType] in Parse(PFFile.o)
  "_kcfStreamPropertyFTPAttemptPersistentConnection",referenced from:
      -[PFHTTPCommand scheduleInCurrentThread] in Parse(PFHTTPCommand.o)
  "_kcfStreamPropertyHTTPAttemptPersistentConnection",referenced from:
      -[PFHTTPCommand scheduleInCurrentThread] in Parse(PFHTTPCommand.o)
  "_kSecAttrAccessible",referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecAttrAccessibleAfterFirstUnlock",referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecAttrAccount",referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecAttrService",referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecclass",referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecclassGenericPassword",referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecMatchLimit",referenced from:
      +[PFInternalUtils loadFromKeychain:] in Parse(PFInternalUtils.o)
  "_kSecMatchLimitOne",referenced from:
      +[PFInternalUtils loadFromKeychain:] in Parse(PFInternalUtils.o)
  "_kSecReturnData",referenced from:
      +[PFInternalUtils loadFromKeychain:] in Parse(PFInternalUtils.o)
  "_kSecValueData",referenced from:
      +[PFInternalUtils savetoKeychain:data:] in Parse(PFInternalUtils.o)
  "_kUTTagClassFilenameExtension",referenced from:
      -[PFFile getMimeType] in Parse(PFFile.o)
  "_kUTTagClassMIMEType",referenced from:
      -[PFFile getMimeType] in Parse(PFFile.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command Failed with exit code 1 (use -v to see invocation)

解决方法

确保您链接到项目中的SystemConfiguration和安全框架.详见 this question.正如Hector在评论中指出的那样,所有需要解析的框架都可以在 iOS Quick Start Guide中找到.

> AudioToolBox.framework> CFNetwork.framework> CoreGraphics.framework> CoreLocation.framework> libz.1.1.3.dylib> MobileCoreServices.framework> QuartzCore.framework>安全框架> StoreKit.framework> SystemConfiguration.framework

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...