Issue
Operating System
iOS 16.5
Browser Version
Capacitor iOS WebView
Firebase SDK Version
9
Firebase SDK Product:
Storage
Describe your project's tooling
Ionic Angular Capacitor
Describe the problem
No output for getDownloadUrl
when served from capacitor://localhost
(native app) when running command 'ionic cap build ios' and running the project from Xcode but works from http://localhost
when running command 'ionic cap run ios -l --external --open '
I tried using then/catch and tried try/catch with no hope, and checked the source code of the library and seems the lib doesn't through an error if there. I tried to edit the lib from node_modules but with the build process of tree shaking, minification, uglification, and removing console.logs() that was super hard. I know that Google mustn't support strange protocols like capacitor://localhost but that how 30% of the market apps uses right now, can I get little help please what is going wrong? maybe some whitelisting maybe some storage permissions? I spent 10 hours straight debugging this, but with no good news...
Steps and code to reproduce issue
in 'http://localhost'
getDownloadURL(storageRef)
.then((res) => {
console.log(res); //working
})
.catch((err) => {
console.log(err); //no output
});
in 'capacitor://localhost'
getDownloadURL(storageRef)
.then((res) => {
console.log(res); //no output
})
.catch((err) => {
console.log(err); //no output
});
Your help is appreciated.
Solution
it is fixed in the latest angular-fire version, you can use it and this will solve the issue
Answered By - Amr Hassan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.