Skip to content

Commit dfa0415

Browse files
committed
Merge commit 'b7c96f6f35822c0aba2c1a9dadb26471d7db37ac'
2 parents 5f603bc + b7c96f6 commit dfa0415

26 files changed

+47
-1224
lines changed

Branch-Xamarin-Lib.iOS/ApiDefinition.cs

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -204,45 +204,11 @@ interface BNCPreferenceHelper
204204
[Export("getEndpointFromURL:")]
205205
string GetEndpointFromURL(string url);
206206

207-
// -(void)clearUserCreditsAndCounts;
208-
[Export("clearUserCreditsAndCounts")]
209-
void ClearUserCreditsAndCounts();
210-
211-
// -(void)clearUserCredits;
212-
[Export("clearUserCredits")]
213-
void ClearUserCredits();
214-
215207
// -(id)getBranchUniversalLinkDomains;
216208
[Export("getBranchUniversalLinkDomains")]
217209
//[Verify(MethodToProperty)]
218210
NSObject BranchUniversalLinkDomains { get; }
219211

220-
// -(void)setCreditCount:(NSInteger)count;
221-
[Export("setCreditCount:")]
222-
void SetCreditCount(nint count);
223-
224-
// -(void)setCreditCount:(NSInteger)count forBucket:(NSString *)bucket;
225-
[Export("setCreditCount:forBucket:")]
226-
void SetCreditCount(nint count, string bucket);
227-
228-
// -(void)removeCreditCountForBucket:(NSString *)bucket;
229-
[Export("removeCreditCountForBucket:")]
230-
void RemoveCreditCountForBucket(string bucket);
231-
232-
// -(NSDictionary *)getCreditDictionary;
233-
[Export("getCreditDictionary")]
234-
//[Verify(MethodToProperty)]
235-
NSDictionary CreditDictionary { get; }
236-
237-
// -(NSInteger)getCreditCount;
238-
[Export("getCreditCount")]
239-
//[Verify(MethodToProperty)]
240-
nint CreditCount { get; }
241-
242-
// -(NSInteger)getCreditCountForBucket:(NSString *)bucket;
243-
[Export("getCreditCountForBucket:")]
244-
nint GetCreditCountForBucket(string bucket);
245-
246212
// -(void)setRequestMetadataKey:(NSString *)key value:(NSObject *)value;
247213
[Export("setRequestMetadataKey:value:")]
248214
void SetRequestMetadataKey(string key, NSObject value);
@@ -1632,10 +1598,6 @@ partial interface Constants
16321598
[Field("BRANCH_REQUEST_KEY_REFERRAL_USAGE_TYPE", "__Internal")]
16331599
NSString BRANCH_REQUEST_KEY_REFERRAL_USAGE_TYPE { get; }
16341600

1635-
// extern NSString *const BRANCH_REQUEST_KEY_REFERRAL_REWARD_LOCATION;
1636-
[Field("BRANCH_REQUEST_KEY_REFERRAL_REWARD_LOCATION", "__Internal")]
1637-
NSString BRANCH_REQUEST_KEY_REFERRAL_REWARD_LOCATION { get; }
1638-
16391601
// extern NSString *const BRANCH_REQUEST_KEY_REFERRAL_TYPE;
16401602
[Field("BRANCH_REQUEST_KEY_REFERRAL_TYPE", "__Internal")]
16411603
NSString BRANCH_REQUEST_KEY_REFERRAL_TYPE { get; }
@@ -1820,18 +1782,6 @@ partial interface Constants
18201782
[Field("BRANCH_REQUEST_ENDPOINT_USER_COMPLETED_ACTION", "__Internal")]
18211783
NSString BRANCH_REQUEST_ENDPOINT_USER_COMPLETED_ACTION { get; }
18221784

