Xcode 8: Symbol not found for arm64 architecture for containers

After upgrading to Xcode 8, the application will not run on devices, only on the simulator. Errors are issued for all modules added to the project:

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) 

For each of the files, this warning is also issued:

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

The active architectures are in order, I tried to delete the folder with the derived data, reinstall the containers, install Build Active Architect only on YES and NO, but nothing works.

My subfile is as follows:

 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 
+5
source share
3 answers

Try clearing Xcode caching:

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

Clear CocoaPods caches and reinstall dependencies:

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

Finally, go to the Pods project and set Active Architecture Only to No, also for the Debug configuration.

Link fooobar.com/questions/708231 / ...

+7
source

Please use the swap code below.

 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 

// Some cocoapod libraries support minimal support for IO9.0. So, try targeting deployments up to 9.0 and check out the entire supported cocoapod swift3.0 library. after editing the pod file, updating the pod.

0
source

"The OPN target [Debug] overrides the OTHER_LDFLAGS assembly setting." That was the main question. After adding $ (inherited) in a new line in other linker flags, my problem is resolved.

enter image description here

0
source

Source: https://habr.com/ru/post/1257728/


All Articles