简体   繁体   中英

App crashes while running the archived exported .ipa but works on simulator and side loading the app onto device

I'm currently using Xcode 7 Beta 6 and the app works on the simulator and the device when I deploy directly using my developer's certificate. However, when I try to create an IPA file using the Archive feature, the app is not able to launch from the device. It's crashing and complaining that the custom frameworks are not loaded / no suitable image found. The following is a screenshot from the crash log [removed some unnecessary information]:

在此处输入图片说明

I tried archiving with the enterprise certificate and the developer's certificate and both give the same issue. Can someone help? I tried several suggested solutions from online forums but they didn't work for me:

  • Added the custom frameworks to embedded Binaries and link binaries with libraries
  • The build phase also copies the frameworks to the frameworks folder
  • Checked on the framework search path
  • Tried installing on iPhone 5 rather than iPhone 6+ and the same issue occurs
  • Checked on the architecture of the frameworks on command line
  • The frameworks are also packaged in the IPA
  • Tried creating a simple Hello World app and generated the IPA successfully. The app launches on the device with the enterprise profile, so this tells me that the certs are working.

Further thing to note is that there are no entitlements associated with the custom frameworks when I export the Archive on the Organizer tool. I am not sure if we are supposed to have any. Here is a screenshot of similar issue without the entitlements for the libraries: https://drive.google.com/file/d/0B68-3G8aSUUHdjZWdjJrcHZEVEU/view

In general, it's working when I side load the app via developer's cert so I don't know why the archive may behave differently.

Other solutions for possible similar issue that I tried but no avail.

I found the solution to the issue! Hope this helps anyone facing the same issue. To correct this problem, you will need to sign your app using code signing certificates with the Subject Organizational Unit (OU) set to your Team ID. Apple has made a change to their certificates so we needed to re-create the new certificate for signing our app.

Steps are as follows to fix the certificate issue:

  1. Revoke the distribution/developer certificate
  2. Create a new distribution/developer certificate
  3. Update the corresponding profile with your newly created certificate
  4. Archive your app again with the new certificate

Last but not least, the app schema should already contain the embedded frameworks if any, so no additional changes were required other than specifying the proper bundle ID, Team name, and code signing identity.

The solution provided in this Q&A helped me achieve this solution: Apple's Technical Q&A

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM