Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova: Unexpected Machine Code - Your upload contains both bitcode and native machine code

I'm building an iOS Cordova app. And when I upload it to the iTunes Connect it returns the following error.

Unexpected Machine Code - Your upload contains both bitcode and native machine code. When you provide bitcode, it's not necessary to include machine code as well. To reduce the size of your upload, use Xcode 7.3 or later, or any other toolchain that removes machine code.

I've changed quite a lot of settings in config.xml today so I'm not sure whether I've did something wrong and is it some kind of a new iTunes Connect thing.

As I understand it's quite easy to fix it changing some settings in Xcode, but I would like to avoid touching Xcode — is there any way to fix it using the config.xml?

Thank you

UPDATE

Well, it seems to be an Apple issue — I was able to submit a build with such a warning to the TestFlight, actually test it through the TestFlight and submit it to the AppStore. It hasn't passed the Apple review yet, but I believe it will be ok, as typically, in the case of any real problems with the binary the build is rejected immediately.

UPDATE 2

The app with such a warning (actually 3 apps) has actually passed the AppStore review and went on sale. So I believe the issue can be safely ignored.

like image 503
Dmitry Sokurenko Avatar asked Jun 27 '16 20:06

Dmitry Sokurenko


People also ask

What type of code is compiled into machine code?

Typically an assembly code is compiled into a machine code. This machine code can also be called native code or executable binary. CPU understands only the machine code and nothing else. Therefore, every other higher level language or code has to be compiled to machine code to be executed.

What is bytecode and machine code?

Bytecode is a relative of machine code. Like machine code, it's not human readable. However, unlike machine code, rather than being fed directly to a microprocessor, the codes are read by a piece of software that translates byte code to machine code for instruction.

Is Java bytecode machine independent or processor independent?

This byte code is an machine independent code. The Java bytecode is processed by the Java virtual machine (JVM) instead of the processor.

What is the difference between native code and machine code?

Both native code and machine code refer to machine language instructions that are directly executable on existing CPU hardware. It is generated by either a compiler (for high-level language source code) or an assembler (for assembly language source code.


2 Answers

Posting an answer myself, as it seems to be quite a popular question with nobody answering — so the issue is on the Apple side. Some people contacted Apple support and confirmed this. There is no need to recompile anything. The binary with such a warning can be submitted to the AppStore — it will pass the review successfully. I've already did it with a few apps.

Check more details here: "Unexpected Machine Code" warning from iTunes Connect

like image 107
Dmitry Sokurenko Avatar answered Oct 05 '22 00:10

Dmitry Sokurenko


I've found this thread:

https://forums.developer.apple.com/thread/50328

suggesting to set Enable Bitcode to NO but in my case it already was on NO and still got this message... :-\

however, another guy said:

"It's happening to me as well. On stack overflow someone's says they called iTC and it's a problem on their side."

so I hope it has no effect, and it'll gone as it appeared...

like image 23
Aviram Netanel Avatar answered Oct 05 '22 00:10

Aviram Netanel