4

I use Xcode 9 for building iOS application, and for that purpose I use my apple account. Now I got from client certificate and provision profile in .cer and .mobileprovision format. Can someone explain me how to use them and import them in Xcode, or anywhere is needed?

I found somewhere to install certificate in keychain, but I didn't find is that in all certificate, my certificate, login, .... Anyhow I couldn't manage.

For .mobileprovision I couldn't find anything.

Any help? Thanks in advance

Sasa
  • 553
  • 7
  • 25
  • if you don't know, then you could use automatic sign in. Or follow this [tutorial](https://www.youtube.com/watch?v=l8-cEeJFtnI) – Tanvir Nayem Jul 17 '18 at 09:26
  • Now occurred to me that I can use manual sign in and then import provision profile. But new problem shows up, when I upload .mobileprovision profile I got Xcode shows me error "No signing certificate "iOS Distribution" found". I clicked on manage certificate and get error "Missing private key" just next to iOS distribution certificate. If I click on + to create a new one I get error "No account for team xxxxx". – Sasa Jul 17 '18 at 09:33
  • is it your developer account.? then please follow the below answer. – Tanvir Nayem Jul 17 '18 at 09:36
  • No is not, I got from client .mobileprovision and .cer files – Sasa Jul 17 '18 at 09:37
  • You need them to provide you with the private key for the certificate. Without that, Xcode can't properly sign the binary. So it won't show up as an option in Xcode. Ask the client to provide you with the private key used for signing. If they can't / don't know how, ask if they can add you as a admin role on their developer account. You would then be able to use your own key / cert / profile. – wottle Jul 18 '18 at 01:41
  • Also, it's not clear if you did this, but to install the provisioning profile, you simple double click it. It will open Xcode, and Xcode will simply create a copy of the file in the correct location. Your installed mobile provisioning profiles can be found here: https://stackoverflow.com/questions/45625347/xcode-provisioning-profiles-location/45642752#45642752 – wottle Jul 18 '18 at 01:42

2 Answers2

6

Remember first to load you certificate in your Computer Keychain.

To install a mobileprovision file in an XCode project you have to:

  1. Go to the Project Properties - Simply select the top node in the Project navigator.
  2. Go to the Signing & Capabilities tab.
  3. Disable "Automatically manage signing"
  4. Open the "Provisioning Profile" combo and select "Import Profile..."
  5. Navigate and select the .mobileprovision file.

And that should do it. Hope this helps.

Daniel Suárez
  • 109
  • 1
  • 3
0

Follow the instruction for automatic certificate and provisioning profile creation->

  1. go to Xcode preference
  2. select accounts from upper tab
  3. select your app-id from left navigation panel
  4. after selecting app id, select developer team from right side
  5. now select manage certificates
  6. select '+' icon and create developer certificate and provisioning certificate.

hope this could help.

Tanvir Nayem
  • 702
  • 10
  • 25
  • 2
    But I cannot create my own developer and provisioning certificate with my apple id, I have to publish with clients certificate and mobileprovision. When I try to create profile with client's profile I got this error: "Add a new account in the Accounts preference pane or verify that your accounts have valid credentials." – Sasa Jul 17 '18 at 09:47
  • you can't if your account is not a paid developer account. – Tanvir Nayem Jul 17 '18 at 09:49
  • My account is a paid developer account and I already published apps. Maybe client should create a team and add me as a member of that team, and than create a new .mobileprovision profile? – Sasa Jul 17 '18 at 09:52
  • I added certificate in keychain access in keychain login and category certificates, why I can't see that certificate in Xcode? – Sasa Jul 17 '18 at 11:42