0

When I try to run an iOS app on real devices it give me the following error, but it works on simulator, also I uploaded test build on TestFlight successfully, I tried to use another bundle identifier but no luck.

The project is built using Swift and using CocoaPods to include Alamofire and other libraries.

enter image description here

dahiya_boy
  • 9,298
  • 1
  • 30
  • 51

1 Answers1

0

Without having all the details it sounds like you need to update your Provisioning Profile for Distribution or Development.

You will first need to go to the Apple Developer portal and login in to your account. Then select "Certificates, Identifiers and Profiles", followed by "Devices". Add your iPhone's name and UDID to the list if it is not there already.

After your device is registered to your account you will need to update the Distribution Profile (to allow devices to open your app through the beta distribution channel of Test Flight) as well as your Development provision profile to allow team members to build and run the app through xcode on their device instead of the simulator.

First select Distribution and click on the preexisting Distribution Profile for your application. Select the edit option and make sure the check mark next to your device is selected. Then generate a new Distribution profile. This will cause a download to automatically occur in your browser window. Once its complete you should click the download and this will automatically add it to xcode.

Now create a new provisioning profile for your application. Add the appropriate App Bundle Id and select your device from the list. Generate the new profile and a download will again be triggered in the browser window. Once the download is complete again click the download which will automatically add the profile to xcode.

Your application should now be able to run on your device when building and running through xcode as well as when it is downloaded from your beta distribution channel.

Andrew2M
  • 248
  • 2
  • 5
  • I'm not talking about certain device, I also mentioned that I tried another bundle also, and as you may know Xcode will warn you when you try to debug on device that is not included in your provisioning, But anyway be sure that I checked all what you said before I ask. – Mouaz Alzahabi May 23 '16 at 20:32
  • Have you run the app on the device in question before? Or is this the first time you a building on the specific iphone? This could be an issue with clashes in naming conventions on iOS, be sure to delete your derived data (and delete the application on the phone if youve built it there before). Providing as much information as you can from your info.plist file might help others identify the issue here. – Andrew2M May 23 '16 at 21:09