'How to create ipa file in flutter for testing purpose?
I am working in flutter and i want to create an ipa file for testing purpose. Is there any way to create ipa directly from android studio terminal? If there,what are the steps to follow in that. Also i have created through diawi, but showing error in installing the app through the url provided by diawi.
Please give me a step by step procedure to follow.
Solution 1:[1]
For making a build for iOS, you need to run following command from android studio terminal:
flutter build ios --release
Now you have to make build from Xcode by configuring correct certificates and provisioning profiles:
Go to Xcode > Select Generic Device in Devices Pan > Product > Achieve
EDIT: How to get the build?
After clicking on achieve, It will take some time to get binaries bind into build and after that it will give you some options to add preferable provisioning profiles. After completing all the process you get an option to download build. Just choose your preferred location to download and it will be downloaded. Open the downloaded folder and get your ipa.
Solution 2:[2]
There are two ways to do that
1. Using build ipa
flutter build ipa --export-options-plist="---/build/ios/archive/ProjectName.xcarchive/Info.plist" // Add abosulte path(Exact location of file in disk)
2. Using build ios
- Run
flutter build ios
(it will generateAppName.app
file) - Find above generated file in project structure
build/ios/iphoneos/AppName.app
(go to this location through finder)
Copy
AppName.app
and create aProjectName
folder on desktop or any location and pasteAppName.app
inside the newly created folder.Compress the
ProjectName
folder(It will look likeProjectName.zip
)Finally, Rename
ProjectName.zip
toProjectName.ipa
and use this .ipa
Sometimes, the first may not work due to certification issues, but the second should work always.
Solution 3:[3]
None of the above worked for me so this is what I did:
- Run:
flutter build ios --release
- Go to Xcode -> select Any iOS Device
- Select product -> archive
- Once done, In the popup dialog, select distribute then select Adhoc (Install on designated devices) then click next
- On the next page, select none for app thinning then click next
- Select automatically manage signing then click next or manually manage signing if you want to change the provisioning profile then, click next
- Click export, then select the desired location you want to save the ipa then click export.
- Once done, where you exported to should have the ipa. You can upload this ipa to firebase app distribution or where neccessary.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ATV |
Solution 2 | |
Solution 3 |