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
{{ message }}
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
The path returned in the completion handler (data.localPath) will always point to the downloaded data, across app updates.
Actual Behaviour
When the app is updated, it seems that iOS assigns the app a new UUID. Since the path returned in the completion handler is based on the UUID, it is no longer valid.
For now, my workaround has been to use cordova-plugin-file to determine the path dynamically (cordova.file.dataDirectory with the name of the zip's folder added).
Steps to Reproduce
Create a new Cordova app with cordova-ios
Create a zip file with an image in it
Download this zip file using this plugin, and save data.localPath in the completion handler
Use this saved path to display the image in app
Bump the version of the app in config.xml (e.g. from 0.0.1 to 0.0.2), and re-run the app
The image no longer displays, as the path is no longer valid
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 12.1.1
Cordova CLI version and cordova platform version
cordova 8.1.2
cordova-ios 4.5.4
Plugin version
1.4.2
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected Behaviour
The path returned in the completion handler (
data.localPath
) will always point to the downloaded data, across app updates.Actual Behaviour
When the app is updated, it seems that iOS assigns the app a new UUID. Since the path returned in the completion handler is based on the UUID, it is no longer valid.
For now, my workaround has been to use cordova-plugin-file to determine the path dynamically (
cordova.file.dataDirectory
with the name of the zip's folder added).Steps to Reproduce
data.localPath
in the completion handlerPlatform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 12.1.1
Cordova CLI version and cordova platform version
cordova 8.1.2
cordova-ios 4.5.4
Plugin version
1.4.2
The text was updated successfully, but these errors were encountered: