You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
sebringj
changed the title
ios source file path begins with "/" and not "file://" returns nil
nil always returned when ios source file path begins with "/"
Jun 27, 2016
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
The text was updated successfully, but these errors were encountered: