How can I test a production iOS App Store build? - ios

I'm new to iPhone development and i'm not sure how to test the actually binary that will be sent to Apple. Today I released a build that works great on my local device but the released App Store version did not work and hung on launch.
I'm trying to figure out how I can test my production builds so this doesn't happen again.
I tried creating an ad-hoc binary and saved the ipa to my desktop, then imported into iTunes. The app synced and downloaded but remained dark and said 'waiting..'.
I signed up for Test Flight and it said my IPA was created for production and the sdk could not be found.
Do I need to research ad-hoc builds and profiles? This seems to be getting confusing really quickly and i'm not sure where to start looking/learning.

When you create an archive to submit to the AppStore, it is saved under the organizer (Press Command + Shift + 2 to open Organizer).
You can save the same archive for Ad-hoc distribution as a .IPA file, and then install it using iTunes or TestFlight.
In the Organizer, just select the right archive, click 'Distribute', and select 'Ad-hoc distribution' and sign the IPA with your Ad-Hoc distribution profile (if you haven't created an ad-hoc distribution profile, create one at developer.apple.com, download it and double-click on it to import it to your Mac OS Keychain) to generate the .IPA file.
As long as you re-sign your AppStore archive with an ad-hoc distribution profile, it should install and execute on your test devices.

Follow these steps hopefully it will work
Delete the application from your iPhone.
Create a new Adhoc Distribution provisioning profile, make your the devices you want to run on are included in that profile.
Make sure the certificate associated with the newly created profile has a valid private/public key pair.
After creating an archive, see the build must be created with the newly created profile(From a drop down that comes after archive).
If the problem persists, to verify rename the .ipa to .zip go to payload folder right click .app and show package contents see the embedded profile shows the correct profile and have the devices added.

Related

IPA has to be regenerated if there is new trusted devices?

I've first generated IPA and distributed to few iPhone devices and later found out that there are few iPhones that doesn't have the signing Certificate from my mac, so I added them via XCode and try to distribute the early generated IPA but none of them successfully installed. It only works after I run thru the whole process again (build -> archieve -> validate -> export)? Am I understand correctly that IPA only meant for trusted devices before the IPA generated?
Definitely, whenever you add any new device and created new profile you must create new archive so newly added device will be able to instal the ipa.
As Apple restrict the untrusted device to use the apps code signing is must and when you code sign the profile matches the certificate.
As while creating archive the profile is used while exporting. The old ipa created do not include the new Profile hence the new devices too.
So whenever you add even single device new ipa creation is required.

Xcode: Problems with getting my App to the AppStore

I am trying to upload my app to the AppStore with Application Loader
I tried to archive my project in order to generate the "ipa" file for Application Loader and the archive process got stuck at "Compiling swift sources" for almost 5hrs; I took to the response I read from - Xcode 6.0 taking forever to archive my project and I successfully generated the .ipa file with iTunes but while trying to upload with Application Loader, I get the error:
ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning
profile included in the bundle com.youngbobby.MyAppName
[Payload/MyAppName.app] is invalid. [Missing code-signing
certificate]. A Distribution Provisioning profile should be used when
submitting apps to the App Store. For more information, visit the iOS
Developer Portal."
I have generated my keychain certificate and my distribution provisioning profile and I still get that error during submission. Do you think the error is related to the method I used? Do I have to maintain the traditional "archive" method? If yes, what would be the fastest way to archive and generate my .ipa file? I have tried enabling Whole Module Optimisation as suggested here all to no avail.
Any help would be greatly appreciated.
EDIT
I did a quick check on why my archive process was stuck at "Compiling swift sources" using "cmd + 8" and I noticed that my local Data store swift file which is a long Dictionary of type [[String:Anyobject]] was the cause of the problem. I can't really explain why it is so but I want to maintain the traditional method of archive and send because it seems using iTunes to generate my ipa file does not agree with my provisioning profile.
When you are building the project, it is still building for debugging, hence it is using the development provisioning profile.
Before you do the build to create the .app, go to the Scheme (just to the right of the stop button, to the left of the device on which you are running).
Click that and choose "Edit Scheme..."
Under the Run section, there is a setting for Build Configuration.
Change that from Debug to Release (if you are using the standard build config and you have configured the Release config to use your distribution profile and signing identity).
Close that window, then change your device to the generic "iOS Device option (make sure you don't have any devices plugged into your Mac).
Once you've done that, run your build again and the ipa created should be built with your release configuration and signed correctly.
You are probably using a Development Provisioning profile.
Go to your dev center.
Create a new provisioning profile, select App Store and select your bundle ID. create that and download it.
Control drag that provisioning profile to Xcode, Change build settings in target and project to the one you downloaded now and as Distribution.
Compile and build your app. Archive it and start uploading it to App store.
That should do it.
P.S do select your team correctly before you configure your build settings.
EDIT
If you already have done these steps just revoke the old one and create a new Provisioning profile and check.
Finally got my problem solved.
It seems all I needed to do while my app was compiling swift sources was to WAIT
I reduced the amount of Data in my Datastore file and the Archive process took less than 10 seconds to archive.
Pity, Xcode does not show a Timer to calculate how long it would take to archive a project and looking at the progress bar does not really guarantee that the process is working as in my case was a relatively huge one. So, maintaining the huge data I had, I simply had a 6hr nap and by the time I was up, my project was successfully archived and all other processes worked seamlessly :)
If you find your project 'stuck at compiling swift sources' during Archive Process, all you need to do is Wait.

