Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: module was created for incompatible target arm64-apple-ios8.0

There is a website called Appetize that needs an .app bundle (a iOS Simulator build of your app) for displaying your app in a online simulator.

Here is the guide of the app bundle required: https://support.appetize.io/help/how-to-upload-an-app-to-appetize-io

This is the command for generating the .app bundle:

xcodebuild -sdk iphonesimulator -workspace Project.xcworkspace -scheme Appetize -configuration Debug

When you press the Build & Run button in Xcode and open the app in a Simulator, it works perfectly, but if you try to generate an .app bundle for Appetize with xcodebuild in command line, you get this crash (This worked perfectly with Xcode 11, but after updating to Xcode12 and last cocoapods 1.9.3, the problem has appeared):

error: module 'DeviceKit' was created for incompatible target arm64-apple-ios8.0

like image 312
NullPointerException Avatar asked Sep 23 '20 21:09

NullPointerException


2 Answers

Finally I solved the problem using this approach:

Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

In that post they don't have the same crash, but some of the solutions posted works here too.

It's necessary to exclude arm64 for simulator architecture in the scheme with the problem, in my case, appetize

like image 120
NullPointerException Avatar answered Sep 27 '22 21:09

NullPointerException


I use Carthage (with the Xcode12 workaround) and I solved it with NPE's answer.

I added the arm64 to the Project's Build Settings not the Targets

Xcode Project's Build Settings

like image 42
norbDEV Avatar answered Sep 27 '22 22:09

norbDEV