How To Integrate/Access Existing GCP Storage Bucket To Firebase Swift App Programmatically?

2,006 views
Skip to first unread message

ddeger

unread,
Aug 26, 2019, 10:45:20 AM8/26/19
to Firebase Google Group

I create buckets on GCP Storage using the Node.js library. Later, I want to access these GCP Storage buckets from my Firebase iOS app. However, I can't. I receive the following error when trying to access my existing GCP buckets from my iOS app:

Your bucket has not been set up properly for Firebase Storage. Please visit https://console.firebase.google.com/project/MY_PROJECT/storage/files to automatically repair this issue and then retry. If the issue lasts longer than five minutes, you may have insufficient permissions to repair the project. You can check your permissions by visiting https://console.firebase.google.com/iam-admin/iam/project?project=MY_PROJECT."

It seems like I need to go to the Firebase Storage console and manually import existing Google Cloud Storage buckets to my Firebase project (as suggested here). 

How can I import existing GCP Storage buckets to my iOS Firebase project programmatically? Or, is there a way to access existing GCP buckets and perform operations on them from my iOS app using Firebase Storage library?

Note: I'm on the Blaze plan. firebase...@system.gserviceaccount.com is added to my existing GCP buckets as Storage admin, just like it is for my default Firebase Storage bucket. A similar question was asked on Stackoverflow by me.

Kato Richardson

unread,
Aug 26, 2019, 3:18:26 PM8/26/19
to Firebase Google Group
Hello ddeger,

From iOS, you should utilize the Firebase iOS SDK for Cloud Storage. There's an example of working with the Firebase SDKs from Node, specifically of using Cloud Functions to process uploaded files and write new ones to the  Firebase storage bucket, demonstrated here

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/deaef1b3-063c-4c01-8049-b23947e4fd56%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

ddeger

unread,
Aug 28, 2019, 10:39:28 AM8/28/19
to Firebase Google Group
Hi Kato,

Thanks for your response. I believe we have a misunderstanding regarding what I want to do. I have GCS buckets that I want to access from my Firebase app. The example you provided is related to performing operations on Firebase default storage bucket. I have GCS buckets that need to be imported into/accessed from my Firebase app. Right now, the only way I was able to access my GCS buckets was by manually importing them from the Firebase console as shown below.

Screen Shot 2019-08-28 at 00.07.25.png


This import operation is a manual process. I want to access my GCS buckets without having to manually importing them from the Firebase Storage website. So, my GCS buckets would be imported/accessed from code. My goal is to learn whether that is possible.

On Monday, August 26, 2019 at 10:18:26 PM UTC+3, Kato Richardson wrote:
Hello ddeger,

From iOS, you should utilize the Firebase iOS SDK for Cloud Storage. There's an example of working with the Firebase SDKs from Node, specifically of using Cloud Functions to process uploaded files and write new ones to the  Firebase storage bucket, demonstrated here

☼, Kato

On Mon, Aug 26, 2019 at 7:45 AM ddeger <in...@voxelcamapp.com> wrote:

I create buckets on GCP Storage using the Node.js library. Later, I want to access these GCP Storage buckets from my Firebase iOS app. However, I can't. I receive the following error when trying to access my existing GCP buckets from my iOS app:

Your bucket has not been set up properly for Firebase Storage. Please visit https://console.firebase.google.com/project/MY_PROJECT/storage/files to automatically repair this issue and then retry. If the issue lasts longer than five minutes, you may have insufficient permissions to repair the project. You can check your permissions by visiting https://console.firebase.google.com/iam-admin/iam/project?project=MY_PROJECT."

It seems like I need to go to the Firebase Storage console and manually import existing Google Cloud Storage buckets to my Firebase project (as suggested here). 

How can I import existing GCP Storage buckets to my iOS Firebase project programmatically? Or, is there a way to access existing GCP buckets and perform operations on them from my iOS app using Firebase Storage library?

Note: I'm on the Blaze plan. firebase...@system.gserviceaccount.com is added to my existing GCP buckets as Storage admin, just like it is for my default Firebase Storage bucket. A similar question was asked on Stackoverflow by me.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.

Kato Richardson

unread,
Aug 28, 2019, 2:26:38 PM8/28/19
to Firebase Google Group
If you want the files to be automatically accessible by Firebase, then you should upload them to the Firebase bucket rather than a GCS bucket not associated with Firebase. So reverse the strategy and start with Firebase and then associate GCS resources as needed.

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/da80df55-faba-433f-b49d-d51b66576d9b%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages