Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit c0ed035

Browse files
committed
[Fastlane] Branch SDK integration
1 parent 502b446 commit c0ed035

File tree

7 files changed

+71
-11
lines changed

7 files changed

+71
-11
lines changed
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.branch.branchpluginexample">
3-
4-
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
5-
<activity android:name=".MainActivity">
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<manifest xmlns:android='http://schemas.android.com/apk/res/android' package='io.branch.branchpluginexample'>
3+
<application android:allowBackup='true' android:icon='@mipmap/ic_launcher' android:label='@string/app_name' android:roundIcon='@mipmap/ic_launcher_round' android:supportsRtl='true' android:theme='@style/AppTheme'>
4+
<activity android:name='.MainActivity'>
65
<intent-filter>
7-
<action android:name="android.intent.action.MAIN"/>
8-
9-
<category android:name="android.intent.category.LAUNCHER"/>
6+
<action android:name='android.intent.action.MAIN'/>
7+
<category android:name='android.intent.category.LAUNCHER'/>
8+
</intent-filter>
9+
<intent-filter android:autoVerify='true'>
10+
<action android:name='android.intent.action.VIEW'/>
11+
<category android:name='android.intent.category.DEFAULT'/>
12+
<category android:name='android.intent.category.BROWSABLE'/>
13+
<data android:scheme='branchtest' android:host='open'/>
14+
<data android:scheme='https' android:host='bnctestbed.app.link'/>
15+
<data android:scheme='https' android:host='bnctestbed-alternate.app.link'/>
1016
</intent-filter>
1117
</activity>
18+
<meta-data android:name='io.branch.sdk.BranchKey' android:value='key_live_feebgAAhbH9Tv85H5wLQhpdaefiZv5Dv'/>
1219
</application>
13-
14-
</manifest>
20+
</manifest>

examples/ios/BranchPluginExample/BranchPluginExample.xcodeproj/project.pbxproj

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@
88

99
/* Begin PBXBuildFile section */
1010
2DFA0F43148933CB7CB7F10B /* Pods_BranchPluginExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7BA8F4DED579D593CB5269 /* Pods_BranchPluginExample.framework */; };
11+
58C6382A104D4297A0F03FD0 /* SafariServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 377F31B45986238010520A90 /* SafariServices.framework */; };
12+
5D7175848729B9FE8A63F795 /* CoreSpotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2064DB8F2F40EE442F03EAF9 /* CoreSpotlight.framework */; };
1113
7B03D6201EA18B7F00AE01E7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B03D61F1EA18B7F00AE01E7 /* AppDelegate.swift */; };
1214
7B03D6221EA18B7F00AE01E7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B03D6211EA18B7F00AE01E7 /* ViewController.swift */; };
1315
7B03D6251EA18B7F00AE01E7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7B03D6231EA18B7F00AE01E7 /* Main.storyboard */; };
1416
7B03D6271EA18B7F00AE01E7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B03D6261EA18B7F00AE01E7 /* Assets.xcassets */; };
1517
7B03D62A1EA18B7F00AE01E7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7B03D6281EA18B7F00AE01E7 /* LaunchScreen.storyboard */; };
18+
F5C337E9B6D1A8DCE5C94FA2 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E33877C2014592BFB0811038 /* AdSupport.framework */; };
1619
/* End PBXBuildFile section */
1720

1821
/* Begin PBXFileReference section */
1922
1A7BA8F4DED579D593CB5269 /* Pods_BranchPluginExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BranchPluginExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
23+
2064DB8F2F40EE442F03EAF9 /* CoreSpotlight.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreSpotlight.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreSpotlight.framework; sourceTree = DEVELOPER_DIR; };
24+
377F31B45986238010520A90 /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/SafariServices.framework; sourceTree = DEVELOPER_DIR; };
25+
48AA03202BB81CC493993A69 /* BranchPluginExample.entitlements */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.entitlements; name = BranchPluginExample.entitlements; path = BranchPluginExample/BranchPluginExample.entitlements; sourceTree = "<group>"; };
2026
7B03D61C1EA18B7F00AE01E7 /* BranchPluginExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BranchPluginExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
2127
7B03D61F1EA18B7F00AE01E7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2228
7B03D6211EA18B7F00AE01E7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -26,6 +32,7 @@
2632
7B03D62B1EA18B7F00AE01E7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2733
A78993DA75A56A8B38F927FF /* Pods-BranchPluginExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BranchPluginExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BranchPluginExample/Pods-BranchPluginExample.debug.xcconfig"; sourceTree = "<group>"; };
2834
D3CC0ABC7F7C89663342D316 /* Pods-BranchPluginExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BranchPluginExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-BranchPluginExample/Pods-BranchPluginExample.release.xcconfig"; sourceTree = "<group>"; };
35+
E33877C2014592BFB0811038 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/AdSupport.framework; sourceTree = DEVELOPER_DIR; };
2936
/* End PBXFileReference section */
3037

