Currently, subscription data cannot be shared between the main app and extensions because internally you store profile data in the UserDefaults.standard. As a result, each extension must individually fetch subscription status.
To address this issue, you can include a userDefaults parameter in the Adapty.activate method, allowing the profile data to be stored in an app group.
Adapty.activate(
"adapty-api-key",
customerUserId: "user-id",
userDefaults: .init(suiteName: "group.com.example")
)
Currently, subscription data cannot be shared between the main app and extensions because internally you store profile data in the
UserDefaults.standard. As a result, each extension must individually fetch subscription status.To address this issue, you can include a
userDefaultsparameter in theAdapty.activatemethod, allowing the profile data to be stored in an app group.