IOS Generate IPA File - Certificate does not match your provisioning profile

Hello again!


I'm trying to generate an IPA file to run on IOS. I will not publish in the APPLE STORE. I will send the IPA file only to a few users to run when necessary.


I tried several ways to generate the file extension .P12 and .MOBILEPROVISION, but I was not successful.


I tried to follow what is here:

https://www.outsystems.com/forums/discussion/55508/certificate-does-not-match-your-provisioning-profile-ios/


But it did not work.


PLEASE, can someone give me a detailed step by step? Each screen in the process? I read several forums, I followed this video

https://www.youtube.com/watch?v=nWsjUBrn_IU

And yet I can't generate the IPA file through Outsystems.


On this link, https://www.outsystems.com/forums/discussion/52500/ios-distribution-problem/


Someone mentioned that he managed to solve it this way:

"Solved it by using outsystems cloud instead of company's private cloud."

But I didn't understand how to do that ....


Anyway, who can clarify, this process is really taking longer than I imagined. It should be simple.


Thanks!

Hello Fabricio,


The process is, indeed, simple. Which kind of Apple Developer license do you have? Personal or Enterprise?


If you want to distribute your app to some given users, you have the following options:

a) TestFlight (both, limited to 1000 users I believe)

b) In-house distribution using Enterprise license.


That error appears when the certificate used for generation doesn't match the one picked when creating the mobile provisioning profile. As a good practice, I always suggest to have only one certificate active per type at each time (one development and one distribution, if required). 


As such, please make sure that:

a) You're using the correct build type

b) Exporting the correct certificate, with the private key (if using a Mac) or doing all the process using OpenSSL.


One final note, though: that video talks about APNS, which stands for Apple Push Notification Services. You're probably aware of this, but please make sure that when exporting the certificate in the P12 format you're using the correct one.


Let us know if you need further help,

Armando


---------------------------

Do you want to help others with the same issue?

Did it help? Hit the "like" button.

Did it solved your problem? Mark it as solution.

Hello Armando!


Thanks for your attention.


1) I don't know exactly what the license type is. I didn't create it. The bill already existed when I arrived. It is a paid account and the options are identical to those that appear in the YouTube video that I put the link on. It makes a difference? How do I check?


2) I revoked all IOS certificates they had (there were 2 from the MAC that I was unable to revoke). So, when doing the procedures they had no other certificates. Another detail, at a certain moment it only displays certificates of the same type to generate MobileProvision, so it seems to me that the portal itself does this filter. As there were only 1 of the same type, I only had this option to click.

I managed to generate the .p12 files (with password) using the option to EXPORT the private key. And I generate a .MobileProvision file too.

I even made the Push part, generating the files as shown in the video. My App will send Push Notifications to users. But, anyway, first I want to be able to at least generate the IPA file ... and I'm not getting it.


3) The part of the APP ID I am in doubt, needs to correspond to an existing domain? Do you have any relevant details about the name to be used in this part?


In this link, https://success.outsystems.com/Documentation/11/Delivering_Mobile_Apps/Generate_and_Distribute_Your_Mobile_App/Generate_and_Publish_Your_Mobile_App_to_the_Mobile_App_Stores/Publish_Your_Mobile_iOS_Application


It has this excerpt:

"Keep the default app identifier assigned by OutSystems or write your own (matching reverse domain name notation, e.g. com.domain.appname)."


I haven't tried to generate .P12 and .MobileProvision files using "com.outsystemscloud.myapp" yet. I say this because, as I mentioned earlier, on this link, https://www.outsystems.com/forums/discussion/52500/ios-distribution-problem/

Someone mentioned that he managed to solve it this way:

"Solved it by using outsystems cloud instead of company's private cloud."


I thought it might be related to that. What do you say?


Anyway, I tried several ways, I generated .P12 and .MobileProvision files in different types and I was not successful when I click on the "Generate APP" inside the Outsystems tool. The message "Certificate does not match your provisioning profile" appears.


Is there a tool I can use to check the .p12 and .MobileProvision files?



5) Finally, is the APP ID linked to the .P12 file and the .MOBILEPROVISION? Do I have to generate a .P12 and a .MobileProvision for each app I generate? Or can I just change the APP ID with the same files?



It is. My thanks in advance to anyone who can help me.

Solution

Fabricio Diniz wrote:


1) I don't know exactly what the license type is. I didn't create it. The bill already existed when I arrived. It is a paid account and the options are identical to those that appear in the YouTube video that I put the link on. It makes a difference? How do I check?

You can check by going into developer.apple.com and click on Membership. It should show what the license type is. It does make a difference depending on the type of distribution that you want to make for your application.



2) I revoked all IOS certificates they had (there were 2 from the MAC that I was unable to revoke). So, when doing the procedures they had no other certificates. Another detail, at a certain moment it only displays certificates of the same type to generate MobileProvision, so it seems to me that the portal itself does this filter. As there were only 1 of the same type, I only had this option to click.