1823-
// extern NSString *const BRANCH_REQUEST_ENDPOINT_LOAD_REWARDS;
1824-
[Field("BRANCH_REQUEST_ENDPOINT_LOAD_REWARDS", "__Internal")]
1825-
NSString BRANCH_REQUEST_ENDPOINT_LOAD_REWARDS { get; }
1826-
1827-
// extern NSString *const BRANCH_REQUEST_ENDPOINT_REDEEM_REWARDS;
1828-
[Field("BRANCH_REQUEST_ENDPOINT_REDEEM_REWARDS", "__Internal")]
1829-
NSString BRANCH_REQUEST_ENDPOINT_REDEEM_REWARDS { get; }
1830-
1831-
// extern NSString *const BRANCH_REQUEST_ENDPOINT_CREDIT_HISTORY;
1832-
[Field("BRANCH_REQUEST_ENDPOINT_CREDIT_HISTORY", "__Internal")]
1833-
NSString BRANCH_REQUEST_ENDPOINT_CREDIT_HISTORY { get; }
1834-
18351785
// extern NSString *const BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL;
18361786
[Field("BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL", "__Internal")]
18371787
NSString BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL { get; }
@@ -2625,10 +2575,6 @@ partial interface Constants
26252575
[Field("BranchStandardEventPurchase", "__Internal")]
26262576
NSString BranchStandardEventPurchase { get; }
26272577

2628-
// extern BranchStandardEvent _Nonnull BranchStandardEventSpendCredits;
2629-
[Field("BranchStandardEventSpendCredits", "__Internal")]
2630-
NSString BranchStandardEventSpendCredits { get; }
2631-
26322578
// extern BranchStandardEvent _Nonnull BranchStandardEventSubscribe;
26332579
[Field("BranchStandardEventSubscribe", "__Internal")]
26342580
NSString BranchStandardEventSubscribe { get; }
@@ -3579,52 +3525,6 @@ interface Branch
35793525
[Export("logoutWithCallback:")]
35803526
void LogoutWithCallback([NullAllowed] callbackWithStatus callback);
35813527

3582-
// -(void)loadRewardsWithCallback:(callbackWithStatus _Nullable)callback;
3583-
[Export("loadRewardsWithCallback:")]
3584-
void LoadRewardsWithCallback([NullAllowed] callbackWithStatus callback);
3585-
3586-
// -(void)redeemRewards:(NSInteger)count;
3587-
[Export("redeemRewards:")]
3588-
void RedeemRewards(nint count);
3589-
3590-
// -(void)redeemRewards:(NSInteger)count callback:(callbackWithStatus _Nullable)callback;
3591-
[Export("redeemRewards:callback:")]
3592-
void RedeemRewards(nint count, [NullAllowed] callbackWithStatus callback);
3593-
3594-
// -(void)redeemRewards:(NSInteger)count forBucket:(NSString * _Nullable)bucket;
3595-
[Export("redeemRewards:forBucket:")]
3596-
void RedeemRewards(nint count, [NullAllowed] string bucket);
3597-
3598-
// -(void)redeemRewards:(NSInteger)count forBucket:(NSString * _Nullable)bucket callback:(callbackWithStatus _Nullable)callback;
3599-
[Export("redeemRewards:forBucket:callback:")]
3600-
void RedeemRewards(nint count, [NullAllowed] string bucket, [NullAllowed] callbackWithStatus callback);
3601-
3602-
// -(NSInteger)getCredits;
3603-
[Export("getCredits")]
3604-
//[Verify(MethodToProperty)]
3605-
//nint Credits { get; }
3606-
nint Credits();
3607-
3608-
// -(NSInteger)getCreditsForBucket:(NSString * _Nonnull)bucket;
3609-
[Export("getCreditsForBucket:")]
3610-
nint GetCreditsForBucket(string bucket);
3611-
3612-
// -(void)getCreditHistoryWithCallback:(callbackWithList _Nullable)callback;
3613-
[Export("getCreditHistoryWithCallback:")]
3614-
void GetCreditHistoryWithCallback([NullAllowed] callbackWithList callback);
3615-
3616-
// -(void)getCreditHistoryForBucket:(NSString * _Nullable)bucket andCallback:(callbackWithList _Nullable)callback;
3617-
[Export("getCreditHistoryForBucket:andCallback:")]
3618-
void GetCreditHistoryForBucket([NullAllowed] string bucket, [NullAllowed] callbackWithList callback);
3619-
3620-
// -(void)getCreditHistoryAfter:(NSString * _Nullable)creditTransactionId number:(NSInteger)length order:(BranchCreditHistoryOrder)order andCallback:(callbackWithList _Nullable)callback;
3621-
[Export("getCreditHistoryAfter:number:order:andCallback:")]
3622-
void GetCreditHistoryAfter([NullAllowed] string creditTransactionId, nint length, BranchCreditHistoryOrder order, [NullAllowed] callbackWithList callback);
3623-
3624-
// -(void)getCreditHistoryForBucket:(NSString * _Nullable)bucket after:(NSString * _Nullable)creditTransactionId number:(NSInteger)length order:(BranchCreditHistoryOrder)order andCallback:(callbackWithList _Nullable)callback;
3625-
[Export("getCreditHistoryForBucket:after:number:order:andCallback:")]
3626-
void GetCreditHistoryForBucket([NullAllowed] string bucket, [NullAllowed] string creditTransactionId, nint length, BranchCreditHistoryOrder order, [NullAllowed] callbackWithList callback);
3627-
36283528
// -(void)userCompletedAction:(NSString * _Nullable)action;
36293529
[Export("userCompletedAction:")]
36303530
void UserCompletedAction([NullAllowed] string action);

