From eb49d3e8de792ab409683cfb70e91cb1fbf2537a Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Wed, 20 Jan 2021 15:36:00 -0300 Subject: [PATCH] re-added the public-facing changes for identity v3 --- Purchases/Public/RCPurchases.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Purchases/Public/RCPurchases.h b/Purchases/Public/RCPurchases.h index 9eea832971..dfb7b98639 100644 --- a/Purchases/Public/RCPurchases.h +++ b/Purchases/Public/RCPurchases.h @@ -161,7 +161,8 @@ NS_SWIFT_NAME(Purchases) If a user tries to purchase a product that is active on the current app store account, we will treat it as a restore and alias the new ID with the previous id. */ -@property (nonatomic) BOOL allowSharingAppStoreAccount; +@property (nonatomic) BOOL allowSharingAppStoreAccount + __attribute((deprecated("Configure behavior through the RevenueCat dashboard instead."))); /// Default to YES, set this to NO if you are finishing transactions with your own StoreKit queue listener @property (nonatomic) BOOL finishTransactions; @@ -193,13 +194,26 @@ NS_SWIFT_NAME(createAlias(_:_:)); @param appUserID The appUserID that should be linked to the currently user */ - (void)identify:(NSString *)appUserID completionBlock:(nullable RCReceivePurchaserInfoBlock)completion -NS_SWIFT_NAME(identify(_:_:)); +NS_SWIFT_NAME(identify(_:_:)) __attribute((deprecated("Use logIn instead."))); /** * Resets the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache. */ - (void)resetWithCompletionBlock:(nullable RCReceivePurchaserInfoBlock)completion -NS_SWIFT_NAME(reset(_:)); +NS_SWIFT_NAME(reset(_:)) __attribute((deprecated("Use logOut instead."))); + +/** + This function will identify the current user with an appUserID. + @param appUserID The appUserID that should be linked to the currently user + */ +- (void) logIn:(NSString *)appUserID +completionBlock:(void (^)(RCPurchaserInfo *_Nullable purchaserInfo, BOOL created, NSError *error))completion +NS_SWIFT_NAME(logIn(_:_:)); + +/** + Resets the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache.*/ +- (void)logOutWithCompletionBlock:(nullable RCReceivePurchaserInfoBlock)completion +NS_SWIFT_NAME(logOut(_:)); #pragma mark Attribution