Fabric 和 Digits pod 在 Xcode 7 和 Swift 2.0 中的工作区失败

Posted

技术标签:

【中文标题】Fabric 和 Digits pod 在 Xcode 7 和 Swift 2.0 中的工作区失败【英文标题】:Fabric and Digits pods failing workspace in Xcode 7 and Swift 2.0 【发布时间】:2015-09-25 07:39:41 【问题描述】:

我更新到 Xcode 7 并修复了 Swift 2.0 的必要代码(语法)更改。我用这两个条目更新了我的 Podfile:

  pod 'Fabric'
  pod 'Digits'

现在看到许多构建错误(粘贴在下面)。有什么想法吗?

我运行 sudo gem install cocoapods 来更新我的 Cocoapods,然后运行 ​​pod installpod update 来安装“Fabric”和“Digits”豆荚。

注意:在更新到 Xcode 7 之前,我使用 Digits 的项目正在构建并正常工作!

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_FABJLObjectDeserializer", referenced from:
      objc-class-ref in DigitsKit(DGTUserNetworking.o)
      objc-class-ref in DigitsKit(DGTAuthNetworking.o)
  "_OBJC_CLASS_$_FABJLObjectSerializer", referenced from:
      objc-class-ref in DigitsKit(DGTAuthNetworking.o)
  "_OBJC_CLASS_$_TFSScribe", referenced from:
      objc-class-ref in DigitsKit(Digits.o)
  "_OBJC_CLASS_$_TWTRAPIResponseValidator", referenced from:
      objc-class-ref in DigitsKit(DGTNetworkingHelper.o)
  "_OBJC_CLASS_$_TWTRAuthConfig", referenced from:
      objc-class-ref in DigitsKit(Digits.o)
  "_OBJC_CLASS_$_TWTRColorUtil", referenced from:
      objc-class-ref in DigitsKit(DGTAppearance.o)
  "_OBJC_CLASS_$_TWTRCoreLanguage", referenced from:
      objc-class-ref in DigitsKit(DGTAuthNetworking.o)
  "_OBJC_CLASS_$_TWTRDictUtil", referenced from:
      objc-class-ref in DigitsKit(DGTLogInAuthConfiguration.o)
      objc-class-ref in DigitsKit(DGTDeviceRegisterConfiguration.o)
  "_OBJC_CLASS_$_TWTRGuestSessionRefreshStrategy", referenced from:
      objc-class-ref in DigitsKit(Digits.o)
  "_OBJC_CLASS_$_TWTRKeychainWrapper", referenced from:
      objc-class-ref in DigitsKit(DGTSessionMigrator.o)
  "_OBJC_CLASS_$_TWTRNetworkingPipeline", referenced from:
      objc-class-ref in DigitsKit(DGTNetworkingHelper.o)
  "_OBJC_CLASS_$_TWTRResourcesUtil", referenced from:
      objc-class-ref in DigitsKit(DGTURLSessionConfig.o)
      objc-class-ref in DigitsKit(DGTResourcesUtil.o)
  "_OBJC_CLASS_$_TWTRScribeClientEventNamespace", referenced from:
      objc-class-ref in DigitsKit(DGTScribeEventLogger.o)
  "_OBJC_CLASS_$_TWTRScribeEvent", referenced from:
      objc-class-ref in DigitsKit(DGTScribeEventLogger.o)
  "_OBJC_CLASS_$_TWTRScribeService", referenced from:
      objc-class-ref in DigitsKit(Digits.o)
  "_OBJC_CLASS_$_TWTRSessionStore", referenced from:
      objc-class-ref in DigitsKit(Digits.o)
  "_OBJC_CLASS_$_TWTRURLSessionDelegate", referenced from:
      objc-class-ref in DigitsKit(DGTNetworkingHelper.o)
  "_OBJC_CLASS_$_TWTRUserSessionVerifier", referenced from:
      objc-class-ref in DigitsKit(DGTSessionVerifier.o)
  "_OBJC_CLASS_$_TWTRUtils", referenced from:
      objc-class-ref in DigitsKit(DGTAuthViewController.o)
      objc-class-ref in DigitsKit(DGTConfirmSignUpViewController.o)
      objc-class-ref in DigitsKit(DGTConfirmLogInViewController.o)
      objc-class-ref in DigitsKit(DGTUploadContactsViewController.o)
      objc-class-ref in DigitsKit(Digits.o)
      objc-class-ref in DigitsKit(DGTConfirmViewController.o)
      objc-class-ref in DigitsKit(DGTContacts.o)
      ...
  "_OBJC_CLASS_$_TwitterNetworking", referenced from:
      objc-class-ref in DigitsKit(DGTUserNetworking.o)
      objc-class-ref in DigitsKit(DGTContactsNetworking.o)
      objc-class-ref in DigitsKit(DGTAuthNetworking.o)
  "_TWTRAPIURLWithPath", referenced from:
      -[DGTUserNetworking verifyUser:completion:] in DigitsKit(DGTUserNetworking.o)
      -[DGTOAuthSigning OAuthEchoHeadersToVerifyCredentialsWithParams:] in DigitsKit(DGTOAuthSigning.o)
      -[DGTContactsNetworking uploadContactVCards:completion:] in DigitsKit(DGTContactsNetworking.o)
      -[DGTContactsNetworking lookupContactMatchesWithCursor:completion:] in DigitsKit(DGTContactsNetworking.o)
      -[DGTContactsNetworking destroyAllContactsWithCompletion:] in DigitsKit(DGTContactsNetworking.o)
      -[DGTAuthNetworking registerDeviceWithPhoneNumber:withVerificationType:completion:] in DigitsKit(DGTAuthNetworking.o)
      -[DGTAuthNetworking confirmAccountWithPhoneNumber:confirmationNumber:completion:] in DigitsKit(DGTAuthNetworking.o)
      ...
  "_TWTRCoreOAuthSigningOAuthEchoHeaders", referenced from:
      -[DGTOAuthSigning OAuthEchoHeadersForRequestMethod:URLString:parameters:error:] in DigitsKit(DGTOAuthSigning.o)
  "_TWTRCoreVersion", referenced from:
      +[Digits assertValidTwitterCoreVersion] in DigitsKit(Digits.o)
  "_TWTRNetworkingErrorDomain", referenced from:
      -[DGTAuthViewController startLogInProcessWithVerificationType:] in DigitsKit(DGTAuthViewController.o)
      -[DGTConfirmSignUpViewController startSignUpProcess] in DigitsKit(DGTConfirmSignUpViewController.o)
      -[DGTConfirmLogInViewController startLogInProcess] in DigitsKit(DGTConfirmLogInViewController.o)
      -[DGTPinCodeFormViewController startVerifyPINCode] in DigitsKit(DGTPinCodeFormViewController.o)
  "_TWTRNetworkingUserAgentHeaderKey", referenced from:
      +[DGTURLSessionConfig defaultAdditionalHeaders] in DigitsKit(DGTURLSessionConfig.o)
  "_TWTRScribeClientEventNamespaceEmptyValue", referenced from:
      -[DGTScribeViewEventLogger viewDidShow] in DigitsKit(DGTScribeViewEventLogger.o)
      -[DGTScribeViewEventLogger viewDidSucceed] in DigitsKit(DGTScribeViewEventLogger.o)
      -[DGTScribeViewEventLogger didShowFailureView] in DigitsKit(DGTScribeViewEventLogger.o)
      -[DGTScribeViewEventLogger errorDidOccurWithCode:] in DigitsKit(DGTScribeViewEventLogger.o)
      +[DGTScribeViewEventLogger scribeViewNameWithScribeView:] in DigitsKit(DGTScribeViewEventLogger.o)
      +[DGTScribeEventLogger digitsUniquesImpressionNamespace] in DigitsKit(DGTScribeEventLogger.o)
      +[DGTScribeEventLogger digitsImpressionNamespace] in DigitsKit(DGTScribeEventLogger.o)
      ...
  "_TWTRScribeEventImpressionClient", referenced from:
      +[DGTScribeEventLogger digitsEventNamespaceWithComponent:element:action:] in DigitsKit(DGTScribeEventLogger.o)
  "_TWTRScribeEventImpressionPage", referenced from:
      +[DGTScribeEventLogger digitsEventNamespaceWithComponent:element:action:] in DigitsKit(DGTScribeEventLogger.o)
  "_TWTRScribeEventUniquesClient", referenced from:
      +[DGTScribeEventLogger digitsUniquesImpressionNamespace] in DigitsKit(DGTScribeEventLogger.o)
  "_TWTRUserSessionVerifierDefaultDelay", referenced from:
      -[DGTSessionVerifier startVerification] in DigitsKit(DGTSessionVerifier.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

【问题讨论】:

【参考方案1】:

我认为问题在于您没有将“TwitterCore”包含到 pod 文件中:

pod 'Fabric'
pod 'Digits'    
pod 'TwitterCore'

【讨论】:

这是 Twitter 最近的变化吗?以前(如在 Xcode 7 升级之前),我使用 pod 'Twitter/Fabric' 并且一切正常。如果您能指出有关 Digits 框架的这些更改,那将很有帮助 - 谢谢! 它工作得很好,因为你使用了这个 pod 的旧版本。但是在 Fabric 1.2 之后,所有框架都分离了。 我也添加了 TwitterCore,但它对我不起作用。任何建议..我正在使用 Xocde 6.4

以上是关于Fabric 和 Digits pod 在 Xcode 7 和 Swift 2.0 中的工作区失败的主要内容,如果未能解决你的问题,请参考以下文章

Fabric 的 Digits.getInstance() 给出 NullPointerException

Android Fabric Twitter 和数字问题

Fabric : /ios/Pods/Fabric/run”: 没有这样的文件或目录

使用 Firebase/Crashlytics 更改 Fabric 和 Crashlytics pod 以上传缺少的必需 dSYM

OSX链接错误的Fabric Answers

Fabric beta 未显示已启动事件