Branch-Xamarin-Lib.iOS/Structs.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public enum BNCErrorCode : long
1111
{
1212
InitError = 1000,
1313
DuplicateResourceError = 1001,
14-
RedeemCreditsError = 1002,
1514
BadRequestError = 1003,
1615
ServerProblemError = 1004,
1716
NilLogError = 1005,
@@ -21,7 +20,6 @@ public enum BNCErrorCode : long
2120
ContentIdentifierError = 1009,
2221
SpotlightNotAvailableError = 1010,
2322
SpotlightTitleError = 1011,
24-
RedeemZeroCreditsError = 1012,
2523
SpotlightIdentifierError = 1013,
2624
SpotlightPublicIndexError = 1014,
2725
TrackingDisabledError = 1015,
@@ -76,11 +74,4 @@ public enum BranchEventAdType : long
7674
Native
7775
}
7876

79-
[Native]
80-
public enum BranchCreditHistoryOrder : ulong
81-
{
82-
MostRecentFirst,
83-
LeastRecentFirst
84-
}
85-
8677
}

Branch-Xamarin-SDK.Droid/Branch-Xamarin-SDK.Droid.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
<Compile Include="Helpers\BranchSessionListener.cs" />
5454
<Compile Include="Helpers\BranchIdentityListener.cs" />
5555
<Compile Include="Helpers\BranchBUOSessionListener.cs" />
56-
<Compile Include="Helpers\BranchRewardsListener.cs" />
5756
<Compile Include="Helpers\BranchUrlListener.cs" />
5857
<Compile Include="BranchAndroid.cs" />
5958
<Compile Include="BranchAndroidLifeCycleHandler.cs" />

