Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Observer mode: add usesStoreKit2IfAvailable parameter
Browse files Browse the repository at this point in the history
This is required since RevenueCat/purchases-ios#3032.
  • Loading branch information
NachoSoto committed Aug 23, 2023
1 parent b1b49fe commit ee6add7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code_blocks/➡️ Migrating To RevenueCat/observer-mode_2.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
RCConfigurationBuilder *configuration = [RCConfiguration builderWithAPIKey:@<public_sdk_key>];
configuration = [configuration withObserverMode:YES];
configuration = [configuration withAppUserID:@<app_user_id>];
// If your app uses StoreKit 2, you must enable it in the SDK
configuration = [configuration withUsesStoreKit2IfAvailable:YES];
[RCPurchases configureWithConfiguration:[configuration build]];
2 changes: 2 additions & 0 deletions projects/iOS/DocsTester/Sources/DocsTester/DocsTester.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ final class Container {
.with(observerMode: true)
// Optionally set an app user ID for the user
.with(appUserID: UserManager.appUserID)
// If your app uses StoreKit 2, you must enable it in the SDK
.with(usesStoreKit2IfAvailable: true)
.build()
)
// END
Expand Down

0 comments on commit ee6add7

Please sign in to comment.