[ 
https://issues.apache.org/jira/browse/CB-12509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15885573#comment-15885573
 ] 

Sachitra Malwatte edited comment on CB-12509 at 2/27/17 11:00 AM:
------------------------------------------------------------------

Tested with latest cordova version but issue exists
cordova cli: 6.5.0
cordova-ios: 4.3.1
This issue is reproducible in simulator as well.
I manually copied localstorage files from old location to new location and I 
was able get old local storage data
Old files
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/63263C1A-4093-47EB-8F02-9ECB2E6E379A/Library/WebKit/LocalStorage/file__0.localstorage
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/63263C1A-4093-47EB-8F02-9ECB2E6E379A/Library/WebKit/LocalStorage/file__0.localstorage-wal
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/63263C1A-4093-47EB-8F02-9ECB2E6E379A/Library/WebKit/LocalStorage/file__0.localstorage-shm

Copied to this location
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/A5499C1C-FB6D-4B28-9927-E7A13FFE9913/Library/Caches/file__0.localstorage\
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/A5499C1C-FB6D-4B28-9927-E7A13FFE9913/Library/Caches/file__0.localstorage-wal\
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/A5499C1C-FB6D-4B28-9927-E7A13FFE9913/Library/Caches/file__0.localstorage-shm

I think Cordova does not copy old localstorage to new location after app is 
updated.
No idea why it behaves differently in iOS 10.2 only.
Can anyone please point me to the code where old local storage files are copied 
(in CDVLocalStorage)?
I really need to get this fixed.


was (Author: sachitra):
ested with latest cordova version but issue exists
cordova cli: 6.5.0
cordova-ios: 4.3.1
This issue is reproducible in simulator as well.
I manually copied localstorage files from old location to new location and I 
was able get old local storage data
Old files
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/63263C1A-4093-47EB-8F02-9ECB2E6E379A/Library/WebKit/LocalStorage/file__0.localstorage
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/63263C1A-4093-47EB-8F02-9ECB2E6E379A/Library/WebKit/LocalStorage/file__0.localstorage-wal
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/63263C1A-4093-47EB-8F02-9ECB2E6E379A/Library/WebKit/LocalStorage/file__0.localstorage-shm

Copied to this location
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/A5499C1C-FB6D-4B28-9927-E7A13FFE9913/Library/Caches/file__0.localstorage\
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/A5499C1C-FB6D-4B28-9927-E7A13FFE9913/Library/Caches/file__0.localstorage-wal\
Devices/9D3BC7A7-A6AD-4765-9324-A0A72C600CA5/data/Containers/Data/Application/A5499C1C-FB6D-4B28-9927-E7A13FFE9913/Library/Caches/file__0.localstorage-shm

I think Cordova does not copy old localstorage to new location after app is 
updated.
No idea why it behaves differently in iOS 10.2 only.
Can anyone please point me to the code where old local storage files are copied 
(in CDVLocalStorage)?
I really need to get this fixed.

> LocalStorage not persistent when app is updated (cordova ios 3.8.0 -> 4.1.1) 
> in iOS 10.2
> ----------------------------------------------------------------------------------------
>
>                 Key: CB-12509
>                 URL: https://issues.apache.org/jira/browse/CB-12509
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 4.1.1
>            Reporter: Sachitra Malwatte
>
> I have a app built with cordova ios 3.8.0.
> When I updated the app to new version which is built with 4.1.1 LocalStorage 
> returns empty. I cannot retrieve the data saved by previous version.
> Works in iOS 8 and 9
> Does not work in iOS 10.2
> Please help.
> Cordova-ios: current 4.1.1, previous 3.8.0
> Cordova CLI: current 6.1.1
> xcode: current 7.2.1



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to