Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrates RCPurchases #758

Merged
merged 10 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions PublicSDKAPITester/RCEntitlementInfoAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
// Copyright © 2021 Purchases. All rights reserved.
//


@import Purchases;
@import PurchasesCoreSwift;
taquitos marked this conversation as resolved.
Show resolved Hide resolved

#import "RCEntitlementInfoAPI.h"
Expand Down
1 change: 0 additions & 1 deletion PublicSDKAPITester/RCEntitlementInfosAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// Copyright © 2021 Purchases. All rights reserved.
//

@import Purchases;
@import PurchasesCoreSwift;

#import "RCEntitlementInfosAPI.h"
Expand Down
2 changes: 1 addition & 1 deletion PublicSDKAPITester/RCIntroEligibilityAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2021 Purchases. All rights reserved.
//

@import Purchases;
@import PurchasesCoreSwift;
#import "RCIntroEligibilityAPI.h"

@implementation RCIntroEligibilityAPI
Expand Down
2 changes: 1 addition & 1 deletion PublicSDKAPITester/RCOfferingAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2021 Purchases. All rights reserved.
//

@import Purchases;
@import PurchasesCoreSwift;
#import "RCOfferingAPI.h"

@implementation RCOfferingAPI
Expand Down
2 changes: 1 addition & 1 deletion PublicSDKAPITester/RCOfferingsAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2021 Purchases. All rights reserved.
//

@import Purchases;
@import PurchasesCoreSwift;

#import "RCOfferingsAPI.h"

Expand Down
10 changes: 4 additions & 6 deletions PublicSDKAPITester/RCPurchasesAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Created by Joshua Liebowitz on 6/18/21.
//

@import Purchases;
@import PurchasesCoreSwift;
@import StoreKit;

Expand Down Expand Up @@ -43,6 +42,9 @@ + (void)checkAPI {
// TODO: iOS ONLY, TEST FOR THIS API BY LOOKING UP SELECTOR
// [p presentCodeRedemptionSheet];
RCPurchases *p = [RCPurchases configureWithAPIKey:@""];
[RCPurchases configureWithAPIKey:@"" appUserID:@""];
[RCPurchases configureWithAPIKey:@"" appUserID:@"" observerMode:false];
[RCPurchases configureWithAPIKey:@"" appUserID:@"" observerMode:false userDefaults:nil];

[RCPurchases setLogHandler:^(RCLogLevel l, NSString *i) {}];
canI = [RCPurchases canMakePayments];
Expand Down Expand Up @@ -70,10 +72,7 @@ + (void)checkAPI {
SKPaymentDiscount *skmd = [[SKPaymentDiscount alloc] init];

RCPackage *pack = [[RCPackage alloc] initWithIdentifier:@"" packageType:RCPackageTypeCustom product:skp offeringIdentifier:@""];
[RCPurchases configureWithAPIKey:@"" appUserID:@""];
[RCPurchases configureWithAPIKey:@"" appUserID:@"" observerMode:false];
[RCPurchases configureWithAPIKey:@"" appUserID:@"" observerMode:false userDefaults:nil];


[p invalidatePurchaserInfoCache];

NSDictionary<NSString *, NSString *> *attributes = nil;
Expand Down Expand Up @@ -103,7 +102,6 @@ + (void)checkAPI {
[p restoreTransactionsWithCompletionBlock:^(RCPurchaserInfo *i, NSError *e) {}];
[p syncPurchasesWithCompletionBlock:^(RCPurchaserInfo *i, NSError *e) {}];
[p checkTrialOrIntroductoryPriceEligibility:@[@""] completionBlock:^(NSDictionary<NSString *,RCIntroEligibility *> *d) { }];
[p checkTrialOrIntroductoryPriceEligibility:@[@""] completionBlock:^(NSDictionary<NSString *,RCIntroEligibility *> *r) { }];
[p paymentDiscountForProductDiscount:skpd product:skp completion:^(SKPaymentDiscount *d, NSError *e) { }];
[p purchaseProduct:skp withDiscount:skmd completionBlock:^(SKPaymentTransaction *t, RCPurchaserInfo *i, NSError *e, BOOL userCancelled) { }];
[p purchasePackage:pack withDiscount:skmd completionBlock:^(SKPaymentTransaction *t, RCPurchaserInfo *i, NSError *e, BOOL userCancelled) { }];
Expand Down
2 changes: 1 addition & 1 deletion PublicSDKAPITester/RCPurchasesErrorUtilsAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//
// Created by César de la Vega on 7/21/21.

@import Purchases;
@import PurchasesCoreSwift;
@import StoreKit;

#import "RCPurchasesErrorUtilsAPI.h"

Expand Down
1 change: 0 additions & 1 deletion PublicSDKAPITester/RCTransactionAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// Copyright © 2021 Purchases. All rights reserved.
//

@import Purchases;
@import PurchasesCoreSwift;

#import "RCTransactionAPI.h"
Expand Down
142 changes: 69 additions & 73 deletions Purchases.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

68 changes: 0 additions & 68 deletions Purchases/ProtectedExtensions/RCPurchases+Protected.h

This file was deleted.

2 changes: 0 additions & 2 deletions Purchases/Public/Purchases.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ FOUNDATION_EXPORT double PurchasesVersionNumber;
Purchases version string
*/
FOUNDATION_EXPORT const unsigned char PurchasesVersionString[];

#import "RCPurchases.h"
Loading