Cordova Error 65 when trying to build app for iOS

会有一股神秘感。 提交于 2019-11-30 05:14:24

To build your Cordova app to an iPhone follow these steps:

Short Answer

  1. Run the command cordova add platform ios, which will create the XCode project file .xcworkspace in your Cordova project directory under "platforms > ios"
  2. From Xcode go to "File > Open" and find the .xcworkspace file under "platforms > ios"
  3. Once the project is open, click on the blue project icon

    to change the project settings.
  4. Under "Signing" choose your Team...

Long answer

  1. Buy a Mac Book (https://www.apple.com/mac/)
  2. Install Xcode (https://developer.apple.com/xcode/)
    • This will create a certificate authority "Apple Worldwide Developer Relations Certification Authority" which is needed by KeyChain Access.

From Apple Developers (developer.apple.com)

  1. Purchase a developer account for $99 through Apple
  2. Sign-in, and go to: https://developer.apple.com/account/ios/certificate/
  3. Create an "iOS development" certificate
    • "Certificates > All" and then click on the "+" icon, and choose "iOS App Development".

From KeyChain Access

  1. Open the KeyChain Access app Applications > Utilities > KeyChain Access
  2. Create a CertificateSigningRequest.certSigningRequest file, by going to "Certificate Assistant > Request a Certificate From a Certificate Authority", and upload that to Apple Developers.

From Apple Developers

  1. Register your iPhone - under "Devices > iPhone", click on the "+" icon.
    • Will ask for a device "name" and the "uuid"
    • To get the device uuid, you'll need to get it from the "iTunes" app.

From iTunes

  1. Plug your iPhone into your Mac Book with the USB power cable
  2. Open "iTunes" and click on the iPhone icon

  3. Click on the label "Serial Number:", this will reveal the UUID.
  4. Copy that UUID into the "uuid" field on the Apple Developers website.

From your command terminal

  1. Install Node (https://nodejs.org/en/download/) - macOS Installer
  2. Open the Terminal app Applications > Utilities > Terminal
  3. Install Cordova: sudo npm install -g cordova (use sudo)
  4. Create a Cordova app, that follows the format:
    • cordova <app_directory> <bundle_id> <app_name>
    • For example: cordova gmail_app com.google.gmail Gmail.
  5. Add a platform: cordova platform add ios (which will create .xcodeproj)

From Apple Developers

  1. Under "Identifiers" create a new "App Id" (click on the "+" icon), and set the "name" field with the same name as your Cordova app <app_name>, and the bundle ID with the same as the Cordova <bundle_id>.

  2. Under "Provisioning Profiles" create a new "iOS Development" provisioning profile, with the name of your app <app_name> and select the bundle id <bundle_id>.

From XCode

  1. Add your Apple ID to Xcode:

    • Open XCode and go to "Xcode > Preferences... > Accounts" and click on the "+" icon to "Add Apple ID..." and then enter your user name and password for your apple developers account.
  2. Open the Cordova Xcode project file:

    • From XCode go to "File > Open" and find the .xcworkspace file under "platforms > ios" in your Cordova project.
  3. Once the project is open, click on the blue project icon

    to change the project settings.

  4. Under "Signing" choose your Team...

From your command terminal

  1. Create a build.json file in the root directory of your Cordova project:

{ "ios": { "debug": { "codeSignIdentity": "iPhone Developer", "developmentTeam": "<Team ID>", "packageType": "development" }, "release": { "codeSignIdentity": "iPhone Developer", "developmentTeam": "<Team ID>", "packageType": "app-store" } } }

  1. Next run cordova build ios, and it should build correctly

From XCode

  1. Finally... with your iPhone USB cable plugged into your Mac Book, make sure your (1) device is selected, and (2) click the run button. This should deploy the app you built with Cordova to the iPhone.

Stop XCode from automatically managing your signing. That option is in the general tab of the project settings in XCode.

After that, manually select the profile for debug and release inside XCode.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!