Warning: Undefined array key "pathway" in /home/clients/160b20c93964292618c158d21ce27bf5/sites/tech.org-services.ch/wp-content/themes/Newspaper/functions.php on line 543
Monday, December 5, 2022
HomeiOS Developmentios - The right way to obtain photos with reminiscence from firebase...

ios – The right way to obtain photos with reminiscence from firebase storage


I’m attempting to obtain with reminiscence to retrieve a picture that’s saved in firebase storage however I’m not sure tips on how to write my code do I take advantage of the folder path or the consumer picture url ? I’ve the storage reference going to the folder path and the starsRef going the folder path photos identify it’s saved underneath however no picture is showing. What’s the appropriate technique to write the code to obtain photos with reminiscence ?

// that is the folder path
let storage =  Storage.storage().reference(withPath: "gs://.appspot.com") 

// that is the picture folder in firebase storage  
let starsRef = storage.baby("ProfileImages")

   
starsRef.getData(maxSize: 1 * 1024 * 1024) { knowledge, error in
    if error != nil {
    // Uh-oh, an error occurred!
  } else {
    // Knowledge for "photos/island.jpg" is returned
    let picture = UIImage(knowledge: knowledge!)
  }
}
starsRef.downloadURL { url, error in
    if error != nil {
    // Deal with any errors
  } else {
    // Get the obtain URL for 'photos/stars.jpg'
  }
}

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments