How can I deploy an iPhone application from Xcode to a real iPhone device?

前端 未结 12 1593
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 12:31

How can I deploy an iPhone application from Xcode to real iPhone device without having a US$99 Apple certificate?

12条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-22 13:27

    Free Provisioning after Xcode 7

    In order to test your app on a real device rather than pay the Apple Developer fee (or jailbreak your device), you can use the new free provisioning that Xcode 7 and iOS 9 supports.

    Here are the steps taken more or less from the documentation (which is pretty good, so give it a read):

    1. Add your Apple ID in Xcode

    Go to XCode > Preferences > Accounts tab > Add button (+) > Add Apple ID. See the docs for more help.

    2. Click the General tab in the Project Navigator

    3. Choose your Apple ID from the Team popup menu.

    4. Connect your device and choose it in the scheme menu.

    5. Click the Fix Issues button

    If you get an error about the bundle name being invalid, change it to something unique.

    6. Run your app

    In Xcode, click the Build and run button.

    7. Trust the app developer in the device settings

    After running your app, you will get a security error because the app you want to run is not from the App Store.

    On your device, go to Settings > General > Profile > your-Apple-ID-name > Trust your-Apple-ID-name > Trust.

    8. Run your app on your device again.

    That's it. You can now run your own (or any other apps that you have the source code for) without having to dish out the $99 dollars. Thank you, Apple, for finally allowing this.

提交回复
热议问题