44

I know this is simple, but I've read through all the questions and there doesn't seem to be a simple answer to this.

I've created an appID. I've created a mobileprovision file, downloaded it and double clicked it and that all seems fine.

How do I get this profile though to show up in XCode? and where would it show up?

using latest version of iOS and XCode.


It's appearing, evidently it just takes time to appear.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Phil
  • 2,995
  • 6
  • 40
  • 67

6 Answers6

24

Open Organizer in Xcode (Window -> Organizer), go to the Devices tab and select Provisioning Profiles in the left drawer. Then use the Refresh button on the bottom right.

Update 2018

From @mikeLspohn comment: Go to Window > Devices then right-click on your device and select Show Provisioning Profiles ... from there you can click on +/- to add or remove profiles -

Ernesto Campohermoso
  • 7,213
  • 1
  • 40
  • 51
cynicaljoy
  • 2,047
  • 1
  • 18
  • 25
  • 5
    in XCode 6.1 there's no such devices tab within the Organizer window. If you go to the Devices window in XCode you can see a list of devices, but there's no such refresh button or ability to generate provisioning profiles – creamcheese Nov 18 '14 at 08:39
  • 4
    @DominicWatson You can select your device from the left pane, then click the gear icon at the bottom left of the window, choose show Provisioning Profiles, click + on the new window – C.C. Nov 30 '14 at 15:29
  • 1
    I'm trying to do this but I'm using the newest xcode and I don't see a gear icon at bottom left. Did this also get moved? – mikeLspohn Jun 11 '15 at 14:14
  • 57
    @mikeLspohn All my experience of developing under Mac/iOS is full of pain and frustration – noncom Sep 25 '15 at 12:02
  • 1
    @mikeLspohn go to `Window > Devices` then right-click on your device and select **Show Provisioning Profiles ...** from there you can click on **+/-** to add or remove profiles - _Xcode Version 7.0 (7A220)_ – Moumou Sep 29 '15 at 13:19
  • In Xcode 7 the devices are not in the Organizer but there is a Devices menu directly under Window. – pauldendulk Oct 14 '15 at 16:40
  • 3
    I've been trying to do the same from hours but when I try to add a mobileprovsion file, this last is disabled and I cannot select it...why? – SagittariusA Feb 23 '16 at 14:41
  • 2
    @LoryLory SwiftArchitect's answer re adding to iTunes then Xcode (had the same problem as you commented, this answer solved the issue) – jimmont Mar 22 '16 at 23:57
  • This is exactly what I did. And it works like a charm. Thanks! – Oliver Zhang Apr 02 '19 at 01:49
15

Two steps:

  1. First drag it onto iTunes. Dropping a .mobileProvision onto iTunes will install it in ~/Library/MobileDevice/Provisioning Profiles where it is supposed to go.

  2. Second double-click on .mobileProvision to add it to the Xcode store.

It doesn't hurt to relaunch Xcode after that.

SwiftArchitect
  • 47,376
  • 28
  • 140
  • 179
5

You can always just drag the file onto the Xcode dock icon. This will add it to Xcode's store. When your target has the correct bundle ID and you have the private key, you should be able to select the appropriate profile and signing identity in the Code Signing build settings.

Mike Weller
  • 45,401
  • 15
  • 131
  • 151
2

In XCode 12.2, click Window in the menu > Devices and Simulators

Right click you device, and select Show Provisioning Profiles...

enter image description here

Then click "+" to add your .mobileprovision files.

enter image description here

UPDATE:

The method above added mobileprovision files and shows in Xcode UI. However, it does not add to

/Users/myusername/Library/MobileDevice/Provisioning Profiles

And when I build from Xcode, it still says the mobileprovision files are missing.

And the end, I found I only need to double click each mobileprovision file to add them under the folder of

/Users/myusername/Library/MobileDevice/Provisioning Profiles

And my Xcode has no issue building this time.

Hongbo Miao
  • 45,290
  • 60
  • 174
  • 267
2

Xcode 12.3

  • Select your project in the navigator
  • Select your target
  • Select Signing and Capabilities
  • Uncheck the Automatically Manage Signing Box

You will then see a dropdown to select a provisioning profile. You can 'download' directly from Apple, assuming you've set up the profile on the developer site. Or you can 'Import' a file you've downloaded separately.

  • Now, check the Automatic Signing box again.

I am not sure if this is necessary, but as Hongbo Miao has pointed out, you can download the file and double click it to 'add it to the library'.

LostInTheTrees
  • 1,135
  • 9
  • 19
0

Go to http://developer.apple.com in Safari on your device and navigate to the SDK/downloads section. From that page, download the .mobileconfig file and when prompted, Install. This will allow you to install beta builds when you go to Settings -> General -> Software Update.

JaredH
  • 2,338
  • 1
  • 30
  • 40
  • This makes sense and I wish it would work. In iOS 12.4.2, in Safari, in developer.apple.com, I can find the *mobile provisioning profile* which I generated 20 minutes ago. When I click *Download* it asks for permission to download, and when I click *Allow* the UI switches to Settings > General > Profiles. But that's all. The new provisioning profile is not in the list, and there is no *Install* button ;( – Jerry Krinock Oct 23 '19 at 17:03