How to generate an iOS IPA file with Ionic Framewo

2019-01-16 10:50发布

问题:

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 not generated with that build command. So, how can I generate it?

Thanks

回答1:

You can easily build IPA from ionic framework. by following these steps

  1. Navigate to app folder

  1. Run cordova build command

  1. Open the Xcode Project

  1. Clean the project

  1. Select iOS mobile device to build for, don't use iOS emulator as device otherwise the archive is disabled.

  1. Archive the project

  1. Distribute the project

  1. Choose a method for distribution

  1. Choose a Profile

  1. Select a location to save the .ipa file

I have generate my .ipa file by using these steps hope it will works for your's.



回答2:

this article is kind of old but should help you.

In Command line change into the folder that contains your *.xcodeproj, and run the following:

xcodebuild -target "My Target" -scheme "My Scheme"
-configuration Release clean archive

Now you’ve got your xcarchive , Following line will generate ipa which you can upload to TestFlight.

cd platforms/ios/build/device/usr/bin/xcrun -sdk iphoneos PackageApplication "$(pwd)/$PROJECT_NAME.app" -o "$(pwd)/$PROJECT_NAME.ipa"

Hope this helps