Open sebringj opened 8 years ago
So, when not providing a uri scheme, the current expectation is that you want to load a file from the application bundle. As such, "file://" is not the assumed scheme; it must be explicitly declared. (As a consequence, "/path/to/file" and "file:///path/to/file" mean very different things -- the first is relative to the app's bundle and the latter is relative to the system root.)
If you are having a problem loading an asset from within the app bundle, please post some code that replicates the problem.
Thanks, Kerri, for making this. The reason this is filed as a bug is because the previous behavior of this code base allowed for this to work. Once I updated this plugin, I found it not working as before and adding the "file://" in front allowed it to work as I expected.
Hi, I'm having the same issue. Prepending file:// or cdvfile:// works on iOS, but it doesn't seem to be working on Android. It gives a file not found error, on that path. Any ideas? Thanks!
Within obtainURLForPath NSString *pathForResource = [self.commandDelegate pathForResource:path];
always is nil prepending "file://" or using "cdvfile://" to the path prior to calling this code will enable it to work as it skips this part.
tested on iphone 6s plus