I want to add my flutter IOS app into my firebase project. After running these commands consecutively,
flutter clean
flutter packages upgrade
dart pub global activate flutterfire_cli
flutterfire configure --project=firebase_project_name
I keep getting the following error in my firebase-debug.log
:
[info] Create your IOS app in project project_name:
[debug] [2023-01-03T09:49:49.951Z] >>> [apiv2][query] POST https://firebase.googleapis.com/v1beta1/projects/project_name/iosApps [none]
[debug] [2023-01-03T09:49:49.952Z] >>> [apiv2][body] POST https://firebase.googleapis.com/v1beta1/projects/project_name/iosApps {"displayName":"electric_viewing_ios (ios)","bundleId":"com.elec_view.electric_viewing_ios"}
[debug] [2023-01-03T09:49:50.566Z] <<< [apiv2][status] POST https://firebase.googleapis.com/v1beta1/projects/project_name/iosApps 400
[debug] [2023-01-03T09:49:50.567Z] <<< [apiv2][body] POST https://firebase.googleapis.com/v1beta1/projects/project_name/iosApps {"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT"}}
[debug] [2023-01-03T09:49:50.569Z] HTTP Error: 400, Request contains an invalid argument.
[debug] [2023-01-03T09:49:50.894Z] FirebaseError: HTTP Error: 400, Request contains an invalid argument.
at responseToError (C:\Users\ipasn\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:49:12)
at RetryOperation._fn (C:\Users\ipasn\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:288:77)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[error]
Where am I going wrong? Please help me.
CodePudding user response:
I think there are some places where there the default bundle id still exist.
By default "CFBundleIdentifier" support to be the ${PRODUCT_BUNDLE_IDENTIFIER}
. I think you changed it directly in the Info.plist.
Just try to revert these changes & search for PRODUCT_BUNDLE_IDENTIFIER
in the vscode project. You will see there are few pages (or one depanding on your project target platforms) where this key is still mapping to the old bundle id. Change the bundle ids in these places to your required bundle id.
Mainly for mobile you have to make changes in project.pbxproj
.
Then retry flutter clean
& flutterfire configure
command again.
CodePudding user response:
After much surfing, I found out that firebase
doesn't allow underscores( _ ) in bundle ID
, removing that and then reconfiguring again solved the issue.