-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update StorageUI integration with SDWebImage #841
Conversation
… a specify loader instead of dummy manager
8282c4c
to
e7a80d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the README!
@morganchen12 Hi. After I update the demo to try the code, I found the strange exception thrown from Storage. I use the URI However, the official documentation told me it's OK to pass the Full URI into the https://firebase.google.com/docs/storage/ios/create-reference Which is correct ? Is this exception the designed behavior ? And whatever, this need to be fixed (I need another PR) |
If I can not init a full URI into the Found solution, currerntly I use the Tetsted two bucket's URI, works fine. It's public bucket so you can test it as well.
|
@dreampiggy the reason the crash happens is because you're trying to initialize a bucket with a full path to a specific file. The bucket is just the host (as you've found out). I'm not sure why we don't allow creating a reference without first initializing the bucket. |
@morganchen12 So you means this is the correct behavior but not bug, that it's not allowed to init a full gs URI into StorageReference ? But seems we need to update the documentation there. It cause misunderstanding, because actually, you can not write code like this in document: // This is equivalent to creating the full reference
let storagePath = "\(your_firebase_storage_bucket)/images/space.jpg"
spaceRef = storage.reference(forURL: storagePath) This will cause crash on exception, and worse, Swift can not even handle Objective-C's NSException, dangerous. PS: Actuallly I think it's really convenient to construct a full gs URI into StorageReference, not a bug. What reason cause the Core Firebase iOS Team make decision to disable this usage ? |
Seems the code comes from the Day 1 of FirebaseStorage 😭 https://github.com/firebase/firebase-ios-sdk/blame/master/FirebaseStorage/Sources/FIRStorage.m#L132 The documentation does not write correctly for that |
I'll see what we can do to change the behavior of Firebase Storage. |
Hey there! So you want to contribute to FirebaseUI? Before you file this pull request, follow these steps:
This PR add the following features:
gs://
URl directly, not always need to create a wrapperFIRStorageReference
.The dependency of SDWebImage bumped to 5.6.0, beucase of the PR feature 1 need the new API.
CC @morganchen12