iOS Enterprise program: not able to install IPA file created using in-house provisioning profile on one of our device - ios

We are using iOS enterprise account for distributing our iOS app. We are using the in-house distribution scheme of enterprise program.
As far as my knowledge, we don't need to install the in-house provisioning profile in the targeted device. Also, I believe that we don't need to add the device UDID in iOS portal since it's an enterprise account. Please correct my last two statements if my knowledge is wrong.
I am creating the IPA file using the in-house provisioning profile only. But while installing the same on one of our devices (iPhone 5s), I am getting below error.
"**A valid provisioning profile for this executable was not found.**"
I tried to install the same IPA file on another device (iPhone 4s). I have not installed the distribution provisioning profile in that device also. And it's working fine there. So only I concluded that We don't need to install any provisioning profile on the device in case of iOS enterprise program.
Below is my provisioning profile from enterprise account which I am using.
I am not sure why this is happening. Please help me and let me know if I am missing something.

You have to use a provisioning profile that is set for distribution. This profile needs to be using a certificate that is installed on the Mac you want to create the archive from. The profile gets installed along with the application.
You do not have to have the device added to the portal (only development devices need to be added).
One note - the profile will expire yearly. You will have to publish at least one update every year to include an updated and renewed provisioning profile.
Here's some screenshots:
Keychain Access:
Build Settings (Xcode):
Archive:

Related

Xcode Signing Failed to create provisioning profile

I subscribed to the App Developer program. I paid the fee. I've done Certificates, Identifiers & Profiles. I added the app to App Store Connect.
xcode signing
I am getting the errors above. I don't have an iPhone phone. I'm developing on my macbook computer.
xcode device
How can I resolve this error?
As I can see in image that "Automatically Manage Signing" is enabled for this Xcode project. So Xcode is trying to create the provisioning profile for you but not able to create it.
B'coz you need to add account in Xcode from Xcode -> Preferences -> Account -> Click on + icon at bottom to add a new developer account.
You need to create provisioning profiles.
Once you have created provisioning profile, download it and install on your machine.
Please make sure the certificate used in cretation of the provisioning profile must be in your machine's keychain.
If those certificates not installed in your keychiain then you will see certificate issue in Xcode.
But I would recommend to create provisioning profile manually from apple developer portal as you can see and mainly you can know that which certificate and devices are used in the profile.
You can create following provisioning profiles for your app.
Development Profile
You will be able to run/debug app on real device.
The device must be added into the profile.
This can be used for only development purpose.
Adhoc Profile
You will be able to install app on real device but not able to debug it.
The device must be added in profile to install app on it.
It acts as a release build but not a actually release build.
Generally develop send the adhoc build to client for testing of app.
App Store Profile
You will not able to run app on device using this profile.
It will be used to upload app on App Store or create the release build for distribution on App Store.

Installing .ipa over the air does not open

I have signed my .ipa and I have tried to install it via diawi. The app got installed but it shows the app's icon in dark and does not open. I signed it with a iOS Certificate and when I try it from XCode and TestFlight it works perfectly! What could it be?
You need to sign it with AdHoc Provisioning Profile.
You should also register the devices UDID in Certificates, Identifiers & Profiles in your Apple Developer Account.
EDIT
Excerpt from Diawi Knowledge Base.
A few things to check as a developer
If you have uploaded an app to Diawi and can't install it on some of your devices, here are a few things to check:
device's UDID must be in the provisioning profile built into the app by xcode
device's UDID must not start with "fffffff..." (if it is, then it is fake)
you are building a Release version of your app
the device is not behind an enterprise firewall preventing app installation
You may also try to drag&drop the app into iTunes and sync your device: it should install the app, otherwise it is not valid.
Can't install an app on an iOS device? Things to check
Distribute to registered devices (iOS, tvOS, watchOS)
What is the difference between a Development Provisioning Profile and an Ad Hoc Provisioning Profile?

Cant run myApp.ipa after installing it from Diawi

I created an app using react native, I have tested it on my IOS devices by connecting them with xcode, but now i want to share myApp with others to test it. To do that I generated myApp.ipa file by archiving, simply I just navigate to Product -> Application -> myapp, after archive is done, i copied the file to a folder named Payload after compressing the file, changed the Payload.zip to myApp.ipa after that I upload it to the Diawi website then got the link, installed the app on my ios device but unfortunately i cant run it? myApp is shaded with black, and nothing is there in Setting -> General -> Profiles. what did i do wrong? or if there is a simple way to let other test myApp.ipa please share.
Your app is blacked out because the iOS device won't run any unsigned apps. Your app cannot be signed without a provisioning profile.
You cannot install an app on an iOS device without a provisioning profile. The only way to get a provisioning profile is to have either a paid developer account or an enterprise account.
To install an app on an iOS device without submitting to the app store requires use of either an ad-hoc or enterprise provisioning profile
ad-hoc
The only way to get an ad-hoc provisioning profile is to have a paid developer account. $99 per year. https://developer.apple.com/programs/
ad-hoc profiles have limits to the number of different devices that they can be installed on.
enterprise
The only way yo get an enterprise provisioning profile is to have an enterprise account. $299 per year https://developer.apple.com/programs/enterprise/
enterprise profiles don't have the same restrictions on the number of devices as ad-hoc profiles but you cannot submit to the app-store with an enterprise account.

Distributing IPA file with App-store signing

So I'm not using enterprise distribution profile to archive and export my project into IPA file.
I am using a valid distribution certificate though.
On XCode organizer I've made sure that everything is valid by clicking on the validate button for my particular archive before exporting it using the exact same distribution certificate and distribution provisioning profile. Also, I've made sure that I checked App Store as the method of distribution.
So I assumed everything checked out, then I distributed the IPA through diawi.
This is what I used to distribute my development IPA at the early stage of this project. However, upon opening the diawi link, installation just failed on my device saying "Unable to download" every single time.
Now I'm just wondering is it not at all possible to distribute through diawi if I'm not using enterprise distribution profile to build the ipa itself?
Or am I building it the wrong way for the intended purpose?
I'm very new to this whole Apple environment so not sure if I'm understanding the process correctly. I'm developing this from a react native project in case you need to know.
Thanks in advance for any pointers! :D
EDIT:
There seems to be confusion in the answers so far. Just to clarify, I'm NOT using enterprise distribution profile nor I am using development provisioning profile. So adding UDID to the provisioning profile is not an option. The case I'm asking about is for ipa signed with app store distribution provisioning profile which I'm trying to share using diawi. It doesn't seem to be possible to distribute ipa signed this way with diawi based on my research, but I just wanna be extra sure. Sorry for the confusion. :)
You need to have the UDID of downloading device added to the provisional profile. Login to your apple developer account and check if the device is added or no. If not add that device and then update the provisional profile by selecting that new UDID. Download the updated profile and the build.
Turns out it's true that diawi can only distribute in-house apps (signed using enterprise program account) and development provisioning profile signed apps.
The reason what I'm trying to do is not working (not installing through diawi) is because I'm trying to distribute an app signed with classic apple account's distribution provisioning profile instead of development provisioning profile
As far as I my googling went yesterday, apps signed with distribution provisioning profile under classic account is only distributable through app store or test flight.
Let me know if I miss anything.

How come I can install an app store distribution build directly on my device?

I was under the impression that it was impossible to install an app store distribution build directly on a test device (without going through the actual App Store). I found multiple references to the following note by Apple (though I could not find the note itself in the current version of the iOS App Distribution Guide):
"App Store provisioning profiles do not allow for a distribution built application to be installed on an Apple device. To install your distribution ready application on a device, you must create an Ad Hoc provisioning profile."
Now consider the following: I have an Ad Hoc Distribution provisioning profile and an App Store Distribution provisioning profile. The ad hoc profile contains a list of provisioned devices, the app store profile doesn't. My (no jailbrake) device is included in the provisioned devices in the ad hoc profile. My build was signed with the app store profile. The resulting .ipa file was submitted to the App Store (and approved - but it is not publicly available yet). When I view the package contents of the .ipa file, I see that the embedded.mobileprovision is indeed the app store profile (without the provisioned devices list). When I drag this profile to my Xcode Organizer, I get an error that the profile cannot be installed because the device is not included in the profile (as expected). However, when I drag the .ipa file to my Xcode Organizer, the app installs on the device (and can be opened on the device afterwards). I tried this after making sure there were no other copies of the same app installed on the device. The same thing does not work when I use a different device that is not included in the provisioned devices of the ad hoc profile (even though the .ipa contains the app store profile without provisioned devices list).
Does anyone have a possible explanation for this? It seems that somehow a build signed with an app store profile can still be installed on a device included in the corresponding (same app identifier? same team identifier?) ad hoc profile. But if this would be the case, what is the point of making separate ad hoc builds?
I noticed this too and always meant to find out why it worked.
It used to be true that you couldn’t install an App Store build but that appears to have changed, I’m guessing either in iOS6 or 5.
I found that I could only install App Store provisioning profile builds when a compatible Ad Hoc profile was already installed. Developer profiles did not work. I did not try wildcard profiles. So it looks like the Ad Hoc rules changed.
I can’t find the rules for installing an Ad Hoc build, but on the topic of launching the “Ad Hoc Provisioning Profiles in Depth” section of Apple’s App Distribution Guide says that
The app successfully launches if the app’s bundle ID matches the App ID, the signature matches the distribution certificate, and the device is in the device list of the ad hoc provisioning profile.
So I guess technically an AppStore builds meet these Ad Hoc requirements because it too is signed with the same distribution certificate. The use of “the” is misleading here because it makes it sound like iOS consults your embedded.mobileprovision, which is untrue. It should read “an” ad hoc profile.
NB: The install only worked when the Ad Hoc profile was already installed on the device, so that’s one reason to make separate ad hoc builds.
NB: This is all conjecture, another explanation could be that Xcode handles the installation of the embedded.mobileprovision and now continues when the AppStore profile installation fails.
This raises another question for me: why does iOS DWIM for App Store builds yet refuses to launch Ad Hoc builds with expired provisioning profiles when a perfectly valid replacement is installed?

Resources