【问题标题】:Link Errors with Parse.framework iOSParse.framework iOS 的链接错误
【发布时间】:2013-08-19 17:44:21
【问题描述】:

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

这是我得到的错误:

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)

【问题讨论】:

  • 现在我唯一的代码行是在应用程序委托中。首先是引用框架#import <Parse/Parse.h>[Parse setApplicationId:@"appID" clientKey:@"clientID"];

标签: ios frameworks automatic-ref-counting parse-platform


【解决方案1】:

确保链接到项目中的 SystemConfigurationSecurity 框架。有关详细信息,请参阅this question。正如 Hector 在 cmets 中指出的那样,Parse 所需的所有框架都可以在 iOS Quick Start Guide 中找到。

  • AudioToolbox.framework
  • CFNetwork.framework
  • CoreGraphics.framework
  • CoreLocation.framework
  • libz.1.1.3.dylib
  • MobileCoreServices.framework
  • QuartzCore.framework
  • Security.framework
  • StoreKit.framework
  • SystemConfiguration.framework

【讨论】:

  • 啊,错过了!非常感谢!
  • 好的,谢谢。可能应该看起来更近一点。谢谢。
  • 我还需要 MobileCoreServices。
  • iOS 快速入门指南parse.com/apps/quickstart 应涵盖所有必需的框架
  • 我看得太快了。谢谢大家!我完全不负责任。
【解决方案2】:

除了这些框架之外,从您的项目中添加 MobileCoreServices.framework

-Accounts.framework

-AudioToolbox.framework

-CFNetwork.framework

-CoreGraphics.framework

-CoreLocation.framework

-libz.dylib

-MobileCoreServices.framework

-QuartzCore.framework

-Security.framework

-Social.framework

-StoreKit.framework

-SystemConfiguration.framework

【讨论】:

  • 尽管将所有这些都添加到项目中,但这对我不起作用
【解决方案3】:

我必须在 Build SettingsFramework Search Paths 中添加“$(inherited)”才能使其工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-04-05
    • 2013-10-30
    • 1970-01-01
    • 1970-01-01
    • 2015-05-19
    • 2013-03-14
    • 1970-01-01
    • 2015-12-15
    相关资源
    最近更新 更多