Xcode 9 automatic signing not finding provisioning profile

I have two projects (three actually) that are similar, except for appId and provisioning. They are all going to be using APNs, so I can't use the generic profile.


Now, one project com.redskyit.mobile.rmcv2d is building fine, xcode finds the development provisioning profile that matches its ID and signs it ok.


The second project com.redskyit.mobile.rmcv2 is not finding the provisioning profile that matches the id and is falling back on the generic one, which then fails because the project is configured to use the aps-environment which isn't supported by the generic profile.


What I don't understand is why is xcode not finding the specifc profile for this app id?


I installed it (I believe) because I downloaded it and double clicked it. Though I can't find where to check if it is installed, Xcode -> Preferences... -> Accounts -> (my account) doesn't list any provisioning profiles, just two teams, my own team and the companies team.


Where can I view the profiles that are installed?


How can I debug why xcode is not finding them.


Thanks

Replies

I seem to have missed a step somewhere:-


After some digging around, I notice in ~/Library/MobileDevice/Provisioning Profiles


Provisioning Profiles adf$ grep --binary-files=text 'iOS Team' *

0775d113-9c00-4ab1-8536-d59ea1723426.mobileprovision: <string>iOS Team Provisioning Profile: *</string>

4ae97e1b-7586-4f79-bf99-18a93552755c.mobileprovision: <string>iOS Team Provisioning Profile: *</string>

d467db90-2f34-4e33-a250-4c3b643d733b.mobileprovision: <string>iOS Team Provisioning Profile: com.redskyit.mobile.rmcv2d</string>


Are those the profiles Xcode is using? (which would explain why it doesn't find one for the app not working). How do I install these. I have been installing the provisioning profiles from Certificates, Identifiers & Profiles -> iOS Provisioning Profiles by downloading and double clicking, but I take it these are not Team provisioning profiles.


I am getting so confused.


I can see the profiles I installed in this directory:-


iOS Development - RMCv2 (this is the one that matches the bundle id of the project not working)

iOS Development - RMCv2b

iOS Development - RMCv2d
iOS Distribution - RMCv2

iOS Distribution - RMCv2b

What creates the iOS Team Provisioning Profile: com.redskyit.mobile.specific-app-id profiles?

Ok, whilst I would like to understand how iOS Team Provisioning Profile: com.redskyit.mobile.rmcv2d was generated, I don't think that is my actual problem. I think my real issue is that my project is being generated with automatic signing enabled, rather than specifying the provisioning profiles directly, indeed in the project if I turn automatic signing off, I can select the profiles I installed for this app id, and Xcode is happy.

I need to go back through the cordova docs, and see if there is a way to specify the provisioning profiles at project creation, I presume there must be.

Have you been able to figure this out. I am facing quite similar problem. I have been able to download and install all provisioning profile. Xcode before building verifies and accepts the provisioning profile but at the time of signing in the end of all compilation gives me the following error : Xcode couldn't find any provisioning profiles matching 'Myteamid/provisioningprofilename'. This build is for the app-store and using iOS distribution provisioning profile.

After I have few hours searching and trying I have two solutions 1- run the app using IOS real device. 2- turn off the automatically manage signing, go to https://developer.apple.com/account/resources/profiles/ and create a profile now on the Provisioning Profile import it and done.