Branch-Xamarin-SDK.Droid/BranchAndroid.cs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -267,54 +267,6 @@ public override void SendEvent(BranchEvent branchEvent) {
267267

268268
#endregion
269269

270-
271-
#region Credits methods
272-
273-
public override void LoadRewards (IBranchRewardsInterface callback) {
274-
BranchRewardsListener obj = new BranchRewardsListener (callback);
275-
obj.onResponseRewards = obj.LoadRewardsCallback;
276-
callbacksList.Add (obj as Object);
277-
278-
NativeBranch.LoadRewards (obj);
279-
}
280-
281-
public override void RedeemRewards (IBranchRewardsInterface callback, int amount, string bucket = "default") {
282-
BranchRewardsListener obj = new BranchRewardsListener (callback);
283-
obj.onResponseRewards = obj.RedeemRewardsCallback;
284-
callbacksList.Add (obj as Object);
285-
286-
NativeBranch.RedeemRewards (bucket, amount, obj);
287-
}
288-
289-
public override void GetCreditHistory (IBranchRewardsInterface callback,
290-
string bucket = "",
291-
string afterId = "",
292-
int length = 100,
293-
bool mostRecentFirst = true)
294-
{
295-
296-
BranchRewardsListener obj = new BranchRewardsListener (callback);
297-
callbacksList.Add (obj as Object);
298-
299-
if (mostRecentFirst) {
300-
NativeBranch.GetCreditHistory (bucket, afterId, length, AndroidNativeBranch.CreditHistoryOrder.KMostRecentFirst, obj);
301-
}
302-
else {
303-
NativeBranch.GetCreditHistory (bucket, afterId, length, AndroidNativeBranch.CreditHistoryOrder.KLeastRecentFirst, obj);
304-
}
305-
}
306-
307-
public override int GetCredits () {
308-
return NativeBranch.Credits;
309-
}
310-
311-
public override int GetCreditsForBucket (string bucket) {
312-
return NativeBranch.GetCreditsForBucket (bucket);
313-
}
314-
315-
#endregion
316-
317-
318270
#region Configuration methods
319271

320272
public override void SetRetryInterval (int retryInterval) {

Branch-Xamarin-SDK.Droid/BranchAndroidUtils.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ public static JSONObject ToJSONObject(Dictionary<string, object> data) {
9595
return new JSONObject ();
9696
}
9797

98-
public static List<CreditHistoryEntry> ToCreditHistoryArray(JSONArray data) {
99-
string res = data.ToString();
100-
List<CreditHistoryEntry> list = JsonConvert.DeserializeObject<List<CreditHistoryEntry>> (res);
101-
return list;
102-
}
103-
10498
public static IO.Branch.Indexing.BranchUniversalObject ToNativeBUO(BranchUniversalObject buo) {
10599
IO.Branch.Indexing.BranchUniversalObject resBuo = new IO.Branch.Indexing.BranchUniversalObject();
106100

Branch-Xamarin-SDK.Droid/Helpers/BranchRewardsListener.cs

Lines changed: 0 additions & 74 deletions
This file was deleted.

Branch-Xamarin-SDK.iOS/Branch-Xamarin-SDK.iOS.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
<Compile Include="Helpers\BranchSessionListener.cs" />
4545
<Compile Include="Helpers\BranchIdentityListener.cs" />
4646
<Compile Include="Helpers\BranchBUOSessionListener.cs" />
47-
<Compile Include="Helpers\BranchRewardsListener.cs" />
4847
<Compile Include="Helpers\BranchUrlListener.cs" />
4948
<Compile Include="BranchIOS.cs" />
5049
<Compile Include="BranchIOSUtils.cs" />

Branch-Xamarin-SDK.iOS/BranchIOS.cs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -273,54 +273,6 @@ public override void SendEvent(BranchEvent branchEvent) {
273273

274274
#endregion
275275

276-
277-
#region Credits methods
278-
279-
public override void LoadRewards (IBranchRewardsInterface callback) {
280-
BranchRewardsListener obj = new BranchRewardsListener (callback);
281-
callbacksList.Add (obj as Object);
282-
283-
NativeBranch.LoadRewardsWithCallback (obj.LoadRewardsCallback);
284-
}
285-
286-
public override void RedeemRewards (IBranchRewardsInterface callback, int amount, string bucket = "default") {
287-
BranchRewardsListener obj = new BranchRewardsListener (callback);
288-
callbacksList.Add (obj as Object);
289-
290-
NativeBranch.RedeemRewards (amount, bucket, obj.RedeemRewardsCallback);
291-
}
292-
293-
public override void GetCreditHistory (IBranchRewardsInterface callback,
294-
string bucket = "",
295-
string afterId = "",
296-
int length = 100,
297-
bool mostRecentFirst = true)
298-
{
299-
300-
BranchRewardsListener obj = new BranchRewardsListener (callback);
301-
callbacksList.Add (obj as Object);
302-
303-
if (mostRecentFirst) {
304-
NativeBranch.GetCreditHistoryForBucket(bucket, afterId, (nint)length,
305-
IOSNativeBranch.BranchCreditHistoryOrder.MostRecentFirst, obj.GetCreditHistoryCallback);
306-
}
307-
else {
308-
NativeBranch.GetCreditHistoryForBucket(bucket, afterId, (nint)length,
309-
IOSNativeBranch.BranchCreditHistoryOrder.LeastRecentFirst, obj.GetCreditHistoryCallback);
310-
}
311-
}
312-
313-
public override int GetCredits () {
314-
return (int)NativeBranch.Credits();
315-
}
316-
317-
public override int GetCreditsForBucket (string bucket) {
318-
return (int)NativeBranch.GetCreditsForBucket(bucket);
319-
}
320-
321-
#endregion
322-
323-
324276
#region Configuration methods
325277

326278
public static void DelayInitToCheckForSearchAds()

0 commit comments

Comments
 (0)