7

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

NullPointerException
  • 36,107
  • 79
  • 222
  • 382

2 Answers2

12

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

NullPointerException
  • 36,107
  • 79
  • 222
  • 382
  • I tried almost everything on that solution. But nothing solved my problem. can you be a little more specific about the solution? – Rubaiyat Jahan Mumu Nov 04 '20 at 17:04
  • @RubaiyatJahanMumu I simply search the scheme that gives me the problem, and excluded arm64 from that scheme, as shown in the linked answer I added in my own answer – NullPointerException Nov 12 '20 at 17:27
5

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

norbDEV
  • 4,795
  • 2
  • 37
  • 28