You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,15 @@ This is NOT a TROPHiT SDK - this repo is an open-source contribution to develope
9
9
* Tested with [Adjust Unity SDK](https://github.com/adjust/unity_sdk) v4.10.0
10
10
* Also enables Adjust's SDK to handle iOS Universal Links
11
11
* Assuming you already integrated the Adjust SDK, just implement `onDeeplink` in *UnityDeeplinks.cs* as follows:
12
-
```
12
+
```cs
13
13
publicvoidonDeeplink(stringdeeplink) {
14
14
AdjustEventadjustEvent=newAdjustEvent("abc123");
15
15
adjustEvent.addCallbackParameter("deeplink", deeplink); // optional, for callback support
16
16
Adjust.trackEvent(adjustEvent);
17
17
}
18
18
```
19
19
* Add the following code marked `add this` to *Assets/UnitDeeplinks/iOS/UnityDeeplinks.mm*:
20
-
```
20
+
```objc
21
21
#import"Adjust.h"// <==== add this
22
22
...
23
23
@@ -34,7 +34,7 @@ public void onDeeplink(string deeplink) {
34
34
* Tested with [Tune Unity Plugin](https://developers.tune.com/sdk/unity-quick-start/) v4.3.1
35
35
* Also enables Tune's Plugin to handle iOS Universal Links
36
36
* Assuming you already integrated the Tune Plugin, just implement `onDeeplink` in *UnityDeeplinks.cs* as follows:
37
-
```
37
+
```cs
38
38
publicvoidonDeeplink(stringdeeplink) {
39
39
TuneEventevent=newTuneEvent("deeplink");
40
40
event.attribute1=deeplink;
@@ -45,7 +45,7 @@ public void onDeeplink(string deeplink) {
45
45
#### Example: Track Deeplinks with Kochava
46
46
* Also enables Kochava's SDK to handle iOS Universal Links
47
47
* Assuming you already integrated the [Kochava Unity SDK](http://support.kochava.com/sdk-integration/unity-sdk-integration), just implement `onDeeplink` in *UnityDeeplinks.cs* as follows:
48
-
```
48
+
```cs
49
49
publicvoidonDeeplink(stringdeeplink) {
50
50
Kochava.DeeplinkEvent(deeplink, null);
51
51
}
@@ -55,7 +55,7 @@ public void onDeeplink(string deeplink) {
55
55
* Tested with [AppsFlyer Unity SDK](https://support.appsflyer.com/hc/en-us/articles/213766183-Unity) v4.10.1
56
56
* Also enables AppsFlyer's SDK to handle iOS Universal Links
57
57
* Assuming you already integrated the [AppsFlyer Unity SDK](https://support.appsflyer.com/hc/en-us/articles/213766183-Unity), just implement `onAppOpenAttribution` in *AppsFlyerTrackerCallbacks.cs* as follows:
@@ -102,7 +102,7 @@ In this approach, you use a subclass of the default *UnityPlayerActivity*, which
102
102
In this approach, a second activity with deeplink-handling code is added to the Unity project, without subclassing the default activity. Use this is case where option #1 is not acceptable (code is too complex, not under your control, cannot be subclassed, etc)
103
103
104
104
* Add the following activity to your Assets/Plugins/Android/AndroidManifest.xml, assuming your deeplink URL scheme is myapp://
@@ -150,7 +150,7 @@ This creates/updates a *UnityDeeplinks.jar* file under your Unity project's Asse
150
150
UnityDeeplinks implements a native plugin for iOS, initialized by *Assets/UnityDeeplinks/UnityDeeplinks.cs*. the plugin listens for URL/Univeral Link activations and relayes them to the Unity script for processing.
151
151
152
152
* Ensure your XCode project's Info.plist file contains a custom URL scheme definiton or [Universal Links setup](https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html). Here is an example of a custom URL scheme *myapp://* for the bundle ID *com.mycompany.myapp*:
153
-
```
153
+
```xml
154
154
<key>CFBundleURLTypes</key>
155
155
<array>
156
156
<dict>
@@ -168,7 +168,7 @@ UnityDeeplinks implements a native plugin for iOS, initialized by *Assets/UnityD
168
168
## Testing
169
169
170
170
* Prepare a dummy web page that is accessible by your mobile device:
171
-
```
171
+
```xml
172
172
<body>
173
173
<ahref="myapp://?a=b">deeplink test</a>
174
174
</body>
@@ -188,14 +188,14 @@ Fortunately, AppsFlyer provides an implementation similar to [Alternative #2](#a
188
188
* First, ensure you have the [AppsFlyer Unity SDK](https://support.appsflyer.com/hc/en-us/articles/213766183-Unity) integrated including the deeplinking configuration
189
189
* Ensure you have your URL schemes or Universal Links set up
190
190
* Next, ensure you call `AppsFlyer.getConversionData();` in your AppsFlyer iOS startup script, right after `setAppId`:
191
-
```
191
+
```cs
192
192
#ifUNITY_IOS
193
193
AppsFlyer.setAppID ("123456789");
194
194
AppsFlyer.getConversionData();
195
195
// ...
196
196
```
197
197
* Add the following to *Assets/Plugins/Android/src/GetDeepLinkingActivity.java* inside `onCreate` right after `this.starActivity(newIntent)` and right before `finish`:
0 commit comments