Ad Hoc distribution app is gray, after transfer from iTunes to iPhone

I've been develoming an app and is at a stage now where i want to make other ppl able to tst out my app. I've created a Ad Hoc provisioning profile and build an .ipa file with archives. After that i added the .ipa file to iTunes apps library and sync'ed iTunes with my iPhone. After this i look at my phone and the app is grayed out and if i press it it writes installing, but never gets done installing.
I've tried to recreate my certificat + profile + ipa file. And i did uninstall the debug app that was on my device, before i transferred the one with a ad hoc profile.
Ov, and as a side note the app works 100% if i just build a release build through xCode, and use xCode to transfer it, but i NEED that .ipa file so that solution wont cut it for me.
What am i doing wrong here, plzzz help?^^
SOLUTION: Don't use " "(space) in the file name of the .ipa file
Are you 'distributing' the application and saving for ad-hoc/enterprise deployment ? The chances are the provisioning profile you created doesn't have the device UDID in it. Check on the dev portal that your ad hoc profile has that device included.
If you instal the app from xCode and you can see the log in the console debugger, that's mean that you are not in "distribution" mode but in debug mode.
Verify your provisioning profile and the build mode.

How to add provisioning profile to IPA file

I downloaded an IPA off the web and I want to upload it to Diawi or TestFlight for demo testing, but I keep getting errors like No provisioning profile found in the application bundle or Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc?
How can I edit the IPA so I can successfully upload them to the demo sites?
PS: I don't have XCode.
You can't.
When the .ipa was built, it had to have been built with a provisioning profile in order to be distributed. In addition, your test device's UDID has to be on the list of valid devices for that provisioning profile. Once the .ipa has been created, you can't go back and edit it. If you want to be able to run it on your device, you need to create a new one--or have the original person who created the .ipa make a new one, since you don't have XCode.
You can not sign .IPA file with any other way, you need to prepare new build signed with updated provisioning profile, where devices ID's are included in it.
Make sure that while creating an .ipa file you must need to select Generic iOS Device as a

How can I deliver an iOS app IPA to a customer to be signed with their own Enterprise provisioning profile

We have developed an iOS app that has been delivered to the customer as an IPA with an ad-hoc distribution profile that allowed a set of their employees to install it on their devices. The customer now wishes to distribute that app internally to all their employees using their iOS Enterprise Developer program credentials.
I had hoped that the customer could simply re-codesign the ad-hoc IPA with their own enterprise identity. However, they say they can't do that. They say they "need an IPA file with the removal of the limitation to only certain devices".
So, what do I do?
Do I need to somehow create an "unsigned" IPA for them? (And if so, how do I do that?)
Do I need them to generate an Enterprise distribution provisioning profile for me so I can build the app with that profile?
Do I need to just send them the source or build output and let them build the package?
I have looked at the following documents, but they have not enlightened me:
TN2250: iOS code Signing Setup, Process, and Troubleshooting
Distributing Enterprise Apps for iOS Devices
It's completely possible to take any IPA and resign it with your own details, modifying the Info.plist, bundle ID, etc. in the process. I do this all the time with IPAs that have been signed by other developers using their own provisioning profiles and signing identities.
If they aren't familiar with the codesign command line tool and all the details of replacing embedded.mobileprovision files and entitlements, the easiest way for them to do this is for you to "Archive" the app via Xcode, and send them the generated archive file (*.xcarchive).
They can import that into Xcode so it is visible in the Organizer, and from there they can choose "Distribute" and sign it with their enterprise identity.
To import the .xcarchive file into Xcode, they just need to copy the file into the ~/Library/Developer/Xcode/Archives directory and it should appear in the Xcode organizer. Then they click "Distribute" and follow the instructions:

Resources