Skip to content

Commit 2803232

Browse files
committed
Merge pull request #58 from BranchMetrics/fix/replace-branch-framework-with-source-files
replaced BranchSDK framework with source files. Updated to latest iOS…
2 parents f4346ae + f7541c9 commit 2803232

File tree

80 files changed

+7109
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+7109
-84
lines changed

plugin.xml

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,79 @@ SOFTWARE.
9696
</config-file>
9797
<header-file src="src/ios/BranchSDK.h" />
9898
<source-file src="src/ios/BranchSDK.m" />
99-
<framework src="src/ios/dependencies/Branch.framework" custom="true" />
99+
<header-file src="src/ios/dependencies/Branch-SDK/BNCConfig.h" />
100+
<header-file src="src/ios/dependencies/Branch-SDK/BNCContentDiscoveryManager.h" />
101+
<source-file src="src/ios/dependencies/Branch-SDK/BNCContentDiscoveryManager.m" />
102+
<header-file src="src/ios/dependencies/Branch-SDK/BNCEncodingUtils.h" />
103+
<source-file src="src/ios/dependencies/Branch-SDK/BNCEncodingUtils.m" />
104+
<header-file src="src/ios/dependencies/Branch-SDK/BNCError.h" />
105+
<source-file src="src/ios/dependencies/Branch-SDK/BNCError.m" />
106+
<header-file src="src/ios/dependencies/Branch-SDK/BNCLinkCache.h" />
107+
<source-file src="src/ios/dependencies/Branch-SDK/BNCLinkCache.m" />
108+
<header-file src="src/ios/dependencies/Branch-SDK/BNCLinkData.h" />
109+
<source-file src="src/ios/dependencies/Branch-SDK/BNCLinkData.m" />
110+
<header-file src="src/ios/dependencies/Branch-SDK/BNCPreferenceHelper.h" />
111+
<source-file src="src/ios/dependencies/Branch-SDK/BNCPreferenceHelper.m" />
112+
<header-file src="src/ios/dependencies/Branch-SDK/BNCServerInterface.h" />
113+
<source-file src="src/ios/dependencies/Branch-SDK/BNCServerInterface.m" />
114+
<header-file src="src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.h" />
115+
<source-file src="src/ios/dependencies/Branch-SDK/BNCServerRequestQueue.m" />
116+
<header-file src="src/ios/dependencies/Branch-SDK/BNCServerResponse.h" />
117+
<source-file src="src/ios/dependencies/Branch-SDK/BNCServerResponse.m" />
118+
<header-file src="src/ios/dependencies/Branch-SDK/BNCStrongMatchHelper.h" />
119+
<source-file src="src/ios/dependencies/Branch-SDK/BNCStrongMatchHelper.m" />
120+
<header-file src="src/ios/dependencies/Branch-SDK/BNCSystemObserver.h" />
121+
<source-file src="src/ios/dependencies/Branch-SDK/BNCSystemObserver.m" />
122+
<header-file src="src/ios/dependencies/Branch-SDK/Branch-SDK-Prefix.pch" />
123+
<header-file src="src/ios/dependencies/Branch-SDK/Branch.h" />
124+
<source-file src="src/ios/dependencies/Branch-SDK/Branch.m" />
125+
<header-file src="src/ios/dependencies/Branch-SDK/BranchActivityItemProvider.h" />
126+
<source-file src="src/ios/dependencies/Branch-SDK/BranchActivityItemProvider.m" />
127+
<header-file src="src/ios/dependencies/Branch-SDK/BranchConstants.h" />
128+
<source-file src="src/ios/dependencies/Branch-SDK/BranchConstants.m" />
129+
<header-file src="src/ios/dependencies/Branch-SDK/BranchCSSearchableItemAttributeSet.h" />
130+
<source-file src="src/ios/dependencies/Branch-SDK/BranchCSSearchableItemAttributeSet.m" />
131+
<header-file src="src/ios/dependencies/Branch-SDK/BranchDeepLinkingController.h" />
132+
<header-file src="src/ios/dependencies/Branch-SDK/BranchLinkProperties.h" />
133+
<source-file src="src/ios/dependencies/Branch-SDK/BranchLinkProperties.m" />
134+
<header-file src="src/ios/dependencies/Branch-SDK/BranchUniversalObject.h" />
135+
<source-file src="src/ios/dependencies/Branch-SDK/BranchUniversalObject.m" />
136+
137+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BNCServerRequest.h" />
138+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BNCServerRequest.m" />
139+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchApplyPromoCodeRequest.h" />
140+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchApplyPromoCodeRequest.m" />
141+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchCloseRequest.h" />
142+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchCloseRequest.m" />
143+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchCreditHistoryRequest.h" />
144+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchCreditHistoryRequest.m" />
145+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchGetPromoCodeRequest.h" />
146+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchGetPromoCodeRequest.m" />
147+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchInstallRequest.h" />
148+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchInstallRequest.m" />
149+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchLoadActionsRequest.h" />
150+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchLoadActionsRequest.m" />
151+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchLoadRewardsRequest.h" />
152+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchLoadRewardsRequest.m" />
153+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchLogoutRequest.h" />
154+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchLogoutRequest.m" />
155+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchOpenRequest.h" />
156+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchOpenRequest.m" />
157+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchRedeemRewardsRequest.h" />
158+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchRedeemRewardsRequest.m" />
159+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchRegisterViewRequest.h" />
160+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchRegisterViewRequest.m" />
161+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchSetIdentityRequest.h" />
162+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchSetIdentityRequest.m" />
163+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchShortUrlRequest.h" />
164+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchShortUrlRequest.m" />
165+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchShortUrlSyncRequest.h" />
166+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchShortUrlSyncRequest.m" />
167+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchSpotlightUrlRequest.h" />
168+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchSpotlightUrlRequest.m" />
169+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchUserCompletedActionRequest.h" />
170+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchUserCompletedActionRequest.m" />
171+
<header-file src="src/ios/dependencies/Branch-SDK/Requests/BranchValidatePromoCodeRequest.h" />
172+
<source-file src="src/ios/dependencies/Branch-SDK/Requests/BranchValidatePromoCodeRequest.m" />
100173
</platform>
101174
</plugin>

