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
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
What I do is to run this command:
ionic cordova run ios
It will build and make the project, generate the IPA and then launch the simulator. At that moment I just quit the simulator and voila! I have my IPA with just one command (Ionic 4).
You can easily build IPA from ionic framework. by following these steps
I have generate my .ipa file by using these steps hope it will works for your's.
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
<key>destination</key>
<string>upload</string>
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