How to generate an iOS IPA file with Ionic Framework?

前端 未结 4 904
我寻月下人不归
我寻月下人不归 2020-12-04 14:28

I\'ve successfully built the iOS app with the ionic build ios command. But now I want to use TestFlight and it asks me for an IPA file. It seems that file is no

4条回答
  •  时光说笑
    2020-12-04 15:25

    Use npx ionic build ios --device to build the IPA for debugging and adhoc installations

    Use npx ionic build ios --device --release to build for release.

    You need to have a build.json file to specify your keys. Note the CLANG is to prevent compilation errors from the CocoaPods which they made into an error rather than a warning from before.

    {
      "ios": {
        "debug": {
          "buildFlag": [
            "CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES"
          ],
          "developmentTeam": "XXXXXX",
          "automaticProvisioning": true,
          "packageType": "development"
        },
        "release": {
          "buildFlag": [
            "CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES"
          ],
          "codeSignIdentity": "Apple Development",
          "developmentTeam": "XXXXXX",
          "automaticProvisioning": true,
          "packageType": "app-store"
        }
      }
    }
    

    Before it will upload to AppStore/TestFlight you need to modify the platform/ios/exportOptions.plist file to include

    destination
    upload
    

    Then deploy it to the AppStore as follows

    xcodebuild -exportArchive -archivePath "platforms/ios/myApp.xcarchive" \
      -allowProvisioningUpdates \
      -exportOptionsPlist platforms/ios/exportOptions.plist \
      -exportPath platforms/ios/build/device
    
    

提交回复
热议问题