Yimin Rong
Yimin Rong

Reputation: 2027

iOS - truly persistent data?

I'm exploring a business model that specifies how many times a (costly) function may be invoked per user in an application.

Right now whatever I save, e.g. user defaults, gets deleted when the app is deleted. When the app is reinstalled, the counter is back to zero.

What I need is a way to save information such that deleting the app still leaves the information intact.

I've seen examples that mimic the deprecated unique identifier, but that's per device, which is not what I'm looking for.

Upvotes: 1

Views: 144

Answers (1)

Yimin Rong
Yimin Rong

Reputation: 2027

KeyChains appear to be the right way to go. I can store a unique ID there specific to the user as well as in the user defaults and that way can track also if the app was reinstalled.

Upvotes: 1

Related Questions