2 Replies
      Latest reply on Nov 9, 2019 7:27 AM by Praveen S Javali
      Praveen S Javali Level 1 Level 1 (0 points)

        Hi Team, We are using following different concepts for storing the users data in the device in our hybrid mobile application and even though the app is killed or closed from background we should get the stored values, Because our app should work in offline as well. We are using below code to store. (language:jquery) 1.localStorage.put("some key", "somevalue") 2.preference.put("some key", "somevalue") 3.globalpreference.put("some key", "somevalue") 4.memorypreference.put("some key", "somevalue") And we are below code to retrive back. 1.localstorage.get("some key") 2.preference.get("some key") 3.globalpreference.get("some key") 4.memorypreference.get("some key) This concept was working 100% till iOS version 12.4.2 But this concept not working in iOS version 13.1, 13.2 The data will retain only when the app is in active state. But the stored key itself is deleted once we kill or destroyed the app from background task in iOS 13 device (iPad)and check back again. Surprisingly, Our above concept is perfectly working in Xcode 11.2 with iPad stimulator and even it will work on on real device debugging, and also for Lower version device. But when we generate the ipa and downloaded in real device, the data is getting deleted when we kill/close the application without uninstalling. But the same ipa working fine in lower version of real device. Kindly help us regarding this, because there is no code changes and we are unable to debug it because it is working as expected in stimulator. Need help on urgent basis because it is impacting our business for higher version of iPad device. Is there any work around for it?

        • Re: Local storage data getting deleted in ios 13 version in ipad devices
          KMT Level 9 Level 9 (15,145 points)

          Formatted for readability...mostly.

          -=-

           

          Hi Team, We are using following different concepts for storing the users data in the device in our hybrid mobile application and even though the app is killed or closed from background we should get the stored values, Because our app should work in offline as well.

           

          We are using below code to store.

          (language:jquery)
          localStorage.put("some key", "somevalue") 
          preference.put("some key", "somevalue") 
          globalpreference.put("some key", "somevalue") 
          memorypreference.put("some key", "somevalue")

           

          And we are below code to retrive back.

          localstorage.get("some key") 
          preference.get("some key") 
          globalpreference.get("some key") 
          memorypreference.get("some key) 

           

          This concept was working 100% till iOS version 12.4.2 But this concept not working in iOS version 13.1, 13.2

           

          The data will retain only when the app is in active state. But the stored key itself is deleted once we kill or destroyed the app from background task in iOS 13 device (iPad )and check back again.

           

          Surprisingly, Our above concept is perfectly working in Xcode 11.2 with iPad stimulator and even it will work on on real device debugging, and also for Lower version device. But when we generate the ipa and downloaded in real device, the data is getting deleted when we kill/close the application without uninstalling. But the same ipa working fine in lower version of real device.

           

          Kindly help us regarding this, because there is no code changes and we are unable to debug it because it is working as expected in stimulator.

           

          Need help on urgent basis because it is impacting our business for higher version of iPad device. Is there any work around for it?