簡體   English   中英

Xcode 8:找不到架構arm64 for pods的符號

[英]Xcode 8: Symbol(s) not found for architecture arm64 for pods

更新到Xcode 8后,該應用程序將無法在設備上運行,僅在模擬器上運行。 添加到項目中的所有pod都會拋出錯誤:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from:
      objc-class-ref in FeedViewController.o
  "_OBJC_CLASS_$_TSMessage", referenced from:
      l_OBJC_$_CATEGORY_TSMessage_$_Override in NotificationMessenger.o
      objc-class-ref in NotificationMessenger.o
  "_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
      objc-class-ref in HTTPSessionTask.o
  "_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from:
      objc-class-ref in HTTPSessionTask.o
  "_OBJC_METACLASS_$_SWTableViewCell", referenced from:
      _OBJC_METACLASS_$_MessagesCell in MessagesCell.o
      _OBJC_METACLASS_$_PaymentMethodCell in PaymentMethodCell.o
      _OBJC_METACLASS_$_SwipeTitleCell in SwipeTitleCell.o
  "_OBJC_CLASS_$_FBRequestConnection", referenced from:
      objc-class-ref in FacebookManager.o
  "_OBJC_CLASS_$_SWTableViewCell", referenced from:
      _OBJC_CLASS_$_MessagesCell in MessagesCell.o
      _OBJC_CLASS_$_PaymentMethodCell in PaymentMethodCell.o
      _OBJC_CLASS_$_SwipeTitleCell in SwipeTitleCell.o
  "_OBJC_CLASS_$_FBRequest", referenced from:
      objc-class-ref in FacebookManager.o
  "_OBJC_CLASS_$_AFURLSessionManager", referenced from:
      objc-class-ref in HTTPSessionTask.o
  "_OBJC_CLASS_$_Branch", referenced from:
      objc-class-ref in MyImpactViewController.o
      objc-class-ref in UINavigationController+Activity.o
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_FBSession", referenced from:
      objc-class-ref in FacebookManager.o
      objc-class-ref in ExternalFacebookCommand.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

對於每個文件,也會拋出此警告:

file was built for archive which is not the architecture being linked (arm64)

活動架構還可以,我已經嘗試刪除派生數據文件夾,重新安裝pod,將Build Active Architectures Only設置為YES和NO,但沒有任何效果。

我的Podfile看起來像這樣:

platform :ios, '8.0'
workspace 'Purple'
target 'Purple' do
pod 'AFNetworking', '2.6.3'
pod 'SAMKeychain', '~> 1.3'
pod 'TSMessages'
pod 'Facebook-iOS-SDK', '~> 3.23.2'
pod 'SWTableViewCell'
pod 'CardIO'
pod 'Parse'
pod 'PureLayout'
pod 'Branch'
pod 'DZNEmptyDataSet'
end

嘗試清除XCode緩存:

rm -rf ~/Library/Developer/Xcode/DerivedData/

清除CocoaPods緩存並重新安裝依賴項:

rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update

最后轉到“Pods”項目並將“Build Active Architectures Only”設置為“No”,以用於“Debug”配置。

參考https://stackoverflow.com/a/37930840/1773009

請使用以下pod代碼。

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ‘9.0’
use_frameworks!

target “NoteCheck” do

    pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => ‘4.0.1’
    pod 'AlamofireNetworkActivityIndicator',    '~> 2.0'
    pod 'AlamofireObjectMapper',        '~> 4.0.0'
    pod 'UIActivityIndicator-for-SDWebImage',   '~> 1.2'
    pod 'SVProgressHUD'         ,:git => 'https://github.com/SVProgressHUD/SVProgressHUD.git'
    pod 'Reachability',             '~> 3.2'
    pod 'SwiftyJSON',               '~> 3.0.0'
    pod 'ObjectMapper' ,            '~> 2.0'
    pod 'SDWebImage',               '~> 3.8'

    pod 'SZTextView',               '~> 1.2'
    pod 'TPKeyboardAvoiding',           '~> 1.3'
    pod 'FXBlurView' ,              '~> 1.6.4'
    pod 'AMSmoothAlert',            '~> 1.0'

    pod 'DGElasticPullToRefresh',       '~> 1.1'
end

//某些cocoapod庫支持最低IO9.0支持。 因此,請嘗試將部署目標最小化為9.0並檢查所有cocoapod swift3.0支持的庫。 編輯pod文件后,更新pod。

“OPN [Debug]目標會覆蓋OTHER_LDFLAGS構建設置”。 這是主要問題。 在其他鏈接器標志的新行中添加$(繼承)解決了我的問題。

在此輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM