Skip to content

Commit 1385fd9

Browse files
authored
Updated URI Filter and Docs DEVEX-343
* Updated our URI scheme filter that finds a URI scheme for the partner's app. * Updated the docs to clarify that the partner's app URI should be the first URI. * This clarifies issue #825
1 parent c243720 commit 1385fd9

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Branch-SDK/Branch-SDK/BNCSystemObserver.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ + (NSString *)getDefaultUriScheme {
9999
for (NSString *uriScheme in urlSchemes) {
100100
if ([uriScheme hasPrefix:@"fb"]) continue; // Facebook
101101
if ([uriScheme hasPrefix:@"db"]) continue; // DB?
102+
if ([uriScheme hasPrefix:@"twitterkit-"]) continue; // Twitter
103+
if ([uriScheme hasPrefix:@"pdk"]) continue; // Pinterest
102104
if ([uriScheme hasPrefix:@"pin"]) continue; // Pinterest
103105
if ([uriScheme hasPrefix:@"com.googleusercontent.apps"]) continue; // Google
104106

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ___
2828
+ [Library installation](#installation)
2929
+ [Register for Branch key](#register-your-app)
3030
+ [Add your Branch key](#add-your-branch-key-to-your-project)
31-
+ [Register a URI scheme](#register-a-uri-scheme-direct-deep-linking)
31+
+ [Register a URI scheme](#register-a-uri-scheme)
3232
+ [Support Universal Links](#support-universal-linking)
3333

3434
3. Branch general methods
@@ -155,16 +155,21 @@ Note: If you used Fabric to install Branch as a kit, your Branch keys will be in
155155

156156
![Branch Fabric Keys](docs/images/branch-fabric-key-plist.png)
157157

158-
### Register a URI Scheme Direct Deep Linking (Optional but Recommended)
158+
### Register a URI Scheme
159159

160-
You can register your app to respond to direct deep links (yourapp:// in a mobile browser) by adding a URI scheme in the YourProject-Info.plist file. Make sure to change **yourapp** to a unique string that represents your app name.
160+
Register your app to respond to direct deep links (yourapp:// in a mobile browser) by adding a URI scheme in the YourProject-Info.plist file. Make sure to change **yourapp** to a unique string that represents your app name.
161161

162162
1. In Xcode, click on YourProject-Info.plist on the left.
163163
1. Find URL Types and click the right arrow. (If it doesn't exist, right click anywhere and choose Add Row. Scroll down and choose URL Types).
164-
1. Add "yourapp," where yourapp is a unique string for your app, as an item in URL Schemes as below:
164+
1. Add "yourapp," where yourapp is a unique string for your app, as an item in URL Schemes as below.
165+
166+
_Caution: Your apps URI scheme must be the first scheme defined (item 0) in the list._
167+
168+
If you have multiple schemes defined, such as a Facebook login URI, make your app's URI scheme the first one in the list so the Branch SDK knows the URI specific to your app.
165169

166170
![URL Scheme Demo](https://s3-us-west-1.amazonaws.com/branchhost/urlScheme.png)
167171

172+
168173
Alternatively, you can add the URI scheme in your project's Info page.
169174

170175
1. In Xcode, click your project in the Navigator (on the left side).

0 commit comments

Comments
 (0)