Firebase questions

I am working on creating an app, I had a friend who was creating this with me. He created our database in firebase but is no longer working on the app. Now the app is in beta released with my bundle ID etc, and has no date populating the screen. Would the different database IDs be the cause of this?

Hi Cam, welcome to the community!

I’m confused,
Did you create a new Firebase project and add that to the app?
Or are you still using your friends Firebase project?

Im still using my friends, my question is do i need to make a new one with my bundle id etc for the app to run properly?

The app should keep running as long as they don’t delete the project.

But considering you’re no longer working with him, I’d create a new Firebase project, with a new google service info.plist

Is there a way to copy a firebase database?

You can export the data in it to a JSON file if you want

I made a new database and now the app doesn’t show part of the cell it should…each cell has a picture in it and those are not showing

What are you using to display the images in your app?

You downloaded the data, and made sure to use a new GoogleService-Info.plist?

yes i did use a new plist

And you have the exact same data in your Firebase database? As the original project?

where are your pictures from? if it was local then maybe you forgot to also copy the assets, if its only make sure that UIImage you are looking is a network image not a named local image

Each cell has a photo were the American flag ball is and there should be data in the cell…

Are you getting the data back from the database??

Can you print it and you’re getting what you want?

i don’t know what you are saying, the data is in firebase. I switched firebase accounts with all the same data and updated it in the code. Now all I get are empty cells.

When you fetch data from Firebase. Can you print that data to the console??? If not, then you’re not fetching the data properly.

If you can, then you’re not populating the cells properly

what do you mean by print the date to the console? Are you asking if it shows in the app inside Xcode?

Essentially what Mikaela is getting at is to use print statements after you retrieve your data to prove that your code is in fact fetching data from the database. The print statements will output to the Debug console.

2 Likes

ooo ok, thats a great help. Since I import firebase, firebasStoreage and the UI would it just print out everything as a json ? or do I need to be more specific

Hi Cam,

It’s becoming more obvious as this thread gets longer that you are struggling to understand how Firebase works. It’s essential that you do in order to get this App working.

It would be an advantage if you were to follow a tutorial so that you understand how to write records and retrieve records and how to extract the data from the records retrieved.

This is a 3 part series on YouTube and hopefully it will give you a bit of a grounding in how Firestore works.
Lesson 1: https://www.youtube.com/watch?v=P1cNScXGlVI
Lesson 2: https://www.youtube.com/watch?v=OunS3tLLrPY
Lesson 3: https://www.youtube.com/watch?v=qA9L3_cK9Z0

1 Like