flutter ios build fail - do i need to enroll apple developer? - ios

I am starter of flutter.
I finished building my first app and I want to export ipa app to give my friends.
I don't want to release to apple app store, I just want to use myself(and my friends).
So, once I input flutter build ios (also i tried flutter build ios --debug ) ,
Running "flutter pub get" in mighty_v2... 4.0s
Building com.example.mightyV2 for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 66H5V644W9
Running pod install... 2,370ms
Running Xcode build...
Xcode build done. 5.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: No profiles for 'com.example.mightyV2' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.mightyV2'. Automatic
signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project
'Runner')
above error was founded.
I already know what is wrong. My problem is, do not enrolled apple developer, and do not enrolled my app profiles init.
So question is, do I have to enroll and give 100$? I just use this app myself although the app is debug mode. I just want light ipa file. What can I do?

It can be two things. First you need to create a iOS App Development provisioning profile,to create that click on Xcode at top of the screen beside apple logo then > preferences > accounts here you will find you apple id and below that you will see download manual profiles and manage certificate options. Create a profile here and clean the build folder then build again.
Second, if you have the provisioning profile and still won't be able to create the .ipa file from Product > Archive then you definitely need a developer account.

You do not need to have a developer account if you are not publishing. However, you will have to open your app in Xcode and go to the Signing & Capabilities tab under Runner to set a Team in order to build. This can be any Apple ID.
Using this method, you will not be able to just send the .ipa to your friends and them easily install it. You will need to push to their phones via Xcode.
I encourage you to checkout Firebase App Distribution as a much easier, free alternative to distribute your app to your friends if you do not want to publish yet.

Related

Flutter iOS could not build the precompiled application for the device

I'm trying to run my Flutter code on a real-device, but I am encountering a code signing issue. See logs.
In Xcode, the project seems to have been using using the right team identifier. I use my machine to work on various Flutter & iOS projects.
Logs
Could not build the precompiled application for the device.
════════════════════════════════════════════════════════════════════════════════
Building a deployable iOS app requires a selected Development Team with a
Provisioning Profile. Please ensure that a Development Team is selected by:
1- Open the Flutter project's Xcode target with
open ios/Runner.xcworkspace
2- Select the 'Runner' project in the navigator then the 'Runner' target
in the project settings
3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team.
You may need to:
- Log in with your Apple ID in Xcode first
- Ensure you have a valid unique Bundle ID
- Register your device with your Apple Developer Account
- Let Xcode automatically provision a profile for your app
4- Build or run your project again
For more information, please visit:
https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
Error launching application on Joshua’s iPhone 13.
If you've encountered this issue, it's likely that the project you just opened is using the old certs.
To make sure you're using the correct certs for your Flutter project, in the command line clear the config:
flutter config --clear-ios-signing-cert
This is going to force your Flutter app to use the new certificates.
Next, restart the terminal.
Last, make sure the Xcode project is using the provisioning profile/s.
From the Projects / left side panel of Xcode, click Runner
Under TARGETS, click Runner
Next, click Signing & Capabilities
Last, choose the correct provisioning profile/s

I think I have done necessary code signing work but build still failing in Ionic

Building an Ionic app to try and test on my iPhone. I downloaded XCode last night and went in and created a profile with my Apple ID, as well as changing the bundle identified in the "General" and "Signing & Capabilities" tab. However when I run "ionic cordova build ios --prod" I get the error:
error: No profiles for 'io.ionic.starter' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'MyApp' from project 'MyApp')
** ARCHIVE FAILED **
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
cordova build ios exited with exit code 65.
Re-running this command with the --verbose flag may provide more information.
It seems to me as though I have done the necessary code signing procedures that I read from Ionic's website, so I am unsure why it still isn't working.
To run the app in your iPhone there are several steps, check these:
You have created your app ID in the website.
You have created your provisioning profile in the website, and downloaded to your computer and added to your Mac (web -> download profile -> double-click)
You have created a development certificate (search how to create a certificate using a Certificate Signing Request generated in your Mac ) and then downloaded that certificate and added to your Mac.
There are two certificates. Distribution certificate is used to publish the app, but development certificate is used simply to run the project in your iPhone, you need that.
But honestly, it's all much easier if you use XCode instead of the console. In the console run the command without --prod, to apply ionic changes to the iOS project. Then if you want to run the app, it's easier if you open XCode and just click play.
With XCode there's the option "Automatically manage signing" that will handle most of this for you automatically. You just have to login to your account using XCode (it will prompt you) and let it do it for you.

Flutter iOS - Build a release version without a real device?

As an Android dev, I've been baffled by the idea of building against targets.
I don't have an iOS device and have been debugging against the iOS simulator.
However, I've gotten to a point where I want to disperse a release .ipa to our internal team. Can this be achieved?
When I run flutter build ios, I see the following:
Xcode's output:
↳
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: Failed to create provisioning profile. There are no devices
registered in your account on the developer website. Plug in and select a
device to have Xcode register it. (in target 'Runner' from project 'Runner')
error: No profiles for 'xxx.xxx.xxx' were found: Xcode couldn't
find any iOS App Development provisioning profiles matching
'xxx.xxx.xxx'. (in target 'Runner' from project 'Runner')
I did google more, and i found it
Provisioning Profile With No Physical Devices
SOLVED:
In case anyone else is having trouble. I had to create a provisioning
profile for Distribution - App Store. And then in Xcode turn off
Automatically manage signing, and select the provisioning profile
manually for Signing(Debug), and Signing (Release).
Now I do not need a physical device to archive, unlike what the linked
duplicate states.

There are no accounts registered with Xcode reported during archive even though there is

Hi I am trying to build an iOS app with Cordova.
The project successfully builds but when I try to release in order to upload to TestFlight with:
sudo cordova build ios --release --device --automaticProvisioning --packageType="app-store"
Then I get the error
error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target '' from project '')
error: No profiles for 'com.' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.'. (in target '' from project '')
But I do have an account and the appropriate certificates and profiles.
Xcode account
Debug profile
Build settings - Signing
Release Profile
I added cocoa pods that were missing. I don't know how the build was successful from Cordova cli???
Second one of my plugins in particular admit-plus was not in the latest version in the config.xml
Fixing those two and everything worked!!!!!
This is the proper "work around" to push to test flight.
1- cordova prepare ios
2- open xcode project, uncheck automatic signing (both dev & release)
3- check back automatic signing
4- select your team
5- cordova build ios
6- build your app from xcode and test on device/simulator
7- from xcode: product -> archive
8- upload your build to appstoreconnect via xcode
9- go to appstoreconnect, then from there put it in test flight

Xcode couldn't find any iOS App Development provisioning profiles matching "App Name"

I am trying to build flutter with one of XCode's simulators but it is giving me this error in the general tab of Runner Xcode
couldn't find any iOS App Development provisioning profiles matching
"App Name"
also the build fails with this error:
ld: library not found for -lFMDB
is it possible to run ios without enrolling to apple developer plans(also is it possible to build IPAs this way?)
Running a Flutter app on an iOS simulator doesn't require an Apple Developer account, unless you need to have some Capabilities enabled in the iOS app for example. If you're using Android Studio, you can run the Flutter app on an iOS simulator easily after it has been set up.

Resources