David
David

Reputation: 161

Firebase Error - Requests from this iOS application <empty> are blocked

We are developing an Ionic App, with Firebase. This is an old project, running with Ionic v1. We are building on PhoneGap :

PhoneGap (iOS / Android / Windows)
cli-7.1.0 (4.5.4 / 6.3.0 / 5.0.0)

Everything was working fine and to release the app we want to secure access to Firebase.

To secure access to Firebase, we restricted access to GoogleAPI key from Google developer Console as explained here :

And we are having trouble with the iOS version (works fine for Android).

What we did :

  1. Create an iOS app in Firebase project
  2. Export GoogleService-Info.plist and include it in config.xml :

:

<platform name="ios">    
   <resource-file src="GoogleService-Info.plist" />
</platform>
  1. Restrict access to our bundle id in Google Developer Console

Now we have this error:

Error : {"error":{"code":403,"message":"Requests from this ios client application are blocked.","errors":[{"message":"Requests from this ios client application are blocked.","domain":"global","reason":"forbidden"}],"status":"PERMISSION_DENIED"}}

I have been looking for two days, but I do not understand:

Upvotes: 16

Views: 5621

Answers (2)

Hideyasu.T
Hideyasu.T

Reputation: 875

I had same problem.
For my case,First implement Firebase and then GoogleLogn.
It may be change that Bundle Id for application because of nothing to change.
So I check Firebase bundle ID and then in the Xcode Bundle Id became different.
I put firebase bundle Id in Xcord Project.
And then Fix this problem.

enter image description here

Upvotes: -1

zeynep tokcan
zeynep tokcan

Reputation: 11

I had the same issue and I checked GoogleService-Info.plist. Database url was different with my project. So, be sure that all components match with your project.

This solved my issue!

Upvotes: 1

Related Questions