How to add provisioning profile to IPA file - ios

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

Related

provisioning profile got expire

My provisioning profile got expire today, Now customer is not able to launch the app in there device.I have regenerate the provisioning profile , Still customer cant launch the app , Do I have to make a new build again? I did not upload the app to the appstore, user downloaded it from the internal link.
yeah, with new provisioning profile you have to generate new build or ipa, and then register device with this provisioning profile can install your application.
Yes,You need to create a new provisioning profile, then build a new IPA using it. So all the registered device will be able to install an app.
The provisioning profile is shipped along with your app if you do this with the app ipa - Rename ipa to zip and Unzip - you will see inside the Payload an app file - right click to see contents and you will see the provisioning profile.
Thats the reason why you have to resign the app with new provisioning profile and upload it.
Also check this if you want to resign with a different certificate
How to re-sign the ipa file?

Not able to give build permission to device on TestFlight

I want to give build permission to a particular device on TestFlight.
I have added that device on developer.apple.com and also added to provisioning profile I have uploaded to TestFlight. Also I have uploaded that profile to TestFlight.
I am able to add all other devices but not this particular device. On TestFlight it shows this device under Teammate devices not on this profile section. It does not show check box i.e. I can't add this device to build. :
How can I solve it?
Update : Below is what I tried but did not work unfortunately.
Created a new adhoc profile.
Removed all Xcode profiles and refreshed them to have newly created profile in Xcode.
Set Build Settings->Code signing identity->Provisioning profile to this new ad hoc profile.
Created .ipa signed with new profile and uploaded build to TestFlight.
Uploaded new profile to TestFlight.
Create a new profile on Apple's dev site. Name it something DIFFERENT from the current name. I usually append the date to mine so I KNOW which is which. Then, make sure you select the new one when building. If you have multiples with the same name it's a guessing game as to which one Xcode will choose when building your app. #rckoenes is correct - the UDID is NOT in the profile that is in the app that you uploaded to TestFlight. Using unique names will help alleviate this problem.
Add device UDID to devices on developer.apple.com then recreate developer provisioning profile and download it.After open it choose provisioning profile in XCode->targets->CodeSigning.Archive project and upload it to testFlight.

How can I test a production iOS App Store build?

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.

Issue with signing app with wildcard profile

I developed an iPad application to a client. My client has Apple Enterprise license. But they dont allow me to sign the app with their certificate. They just ask me to provide .xarchive file so that they can sign the app and create the ipa file.
This is how I have done that
1. Create a appid with com.mycompany.myapp.abc
2. Create a adhoc profile using above appid with my developer portal
3. set the bundle ID of my app com.mycompany.myapp.abc
4. Set the code signing identity to above profile in my app's target
5. archive the file using xcode 4.6.1
6. export the xarchive file and send to the client
7. Ask client to create a inhouse Dis profile with com.mycompany.myapp.* appid
8. Ask client to open the xarchive file using xcode and sign the app with inhouse profile and create the ipa file
They have followed above instructions in 7,8 and have created the ipa file. But when we try to install the ipa file using xcode to a device it gives following error.
Does above procedure has any problem. Can some one explain the issue.
EDIT:
for testing purpose I created adhoc profile with com.mycompany.* and created an ipa file by signing above xarchive file, it gives the same error message. But If I sign the xarchive file with profile crated with com.mycompany.myapp.abc bundle id works fine.
TL;DR:
Find out what the client's (provisioning profile's) entitlements are and make sure you match them.
The error is trying to say that the entitlements in your provisioning profile and their provisioning profiles differ. The difference could be a keychain group, push notification environment or something else.
The reason why Xcode asks you to choose a provisioning profile twice (once when archiving, once when distributing) is that all the provisioning profile entitlements are picked up in archive stage and mostly ignored in the distribution stage.
This makes it all too easy to distribute with the wrong entitlements, especially if your archive stage accidentally picked up a wildcard profile. Not your case, but that's why you should burn wildcard profiles with fire.
There are clever re-signing scripts (a.k.a. "Distribute..." button replacements) that will try to make the entitlements right by mashing what they find in the end user provisioning profile into your binary but I think the best solution is to make sure your provisioning profile's entitlements and any extra entitlements you add to your app matches their provisioning profile's.
I find Xcode's provisioning profile/entitlement system to be error prone. On hand you have entitlements that are basically part of your app's identity and may as well be set in stone (TODO: make your CI server check them). And on the other hand you have Xcode's build phase gleefully changing your app's entitlements based on its automatic/random provisioning profile selection. Silly.
You should follow the below step to make adhoc distribution .ipa for client
set bundle identifier in target info.plist
select the ad hoc distribution profile in target as well as in project
select iOS device then product-> archieve
organizer will pop up then select the archive and select "distribute" -> Adhoc Enterprise distribution
select the correct ad hoc distribution profile then save this .ipa file.
then send it to the client and let him know that before archiving or building the app we need correct adhoc provisioning profile . so there is no need to repeat the process at your end to set the provisioning or other stuff just distribute it .
How to distribute your iOS app over the air:
Just need to place the .ipa file and plist on a server and set the path in the above link example.

Do i have to re-archive adhoc app after adding device?

I distribute my app for tests by putting link to plist on my server and i'm wondering if i need to re-install provisioning profile and archive and send ipa back to the server after i will add new udids. Also is there a way to distribute for tests without the need to know those udids?
For this, you have to add UDID in your provisioning profile, then download it and make build with this fresh provisioning profile. Without this newly added devices could not install the application.

Resources