1

I have created an iOS application, and wanted to submit it to the App Store. I saw a tutorial on how to do that, and understood that I need to create a Distribution profile and replace it with the Development profile. So I did that but before sending it to the App Store. I want to check it last with that profile on it (the distribution profile). Can I run Xcode project when I add a distribution profile? because when I tried running it on a real device, an error popped up: "the provisioning profile "XXXXX" was not found". So i went to the Devices tab and tried adding the file of the provisioning profile, and it didn't allow me to.

What should I do?

DAB
  • 93
  • 1
  • 7
Nir Gofman
  • 45
  • 1
  • 7

2 Answers2

5

You can't use distribution profile to run the app on your device directly from your device.

Now Apple provides beta testing of apps using iTunes Connect. So you can opt for that option as an alternative.

Refer Beta Testing Your iOS App for more details

Midhun MP
  • 103,496
  • 31
  • 153
  • 200
  • 1
    So why I cant add any distribution profile to xcode? – Nir Gofman Dec 15 '14 at 21:02
  • @NirGofman: Did you created the distribution profile ? If yes, download it and double click to add it to the profiles library, change your bundle id and choose the profile in build settings tab – Midhun MP Dec 15 '14 at 21:04
  • The problem is that the profile exist in the profiles list but when I trying to run the app on real device, an error: the provisioning profile "NAME" was not found. – Nir Gofman Dec 15 '14 at 21:12
  • @NirGofman You can't run the app to real device using distribution profile – Midhun MP Dec 15 '14 at 21:13
  • why? - you said "You can use distribution profile to run the app on your device directly from your device." – Nir Gofman Dec 15 '14 at 21:15
  • So you trying to say that I CANT run the app with dis' profile? - its so idiot... – Nir Gofman Dec 15 '14 at 21:19
  • @NirGofman : You can use beta testing option, through which you can verify the app working on distribution profile – Midhun MP Dec 15 '14 at 21:40
  • @MidhunMP but that's quite a round-about way to test whether your app works, right?! Having to deploy to TestFlight then download it again :/ Perhaps the question is, how different is your TestFlight build from the development build? There's a potential for them to be very different, but also very similar. – fatuhoku Aug 08 '15 at 16:46
  • The larger issue is: can I really not debug my code using a dist profile on a real device? Things like push notifications or camera issues must be debugged on a device (with debug and prod builds potentially utilizing different operations server side). – BenJammin Aug 31 '18 at 19:09
  • @BenJammin You can put production build for internal testing via testflight and test the push and camera features. There is no way to "debug" production build. – Midhun MP Sep 01 '18 at 08:59
1

Yes, you can do by applying small tweak.

  • Open you Xcode project
  • click on your target.
  • choose edit scheme from list.
  • choose Run tab from left.
  • select info tab from top.
  • select Build Configuration and choose release from drop-down list.

Now delete your existing app, from device if exist. And run the app from Xcode.

After completion of compiling for app, it would show some error dialog and will stop execution, ignore it.

Now app is installed on your device with distribution profile. Re-run the app.

Cheers!

Saggy
  • 465
  • 5
  • 18
  • This is partially true, from my (limited) experience. This does seem to set the app to use its 'production' configuration, but it seems like the provisioning profile in use may still be a 'development' profile. In my testing, the APNs token I got was still the 'sandbox' token, not a 'production' token. Unfortunately this solution didn't quite work for me. – Alex W Feb 09 '21 at 22:00