You need to have a certificate of the correct type so it matches your profile/provisioning file. For iOS, the options are:


That would be a match for these profiles:

My suggestion is that you get a new Certificate Signing Request file and generate a new certificate. This has no impact in current running applications.


I managed to generate the .p12 files (with password) using the option to EXPORT the private key. And I generate a .MobileProvision file too.

I even made the Push part, generating the files as shown in the video. My App will send Push Notifications to users. But, anyway, first I want to be able to at least generate the IPA file ... and I'm not getting it.

The push certificate (APNS) will be used by the provider of said push notifications (OneSignal, Pushwoosh, etc.) I'm not sure if OneSignal supports it, but Pushwoosh allows auto-configuration through their interface.


3) The part of the APP ID I am in doubt, needs to correspond to an existing domain? Do you have any relevant details about the name to be used in this part?

In this link, https://success.outsystems.com/Documentation/11/Delivering_Mobile_Apps/Generate_and_Distribute_Your_Mobile_App/Generate_and_Publish_Your_Mobile_App_to_the_Mobile_App_Stores/Publish_Your_Mobile_iOS_Application

It has this excerpt:

"Keep the default app identifier assigned by OutSystems or write your own (matching reverse domain name notation, e.g. com.domain.appname)."

No. The app id can be something that you want, as long as it matches the one defined in the apple developer account and the mobile provisioning profileYou can't have your profile expecting com.fabricio.awesomeapp and then define com.fabricio.outsystemsapp in Service Studio/Native App Builder. That just won't work.


I haven't tried to generate .P12 and .MobileProvision files using "com.outsystemscloud.myapp" yet. I say this because, as I mentioned earlier, on this link, https://www.outsystems.com/forums/discussion/52500/ios-distribution-problem/

Someone mentioned that he managed to solve it this way:

"Solved it by using outsystems cloud instead of company's private cloud."

I thought it might be related to that. What do you say?

As per your comments, it seems that there's a mismatch between the Profile Identifier and the one defined in Service Studio? That is the way to go. The P12 (certificate) is independent of the Application Identifier. The Profile/Mobile Provisioning is what links an app id (defined in Developer's account and that has to match the one in SS), to a certificate (the one that you exported of the correct type) to a given set of devices. This is independent of where the application is generated.


Anyway, I tried several ways, I generated .P12 and .MobileProvision files in different types and I was not successful when I click on the "Generate APP" inside the Outsystems tool. The message "Certificate does not match your provisioning profile" appears.

Is there a tool I can use to check the .p12 and .MobileProvision files?

Apple Developer account. It states the app id and and the certificate used for the profile.


5) Finally, is the APP ID linked to the .P12 file and the .MOBILEPROVISION? Do I have to generate a .P12 and a .MobileProvision for each app I generate? Or can I just change the APP ID with the same files?

As I stated before, the .P12 is not linked to anything, per se. It only states if it's for development or distribution purposes. In other words, yes, it's linked - to the build type you select. You need to have a different AppId for each app, otherwise the existing app will be overwritten. Devices don't manage apps by names, they manage by ID's. If you install App A with identifier X and then try to install App B with identifier X, App B will replace App A.

The Mobile provisioning links all these pieces together. So, you need:

- A valid certificate for the type you're trying to build (one for multiple apps)

- A valid app id (one per app)

- A valid mobile provisioning profile (one per app).


This should help you. If not, feel free to reach out to me for more custom help.


---------------------------

Do you want to help others with the same issue?

Did it help? Hit the "like" button.

Did it solved your problem? Mark it as solution.

Solution

Thank you very much Armando.


I will revoke the generated certificates, APP IDs and Provision Profiles. This account has no other application. It is the first that will be generated.


Going forward, everything indicates that it is a Personal account.


Program Type: Apple Developer Program

Entity Type: Individual


Does any procedure change in relation to your instructions?


I kept the same APP ID the times I tried (on the developer portal and within Outsystems). When I made the APP ID differently, the Outsystems tool itself warned about this specifically. However, the current message is always this: "Certificate does not match your provisioning profile"


As it can be "any" APP ID, so I see no reason to work just like com.outsystemscloud.myapp (As I think it was the case here: https://www.outsystems.com/forums/discussion/52500/ios-distribution-problem/) Right?


Anyway, I will try again with your instructions.



Being a personal account means that you can't distribute freely* to users or use In-house distribution. You need to use either TestFlight or the app store. 


The exported P12 needs to match the one that was used when the Profile Provisioning was created. Make sure the profile is still valid - there's this indication in the profiles page. Also, make sure the certificate is properly exported with the private key. In a Mac, it should be like this - export while clicking the private key name.


This should help.


* This is not entirely true, you can distribute to users using a development build but it needs all the devices to be registered in the account (up to 100, that can only be removed upon license renewal).


---------------------------

Do you want to help others with the same issue?

Did it help? Hit the "like" button.

Did it solved your problem? Mark it as solution.

Thanks for your help!!!

It worked correctly here.

Nice!