Skip to content

Commit 3294927

Browse files
authored
Merge pull request #1291 from BranchMetrics/SDK-2066
[SDK-2066] Remove deprecated credits code
2 parents 0769416 + 02ce8d1 commit 3294927

File tree

6 files changed

+0
-97
lines changed

6 files changed

+0
-97
lines changed

BranchSDK/Branch.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@ extern NSString * __nonnull const BNCShareCompletedEvent;
152152
// Spotlight Constant
153153
extern NSString * __nonnull const BNCSpotlightFeature;
154154

155-
#pragma mark - Branch Enums
156-
typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
157-
BranchMostRecentFirst,
158-
BranchLeastRecentFirst
159-
};
160-
161155
#pragma mark - BranchLink
162156

163157
@interface BranchLink : NSObject
@@ -820,7 +814,6 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
820814
* Deferred deep linking will not work.
821815
* Generating short links will not work and will return long links instead.
822816
* Sending user tracking events such as `BranchEvents` will fail.
823-
* User rewards and credits will not work.
824817
* Setting a user identity and logging a user identity out will not work.
825818
826819
@param disabled If set to `true` then tracking will be disabled.
@@ -931,34 +924,6 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
931924

932925
- (void)logoutWithCallback:(nullable callbackWithStatus)callback;
933926

934-
#pragma mark - Credit methods
935-
936-
///--------------
937-
/// @name Credits
938-
///--------------
939-
940-
- (void)loadRewardsWithCallback:(nullable callbackWithStatus)callback __deprecated_msg("Referral feature has been deprecated. This is no-op.");
941-
942-
- (void)redeemRewards:(NSInteger)count __deprecated_msg("Referral feature has been deprecated. This is no-op.");;
943-
944-
- (void)redeemRewards:(NSInteger)count callback:(nullable callbackWithStatus)callback __deprecated_msg("Referral feature has been deprecated. This is no-op.");
945-
946-
- (void)redeemRewards:(NSInteger)count forBucket:(nullable NSString *)bucket __deprecated_msg("Referral feature has been deprecated. This is no-op.");
947-
948-
- (void)redeemRewards:(NSInteger)count forBucket:(nullable NSString *)bucket callback:(nullable callbackWithStatus)callback __deprecated_msg("Referral feature has been deprecated. This is no-op.");
949-
950-
- (NSInteger)getCredits __deprecated_msg("Referral feature has been deprecated. This is no-op.");
951-
952-
- (NSInteger)getCreditsForBucket:(NSString *)bucket __deprecated_msg("Referral feature has been deprecated. This is no-op.");
953-
954-
- (void)getCreditHistoryWithCallback:(nullable callbackWithList)callback __deprecated_msg("Referral feature has been deprecated. This is no-op.");
955-
956-
- (void)getCreditHistoryForBucket:(nullable NSString *)bucket andCallback:(nullable callbackWithList)callback __deprecated_msg("Referral feature has been deprecated. This is no-op.");
957-
958-
- (void)getCreditHistoryAfter:(nullable NSString *)creditTransactionId number:(NSInteger)length order:(BranchCreditHistoryOrder)order andCallback:(nullable callbackWithList)callback __deprecated_msg("Referral feature has been deprecated. This is no-op.");
959-
960-
- (void)getCreditHistoryForBucket:(nullable NSString *)bucket after:(nullable NSString *)creditTransactionId number:(NSInteger)length order:(BranchCreditHistoryOrder)order andCallback:(nullable callbackWithList)callback __deprecated_msg("Referral feature has been deprecated. This is no-op.");
961-
962927
#pragma mark - Query methods
963928