src/ios/BranchSDK.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
// Copyright © 2016 Branch Metrics. All rights reserved.
66
//
77

8-
#import <Branch/Branch.h>
9-
#import <Branch/BranchLinkProperties.h>
10-
#import <Branch/BranchUniversalObject.h>
8+
#import "Branch.h"
9+
#import "BranchLinkProperties.h"
10+
#import "BranchUniversalObject.h"
1111
#import <Cordova/CDV.h>
1212

1313
@interface BranchSDK : CDVPlugin

src/ios/BranchSDK.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ - (void)initSession:(CDVInvokedUrlCommand*)command
7171
NSLog(@"start initSession");
7272
Branch *branch = [self getInstance];
7373

74-
[branch initSessionAndRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error) {
74+
[branch initSessionWithLaunchOptions:nil andRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error) {
7575
NSLog(@"inside initSessionAndRegisterDeepLinkHandler block");
76-
CDVPluginResult* pluginResult = nil;
7776
NSString *resultString;
7877
if (!error) {
7978
if (params != nil && [params count] > 0) {
@@ -538,8 +537,8 @@ - (void)showShareSheet:(CDVInvokedUrlCommand*)command
538537
[self.branchUniversalObj showShareSheetWithLinkProperties:linkProperties
539538
andShareText:shareText
540539
fromViewController:self.viewController
541-
andCallback:^{
542-
NSLog(@"finished presenting shareSheet ");
540+
completion:^(NSString *activityType, BOOL completed) {
541+
NSLog(@"showShareSheet is finished with activityType - %@", activityType);
543542
}];
544543
}
545544

src/ios/dependencies/Branch.framework/Versions/A/Headers/BNCConfig.h renamed to src/ios/dependencies/Branch-SDK/BNCConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef Branch_SDK_Config_h
1010
#define Branch_SDK_Config_h
1111

12-
#define SDK_VERSION @"0.11.14"
12+
#define SDK_VERSION @"0.11.16"
1313

1414
#define BNC_PROD_ENV
1515
//#define BNC_STAGE_ENV
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
//
2+
// BNCContentDiscoveryManager.h
3+
// Branch-TestBed
4+
//
5+
// Created by Graham Mueller on 7/17/15.
6+
// Copyright © 2015 Branch Metrics. All rights reserved.
7+
//
8+
9+
#import "Branch.h"
10+
11+
@interface BNCContentDiscoveryManager : NSObject
12+
13+
- (NSString *)spotlightIdentifierFromActivity:(NSUserActivity *)userActivity;
14+
- (NSString *)standardSpotlightIdentifierFromActivity:(NSUserActivity *)userActivity;
15+
16+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description;
17+
18+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description callback:(callbackWithUrl)callback;
19+
20+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable callback:(callbackWithUrl)callback;
21+
22+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable type:(NSString *)type callback:(callbackWithUrl)callback;
23+
24+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable type:(NSString *)type thumbnailUrl:(NSURL *)thumbnailUrl callback:(callbackWithUrl)callback;
25+
26+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable type:(NSString *)type thumbnailUrl:(NSURL *)thumbnailUrl keywords:(NSSet *)keywords callback:(callbackWithUrl)callback;
27+
28+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable type:(NSString *)type thumbnailUrl:(NSURL *)thumbnailUrl keywords:(NSSet *)keywords;
29+
30+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable type:(NSString *)type thumbnailUrl:(NSURL *)thumbnailUrl keywords:(NSSet *)keywords userInfo:(NSDictionary *)userInfo;
31+
32+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable thumbnailUrl:(NSURL *)thumbnailUrl userInfo:(NSDictionary *)userInfo;
33+
34+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable thumbnailUrl:(NSURL *)thumbnailUrl keywords:(NSSet *)keywords userInfo:(NSDictionary *)userInfo;
35+
36+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable type:(NSString *)type thumbnailUrl:(NSURL *)thumbnailUrl keywords:(NSSet *)keywords userInfo:(NSDictionary *)userInfo callback:(callbackWithUrl)callback;
37+
38+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable type:(NSString *)type thumbnailUrl:(NSURL *)thumbnailUrl keywords:(NSSet *)keywords userInfo:(NSDictionary *)userInfo expirationDate:(NSDate *)expirationDate callback:(callbackWithUrl)callback;
39+
40+
41+
42+
/* This one has a different callback, which includes the spotlightIdentifier, and requires a different signature
43+
It cannot be part of the stack of method signatures above, because of the different callback type.*/
44+
- (void)indexContentWithTitle:(NSString *)title description:(NSString *)description publiclyIndexable:(BOOL)publiclyIndexable type:(NSString *)type thumbnailUrl:(NSURL *)thumbnailUrl keywords:(NSSet *)keywords userInfo:(NSDictionary *)userInfo expirationDate:(NSDate *)expirationDate callback:(callbackWithUrl)callback spotlightCallback:(callbackWithUrlAndSpotlightIdentifier)spotlightCallback;
45+
46+
47+
@end

0 commit comments

Comments
 (0)