Skip to content

Commit eba0376

Browse files
authored
Update README.md
1 parent 6e9afe1 commit eba0376

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
A set of tools for Unity to allow handling deeplink activation from within Unity scripts
33

44
# Usage
5-
From within your Unity script, whenever the app gets activated by a deeplink, the following method will be called:
5+
Implement `onDeeplink` in your *Assets/UnityDeeplinks/UnityDeeplinks.cs* script as you see fit. It gets called whenever the app gets activated by a deeplink:
66

77
```
88
public void onDeeplink(string deeplink) {
99
Debug.Log("onDeeplink " + deeplink);
1010
}
1111
```
1212

13-
# Integration Instructions
13+
# Integration
1414
1. Clone/download the repository
1515
2. Copy the entire UnityDeeplinks folder into your Unity project Assets folder
1616

@@ -89,10 +89,26 @@ This creates/updates a *UnityDeeplinks.jar* file under your Unity project's Asse
8989
* Continue to build and test your Unity project as usual in order for any jar changes to take effect
9090

9191
## iOS
92+
* Attached the *Assets/UnityDeeplinks/UnityDeeplinks.cs* script to some main object in your scene
93+
* Ensure your XCode project Info.plist file contains a custom URL scheme definiton or Universal Links setup. Here is an example of a custom URL scheme *myapp://* for the bundle ID *com.mycompany.myapp*:
94+
```
95+
<key>CFBundleURLTypes</key>
96+
<array>
97+
<dict>
98+
<key>CFBundleURLName</key>
99+
<string>com.mycompany.myapp</string>
100+
<key>CFBundleURLSchemes</key>
101+
<array>
102+
<string>myapp</string>
103+
</array>
104+
</dict>
105+
</array>
106+
```
107+
*Note:* The custom URL scheme settings may be removed at build-time by Unity, ensure they are recreated if needed, by a post-build script, for example.
92108

93109
## Testing
94110

95-
* Prepare a dummy html page that is accessible by your mobile device:
111+
* Prepare a dummy web page that is accessible by your mobile device:
96112
```
97113
<body>
98114
<a href="myapp://?a=b">deeplink test</a>

0 commit comments

Comments
 (0)