ERROR ITMS-90085 when validating archive only in Xcode 10

When I archive my iOS app in Xcode 10 and then validate, I get this error:


ERROR ITMS-90085: “No architectures in the binary. Lipo failed to detect any architectures in the bundle executable.”


I have checked the executable with lipo and I can see that both arm architectures are present. I have Googled around and tried a few other things associated with this error: I checked that all Product Names are set correctly, I have verified that no static libs are being embedded in a framework, I checked that all CFBundleExecutable values for Frameworks' Info.plist files match up to their respective binaries.


I also tried archiving and validating in Xcode 9. That passes validation. I also tried validating that Xcode 9 archive with Xcode 10, that also passes!


So it seems that something is different with how Xcode 10 makes archives, or how it validates them. How do I fix this? The error message is completely unhelpful.

Accepted Reply

I figured it out. The error message was right, actually, just a little vague.


We are using a common script to remove unused architectures from our app before submission. This script was actually provided to us by Localytics, since they ship a framework we need that includes simulator architecures that the app store would reject. This script removes all architectures from fat binaries other than those in the ARCHS build variable.


The problem? The ARCHS variable for your main app (the one that gets archived) doesn't include watch architectures. The script worked for Xcode 9 by accident, because before Xcode 10 watch frameworks weren't fat. So the script would skip over them. But now, they are fat, and they don't include armv7 and arm64 (they have armv7k and arm64_32), so the script removes them entirely and you end up with missing architectures in your archive.


The solution: I rewrote the script so that rather than only keeping what was in ARCHS, it only removes i386 and x86_64 architectures. That way the new watch frameworks are preserved.

Replies

Legacy or new build system?


Performed an option-clean build folder?

I figured it out. The error message was right, actually, just a little vague.


We are using a common script to remove unused architectures from our app before submission. This script was actually provided to us by Localytics, since they ship a framework we need that includes simulator architecures that the app store would reject. This script removes all architectures from fat binaries other than those in the ARCHS build variable.


The problem? The ARCHS variable for your main app (the one that gets archived) doesn't include watch architectures. The script worked for Xcode 9 by accident, because before Xcode 10 watch frameworks weren't fat. So the script would skip over them. But now, they are fat, and they don't include armv7 and arm64 (they have armv7k and arm64_32), so the script removes them entirely and you end up with missing architectures in your archive.


The solution: I rewrote the script so that rather than only keeping what was in ARCHS, it only removes i386 and x86_64 architectures. That way the new watch frameworks are preserved.