Skip to content

Commit

Permalink
Update limits article + fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Sep 23, 2024
1 parent fe1591c commit e046322
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Sources/FreemiumKit/FreemiumKit.docc/FAQ/FAQ-Privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Secondly, we **don't keep the data for long**: The moment the FreemiumKit app on
To ensure your data is backed up and syncs across devices, we use CloudKit. This way, even if you delete the FreemiumKit app or lose your device, you can just reinstall FreemiumKit on another device and your full purchase history statistics will stay available within the same Apple Account.

If you happen to stop using the FreemiumKit app for some reason, new purchases are kept up to 90 days on our servers. So you'll always be able to fetch tha last 90 days if you decide to return. If you have push notifications disabled, you need to open the app at least once every 90 days to not lose any purchase history data. If you returned after 100 days, you would lose 10 days of data, for example.
If you happen to stop using the FreemiumKit app for some reason, new purchases are kept up to 90 days on our servers. So you'll always be able to fetch the last 90 days if you decide to return. If you have push notifications disabled, you need to open the app at least once every 90 days to not lose any purchase history data. If you returned after 100 days, you would lose 10 days of data, for example.

That's why we strongly recommend to **keep push notifications enabled** on FreemiumKit for iPhone, even if you don't wish to actually receive push notifications. You can turn off push notifications within the FreemiumKit app, which will disable the local push notification sent by the app while woken up in the background by a silent push notification. This way, the app will continue fetching purchase data without bothering you with push notifications.

Expand Down
18 changes: 5 additions & 13 deletions Sources/FreemiumKit/FreemiumKit.docc/FAQ/FAQ-ServerLimits.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ FreemiumKit uses the built-in `appDeviceToken` in StoreKit 2 to recognize the sa

## Full Answer

If you have your own server-side logic for locking/unlocking functionality based on usage (such as '100 posts per month'), you will want to identify the same user across app installs or devices. To do this, you can access `appAccountToken` on the `FreemiumKit` environment object which will return a `UUID` stored right within StoreKit (so Apple makes sure you recognize the same user across devices – we don't that data on our servers).
If you have your own server-side logic for locking/unlocking functionality based on usage (such as '100 posts per month'), you will want to identify the same user across app installs or devices. To do this, you can access `appAccountToken` on the `FreemiumKit` environment object which will return a `UUID` stored right within StoreKit (so Apple makes sure you recognize the same user across devices – we don't store that data on our servers).

Access the field only after purchases are loaded like so:
Access the field after purchases are loaded like so:

```swift
import FreemiumKit
Expand All @@ -27,17 +27,9 @@ struct MyView: View {
VStack {
// your main view ...
}
.onAppear {
if freemiumkit.purchasesLoaded {
let appAccountToken: UUID = freemiumKit.appAccountToken
// do something with the app account token
}
}
.onChange(of: freemiumKit.purchasesLoaded) {
if freemiumkit.purchasesLoaded {
let appAccountToken: UUID = freemiumKit.appAccountToken
// do something with the app account token
}
.onPurchasesLoaded {
let appAccountToken: UUID = freemiumKit.appAccountToken
// do something with the app account token
}
}
}
Expand Down

0 comments on commit e046322

Please sign in to comment.