Search code examples
swiftxcodeios-simulator

App cannot run on real iOS device but can run on the simulator


Previously, my app works fine on my iPad, However, yesterday Xcode started giving me this error as shown in the screenshot.enter image description here

Does anyone know how to fix this? Please help me, thanks.


Solution

  • you need to create a provisioning profile in developer.apple.com if you dont have one yet.

    then add the device to this provisioning profile by:

    1. Login to your developer portal through developer.apple.com
    2. Add the UDID in devices (you can retrieve it from Itunes from your mac)
    3. Go back to XCode, open up the Organizer and select "Provisioning Profiles", ensure that "Automatic Device Provisioning" is checked on the top right pane, then click on the "Refresh" button, and magically all your devices set in the provisioning portal will be automatically added.

    After doing these steps try again run your app it should work