Closed cr0ybot closed 5 years ago
Do you use SDK 8? I noticed this on that version as well and could not reproduce it on SDK 7.x. @jquick-axway, was there a change regarding file handling in SDK 8?
I am happy to merge this, but it may break SDK 7.x then.
I am using SDK 8 right now, but v2.3.0 works without issue. Was the 3.0.0 module built using 8?
Titanium 7.5.0 fixed several path handling bugs on Android. See... https://github.com/appcelerator/titanium_mobile/pull/10304
So, I'm guessing this module was depending on broken behavior? If the config file is always in root "assets/Resources" directory, then using an absolute path /google-services.json
is the correct solution.
Currently, Android and iOS handle relative paths differently. On iOS, paths are always relative to the "Resources" directory. On Android, paths are always relative to the currently executing JS file (like node.js).
iOS works the way a native app developers expects. Android works the way a web developer expects. Neither way is technically wrong, but it is a parity issue that the team hasn't settled on yet.
If I remember correctly, iOS handles both relative anr absolute, using fallbacks. At least for images, this works good. Lets use absolute paths then
I just pushed a fix that also fixes this for existing file
arguments, so those are migrated as well. Thanks for the @cr0ybot in any case! 3.0.1 has just been released.
The
KrollProxy.resolveUrl()
method "Resolves the passed in scheme / path, and uses the Proxy's creationUrl if the path is relative." Setting the default filename to an absolute path will search for the file in the root ofResources/
(app/assets/android/
) instead of afirebase.core/
subfolder.Should resolve issue #32.