964929
/**

BranchSDK/Branch.m

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,52 +1086,6 @@ - (void)sendServerRequestWithoutSession:(BNCServerRequest*)request {
10861086
[self sendServerRequest:request];
10871087
}
10881088

1089-
#pragma mark - Credit methods
1090-
1091-
- (void)loadRewardsWithCallback:(callbackWithStatus)callback {
1092-
return;
1093-
}
1094-
1095-
- (NSInteger)getCredits {
1096-
return 0;
1097-
}
1098-
1099-
- (void)redeemRewards:(NSInteger)count {
1100-
return;
1101-
}
1102-
1103-
- (void)redeemRewards:(NSInteger)count callback:(callbackWithStatus)callback {
1104-
return;
1105-
}
1106-
1107-
- (NSInteger)getCreditsForBucket:(NSString *)bucket {
1108-
return 0;
1109-
}
1110-
1111-
- (void)redeemRewards:(NSInteger)count forBucket:(NSString *)bucket {
1112-
return;
1113-
}
1114-
1115-
- (void)redeemRewards:(NSInteger)count forBucket:(NSString *)bucket callback:(callbackWithStatus)callback {
1116-
return;
1117-
}
1118-
1119-
- (void)getCreditHistoryWithCallback:(callbackWithList)callback {
1120-
return;
1121-
}
1122-
1123-
- (void)getCreditHistoryForBucket:(NSString *)bucket andCallback:(callbackWithList)callback {
1124-
return;
1125-
}
1126-
1127-
- (void)getCreditHistoryAfter:(NSString *)creditTransactionId number:(NSInteger)length order:(BranchCreditHistoryOrder)order andCallback:(callbackWithList)callback {
1128-
return;
1129-
}
1130-
1131-
- (void)getCreditHistoryForBucket:(NSString *)bucket after:(NSString *)creditTransactionId number:(NSInteger)length order:(BranchCreditHistoryOrder)order andCallback:(callbackWithList)callback {
1132-
return;
1133-
}
1134-
11351089
- (BranchUniversalObject *)getFirstReferringBranchUniversalObject {
11361090
NSDictionary *params = [self getFirstReferringParams];
11371091
if ([[params objectForKey:BRANCH_INIT_KEY_CLICKED_BRANCH_LINK] isEqual:@1]) {

BranchSDK/BranchConstants.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ extern NSString * const BRANCH_REQUEST_KEY_AMOUNT;
2323
extern NSString * const BRANCH_REQUEST_KEY_LENGTH;
2424
extern NSString * const BRANCH_REQUEST_KEY_DIRECTION;
2525
extern NSString * const BRANCH_REQUEST_KEY_STARTING_TRANSACTION_ID;
26-
extern NSString * const BRANCH_REQUEST_KEY_REFERRAL_USAGE_TYPE;
27-
extern NSString * const BRANCH_REQUEST_KEY_REFERRAL_REWARD_LOCATION;
28-
extern NSString * const BRANCH_REQUEST_KEY_REFERRAL_TYPE;
29-
extern NSString * const BRANCH_REQUEST_KEY_REFERRAL_CREATION_SOURCE;
30-
extern NSString * const BRANCH_REQUEST_KEY_REFERRAL_PREFIX;
31-
extern NSString * const BRANCH_REQUEST_KEY_REFERRAL_EXPIRATION;
3226
extern NSString * const BRANCH_REQUEST_KEY_URL_SOURCE;
3327
extern NSString * const BRANCH_REQUEST_KEY_URL_TAGS;
3428
extern NSString * const BRANCH_REQUEST_KEY_URL_LINK_TYPE;

BranchSDK/BranchConstants.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@
1919
NSString * const BRANCH_REQUEST_KEY_LENGTH = @"length";
2020
NSString * const BRANCH_REQUEST_KEY_DIRECTION = @"direction";
2121
NSString * const BRANCH_REQUEST_KEY_STARTING_TRANSACTION_ID = @"begin_after_id";
22-
NSString * const BRANCH_REQUEST_KEY_REFERRAL_USAGE_TYPE = @"calculation_type";
23-
NSString * const BRANCH_REQUEST_KEY_REFERRAL_REWARD_LOCATION = @"location";
24-
NSString * const BRANCH_REQUEST_KEY_REFERRAL_TYPE = @"type";
25-
NSString * const BRANCH_REQUEST_KEY_REFERRAL_CREATION_SOURCE = @"creation_source";
26-
NSString * const BRANCH_REQUEST_KEY_REFERRAL_PREFIX = @"prefix";
27-
NSString * const BRANCH_REQUEST_KEY_REFERRAL_EXPIRATION = @"expiration";
2822
NSString * const BRANCH_REQUEST_KEY_URL_SOURCE = @"source";
2923
NSString * const BRANCH_REQUEST_KEY_URL_TAGS = @"tags";
3024
NSString * const BRANCH_REQUEST_KEY_URL_LINK_TYPE = @"type";

BranchSDK/NSError+Branch.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ NS_ASSUME_NONNULL_BEGIN
1919
typedef NS_ENUM(NSInteger, BNCErrorCode) {
2020
BNCInitError = 1000,
2121
BNCDuplicateResourceError = 1001,
22-
BNCRedeemCreditsError = 1002,
2322
BNCBadRequestError = 1003,
2423
BNCServerProblemError = 1004,
2524
BNCNilLogError = 1005, // Not used at the moment.
@@ -29,7 +28,6 @@ typedef NS_ENUM(NSInteger, BNCErrorCode) {
2928
BNCContentIdentifierError = 1009,
3029
BNCSpotlightNotAvailableError = 1010,
3130
BNCSpotlightTitleError = 1011,
32-
BNCRedeemZeroCreditsError = 1012,
3331
BNCSpotlightIdentifierError = 1013,
3432
BNCSpotlightPublicIndexError = 1014,
3533
BNCTrackingDisabledError = 1015,

BranchSDK/NSError+Branch.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ + (NSString *) messageForCode:(BNCErrorCode)code {
2828
messages = [NSMutableDictionary<NSNumber *, NSString *> new];
2929
[messages setObject:@"The Branch user session has not been initialized." forKey:@(BNCInitError)];
3030
[messages setObject:@"A resource with this identifier already exists." forKey:@(BNCDuplicateResourceError)];
31-
[messages setObject:@"You're trying to redeem more credits than are available. Have you loaded rewards?" forKey:@(BNCRedeemCreditsError)];
3231
[messages setObject:@"The network request was invalid." forKey:@(BNCBadRequestError)];
3332
[messages setObject:@"Trouble reaching the Branch servers, please try again shortly." forKey:@(BNCServerProblemError)];
3433
[messages setObject:@"Can't log error messages because the logger is set to nil." forKey:@(BNCNilLogError)];
@@ -38,7 +37,6 @@ + (NSString *) messageForCode:(BNCErrorCode)code {
3837
[messages setObject:@"A canonical identifier or title are required to uniquely identify content." forKey:@(BNCContentIdentifierError)];
3938
[messages setObject:@"The Core Spotlight indexing service is not available on this device." forKey:@(BNCSpotlightNotAvailableError)];
4039
[messages setObject:@"Spotlight indexing requires a title." forKey:@(BNCSpotlightTitleError)];
41-
[messages setObject:@"Can't redeem zero credits." forKey:@(BNCRedeemZeroCreditsError)];
4240
[messages setObject:@"The Spotlight identifier is required to remove indexing from spotlight." forKey:@(BNCSpotlightIdentifierError)];
4341
[messages setObject:@"Spotlight cannot remove publicly indexed content." forKey:@(BNCSpotlightPublicIndexError)];
4442
[messages setObject:@"User tracking is disabled and the request is not allowed" forKey:@(BNCTrackingDisabledError)];

0 commit comments

Comments
 (0)