williamrijksen / com.williamrijksen.onesignal

Titanium Appcelerator Library for OneSignal Push Notifications Service
Other
51 stars 43 forks source link

[iOS] ERROR ITMS-90087: "Unsupported Architectures" When submitting to App Store #84

Closed chmiiller closed 5 years ago

chmiiller commented 5 years ago

ERROR ITMS-90087: "Unsupported Architectures. The executable for BCVI CME.app/Frameworks/OneSignal.framework contains unsupported architectures '[x86_64, i386]'."

screen shot 2019-02-26 at 14 18 20

I'm getting this error when submitting the .IPA file to App Store with Application Loader. The app was built with these: Titanium SDK: 7.5.1 Xcode: 10.1 iOS SDK: 12.1 Module version: 2.1.1

Just for a comparison, building the same app, with the same iOS, Xcode and Ti SDK but with version 2.0.1 of the module, the app passes the Application Loader tests for architectures. Reading more about this problem I've found that architectures x86_64 and i386 should be taken off from the framework when building a release version for production. I've also noticed that the file module.xcconfig has been updated in the latest version and some framework configurations removed in this commit: https://github.com/williamrijksen/com.williamrijksen.onesignal/commit/3be48a0a68affaf32269069c1e65c965c5cc9d91#diff-c510934c52eeca76e1979f708fba34d7L25

But even when I kept these configurations and rebuild the module and app and try to submit it again it gives the same error, so maybe the problem is in the carthage or in the .framework itself. Does someone have any idea?

Thanks!

chmiiller commented 5 years ago

Found the problem!

Our CI/CD system is not going through all Build Phases of Titanium archive command for some reason which will include a Frameworks Stripping. But when we build it locally on our mac machines it just works and strips out simulator architectures from Frameworks including One Signal's.

With some more deep investigation we found that it doesn't do it because the framework is Code Signed and stripping these architectures will break the code signing authenticity.

"But why One Signal's framework is code signed in these v2.1 versions of the module?" Because we've (@janvennemann) implemented a better way of updating the iOS SDK by using this Carthage tool and it will sign (and wrap) it before generating the framework file.

TL;DR -> If you have this problem in your build infrastructure, don't use Carthage to update the iOS SDK, but copy and paste the OneSignal.framework manually yourself to the module. We did it with version 2.9.5 and the app is just fine =)

Thanks everyone!