How to create ipa file in flutter for testing purpose?

41k views Asked by At

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.

3

There are 3 answers

8
Shivam Tiwari On BEST ANSWER

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
Then from the Window menu Choose Product > Archive

EDIT: How to get the build?

After clicking on archive, 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.

2
nivla360 On

None of the above worked for me so this is what I did:

  1. Run: flutter build ios --release
  2. Go to Xcode -> select Any iOS Device
  3. Select product -> archive
  4. Once done, In the popup dialog, select distribute then select Adhoc (Install on designated devices) then click next
  5. On the next page, select none for app thinning then click next
  6. Select automatically manage signing then click next or manually manage signing if you want to change the provisioning profile then, click next
  7. Click export, then select the desired location you want to save the ipa then click export.
  8. Once done, where you exported to should have the ipa. You can upload this ipa to firebase app distribution or where neccessary.
5
Jitesh Mohite On

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

  1. Run flutter build ios (it will generate AppName.app file)
  2. Find above generated file in project structure build/ios/iphoneos/AppName.app(go to this location through finder)
  1. Copy AppName.app and create a ProjectName folder on desktop or any location and paste AppName.app inside the newly created folder.

  2. Compress the ProjectName folder(It will look like ProjectName.zip)

  3. Finally, Rename ProjectName.zip to ProjectName.ipa and use this .ipa

Sometimes, the first may not work due to certification issues, but the second should work always.