3138
/* Begin PBXFrameworksBuildPhase section */
@@ -34,6 +41,9 @@
3441
buildActionMask = 2147483647;
3542
files = (
3643
2DFA0F43148933CB7CB7F10B /* Pods_BranchPluginExample.framework in Frameworks */,
44+
F5C337E9B6D1A8DCE5C94FA2 /* AdSupport.framework in Frameworks */,
45+
5D7175848729B9FE8A63F795 /* CoreSpotlight.framework in Frameworks */,
46+
58C6382A104D4297A0F03FD0 /* SafariServices.framework in Frameworks */,
3747
);
3848
runOnlyForDeploymentPostprocessing = 0;
3949
};
@@ -44,17 +54,29 @@
4454
isa = PBXGroup;
4555
children = (
4656
1A7BA8F4DED579D593CB5269 /* Pods_BranchPluginExample.framework */,
57+
212421F76106EF8982392507 /* iOS */,
4758
);
4859
name = Frameworks;
4960
sourceTree = "<group>";
5061
};
62+
212421F76106EF8982392507 /* iOS */ = {
63+
isa = PBXGroup;
64+
children = (
65+
E33877C2014592BFB0811038 /* AdSupport.framework */,
66+
2064DB8F2F40EE442F03EAF9 /* CoreSpotlight.framework */,
67+
377F31B45986238010520A90 /* SafariServices.framework */,
68+
);
69+
name = iOS;
70+
sourceTree = "<group>";
71+
};
5172
7B03D6131EA18B7F00AE01E7 = {
5273
isa = PBXGroup;
5374
children = (
5475
7B03D61E1EA18B7F00AE01E7 /* BranchPluginExample */,
5576
7B03D61D1EA18B7F00AE01E7 /* Products */,
5677
D2F58300BBDB58DE2DE408CA /* Pods */,
5778
09984245DD971436BB75F49C /* Frameworks */,
79+
48AA03202BB81CC493993A69 /* BranchPluginExample.entitlements */,
5880
);
5981
sourceTree = "<group>";
6082
};
@@ -345,6 +367,7 @@
345367
baseConfigurationReference = A78993DA75A56A8B38F927FF /* Pods-BranchPluginExample.debug.xcconfig */;
346368
buildSettings = {
347369
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
370+
CODE_SIGN_ENTITLEMENTS = BranchPluginExample/BranchPluginExample.entitlements;
348371
DEVELOPMENT_TEAM = R63EM248DP;
349372
INFOPLIST_FILE = BranchPluginExample/Info.plist;
350373
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -359,6 +382,7 @@
359382
baseConfigurationReference = D3CC0ABC7F7C89663342D316 /* Pods-BranchPluginExample.release.xcconfig */;
360383
buildSettings = {
361384
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
385+
CODE_SIGN_ENTITLEMENTS = BranchPluginExample/BranchPluginExample.entitlements;
362386
DEVELOPMENT_TEAM = R63EM248DP;
363387
INFOPLIST_FILE = BranchPluginExample/Info.plist;
364388
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

examples/ios/BranchPluginExample/BranchPluginExample/AppDelegate.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2017 Branch Metrics. All rights reserved.
77
//
88

9+
import Branch
910
import UIKit
1011

1112
@UIApplicationMain
@@ -14,8 +15,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1415
var window: UIWindow?
1516

1617
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18+
Branch.getInstance().initSession(launchOptions: launchOptions) {
19+
universalObject, linkProperties, error in
20+
21+
// TODO: Route Branch links
22+
}
1723

1824
return true
1925
}
26+
27+
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
28+
return Branch.getInstance().continue(userActivity)
29+
}
30+
2031
}
2132

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.developer.associated-domains</key>
6+
<array>
7+
<string>applinks:bnctestbed.app.link</string>
8+
<string>applinks:bnctestbed-alternate.app.link</string>
9+
</array>
10+
</dict>
11+
</plist>

examples/ios/BranchPluginExample/BranchPluginExample/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
<string>UIInterfaceOrientationLandscapeLeft</string>
4242
<string>UIInterfaceOrientationLandscapeRight</string>
4343
</array>
44+
<key>branch_key</key>
45+
<string>key_live_feebgAAhbH9Tv85H5wLQhpdaefiZv5Dv</string>
4446
</dict>
4547
</plist>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use_frameworks!
22
platform :ios, "8.0"
33

4+
pod "Branch"
45
pod "Cartography"
56

67
target "BranchPluginExample"
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
PODS:
2+
- Branch (0.17.10):
3+
- Branch/Core (= 0.17.10)
4+
- Branch/Core (0.17.10)
25
- Cartography (1.1.0)
36

47
DEPENDENCIES:
8+
- Branch
59
- Cartography
610

711
SPEC CHECKSUMS:
12+
Branch: 29745957de17eb5973627f4c7720bd0eb390fd45
813
Cartography: 0538ccb4044acbbda2266335fc58cb4228794d90
914

10-
PODFILE CHECKSUM: 885d8431fdda8810c5a6d9bd98ff2213680cbc7b
15+
PODFILE CHECKSUM: dc306d6646d7fec2016aa0593ca44c4ef6d1a1dd
1116

1217
COCOAPODS: 1.3.1

0 commit comments

Comments
 (0)