NSUserDefaults

Is there any way to access NSUserDefaults on IOS?

I have an app written in objective c and want to do a corona version, I want my current users to keep their info that is stored in NSUserDefaults, obviously once I can read te data I can store it in another way, like using ice. [import]uid: 8697 topic_id: 21449 reply_id: 321449[/import]

That is exactly what the PropertyBag was created for, it was to have NSUserDefault functionality and the idea was for Ansca to integrate it into corona, it was offered at the time for free, it is no longer available.

Ice is a good alternative, though it relies on a database which can be a bit expensive in an app. [import]uid: 3826 topic_id: 21449 reply_id: 84925[/import]

Sooooo…there is no way to do this? [import]uid: 8697 topic_id: 21449 reply_id: 84942[/import]

You’re sort of in a catch 22 situation. If you could read the NSUserDefaults with Corona then you could easily use Ice or something similar to then save them out for your app however if you can read the Defaults then it stands to reason that you could also write them out which would mean you wouldn’t need Ice in the first place.

What might be a good, not necessarily workable, idea is to make an update to your current native version that allows a user to export their defaults and upload them to your server, they would then get given a unique URL or a code or something depending on what security is needed and then in your Corona version you allow them to download that file and then place the data into Ice or something similar. It would be fairly tricky to make sure everyone is aware of this before they Update to the Corona version though. [import]uid: 5833 topic_id: 21449 reply_id: 85164[/import]

Hi,

Just pushing this one back out there as I need to do the same thing.

Does anyone have any idea as to whether this is possible (or is likely to be possible in the future) in a way that will work seamlessly when the app is updated (i.e.: I don’t want to ask people to export, upload to a server etc.)

Thanks in advance,

Ian [import]uid: 123492 topic_id: 21449 reply_id: 113325[/import]

Does anyone have any idea whether this is / will be possible? I have an old app built in objective c and want to release a corona version where users can keep their data so I need to read from nsuserdefaults on their current device.

Any help / suggestions much appreciated.

Thanks in advance.

Ian [import]uid: 123492 topic_id: 21449 reply_id: 124820[/import]

It’s on the Roadmap [import]uid: 8697 topic_id: 21449 reply_id: 124821[/import]

Thanks. I may be missing something but the roadmap says:

“Access to setting NSUserDefaults”

I don’t need to set NSUserDefaults - I need to retrieve old values from NSUserDefaults that were stored on the user’s device by my previous version of the app. This way I can import all their old data into a DB and they can retain their scores etc.

Does anyone know if this functionality is likely to be included? [import]uid: 123492 topic_id: 21449 reply_id: 124824[/import]

Does anyone have any idea whether this is / will be possible? I have an old app built in objective c and want to release a corona version where users can keep their data so I need to read from nsuserdefaults on their current device.

Any help / suggestions much appreciated.

Thanks in advance.

Ian [import]uid: 123492 topic_id: 21449 reply_id: 124820[/import]

It’s on the Roadmap [import]uid: 8697 topic_id: 21449 reply_id: 124821[/import]

Thanks. I may be missing something but the roadmap says:

“Access to setting NSUserDefaults”

I don’t need to set NSUserDefaults - I need to retrieve old values from NSUserDefaults that were stored on the user’s device by my previous version of the app. This way I can import all their old data into a DB and they can retain their scores etc.

Does anyone know if this functionality is likely to be included? [import]uid: 123492 topic_id: 21449 reply_id: 124824[/import]