How To Run Xcode 9 App On Real iPhone

After you develop and test your iOS app in Xcode simulator, you also need to deploy your app to real device such as iPhone or iPad device to run and test. Because some bugs only exist on real device, so it is also necessary. This article will tell you how to do it.

1. Run Xcode iOS App in Real iPhone Steps.

  1. Connect your iPhone to MacOS machine with a USB line.
  2. Then in Xcode, click Product —> Destination menu item in the top menu bar. Then select your real iPhone device under Device menu.
    xcode product destination devices real iphone
  3. Then you can click the Run button ( triangle button) at top to run the app on the target iPhone.
    run xcode app in real target iphone

2. Run iOS App In Real iPhone Errors.

But during above process, you may encounter some errors like below.

2.1 Real iPhone iOS Version Not Match Xcode App Project Target iOS Version.

iphone device ios version not match xcode app target ios version

To resolve this error, you should follow below steps to change the Xcode project app iOS deployment target version.

  1. Click the Xcode project name.
  2. Select Build Settings tab.
  3. In the Deployment section, select your iPhone iOS version in the iOS Deployment Target drop down list. Then this error has been resolved.

change ios app deployment target ios version

2.2 Requires A Developer Team.

Although apple do not require developer to cost money to deploy and test iOS app in real device since Xcode 7.0, but to run and test app in real device, you still need a free developer account. Other wise you may see below errors in the Xcode project Signing section.

Singing for ” iOS App Name ” requris a development team.

require a developer team account

Follow below steps to resolve this issue.

  1. Click the Add Account… button after the Team label. Then input an exist or register a new apple account id.
    add ios developer account
  2. After successfully login with the apple account, you can see the account in the accounts list left panel. Then close the dialog.
    ios developer account has been added in account list
  3. Now you can select the apple account in the Signing section Team drop down list.
    select the ios app developer team account after add
READ :   iOS Xcode Project And Target Structure Example

2.3 This App Need Trust Settings In Real iPhone.

Before you can run the Xcode app project in real iPhone device, you also need to trust the app in your iPhone, other wise you may encounter could not launch errors.

could not launch the ios app need trust settings on target iphone

Steps To Trust The Xcode App In iPhone.

  1. Click¬†General —> Settings —> Device Management menu item in iPhone device. The Device Management menu item only appear when you run the Xcode app on the iPhone.
    iphone settings general device management
  2. Click the app in the DEVELOPER APP section.
    iphone device management developer app
  3. Click the Trust button in the next screen. Then you can run the Xcode project app in your iPhone device. If you want to remove the trust, just need to click the Delete App button to remove it.
    trust xcode deployed ios app
(Visited 140 times, 2 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.