Andrei
Andrei

Reputation: 1005

Test if architectures are correct when building app in XCode before upload

I've released some iPhone apps to the App Store, and some of them had problems and were crashing. I figured out the crashing thanks to this thread:

App rejected for crash on launch, but cannot replicate in either simulator or device, and device log is cryptic

It was because of not valid architectures. I've resubmitted some of the apps on the app store, this fixed some of the crashes but other apps are still crashing, I probably missed a few places, or forgot to change the architecture. I have a lot of iPhone apps, and I wanted to know if there is a way to verify that the build is correct before I submit to the App Store.

Otherwise it takes a lot of time to figure out the crash, Apple is reviewing the app for a week, then approving it, then I need to test it on my own device etc.. 2 weeks already passed by since I wanted to release all the apps, I don't want to make it a month. Would someone have an idea how I could test the builds ?

Thank you

Upvotes: 0

Views: 90

Answers (1)

Gwynant Jones
Gwynant Jones

Reputation: 319

You can test the app on your own device before sending it to apple for approval.

1. Build your project for archive: Product->Archive

You will then be prompted with the organiser with your built app. Instead of distributing to app store you choose (Xcode 4.3.1):

2. Save for Enterprise or Ad-Hoc Deployment

It will then ask you which provisioning profile to sign the app with and you choose your development profile which contains your phone.

You will then save it to a certain location.

3. Once saved you open up iTunes and drag the your_app.ipa file into your iPhone (must be plugged in obviously).

You might have to drag it to your iTunes apps first before dragging it from your iTunes apps to your iPhone.

4. The app should then install on your phone.

That app is in the same condition you would get it from the app store.

As for validating build settings.....I've never had any issues regarding architectures. If my deployment target is 3.2 and my architectures is set to armv7, then during the validation stage in uploading my app to apple, it would fail and say that it's not an universal binary. You need to test you app on earlier versions of iOS in order to replicate architecture crashes.

Upvotes: 1

Related Questions