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
Since users may or may not have the mobile app installed, there are 2 types of deep linking:
144
-
145
-
1. Deferred Deep Linking - Serving personalized content to new or former users, directly after the installation.
146
-
2. Direct Deep Linking - Directly serving personalized content to existing users, which already have the mobile app installed.
147
-
3. Unified deep linking - Unified deep linking sends new and existing users to a specific in-app activity as soon as the app is opened.
148
-
149
-
For more info please check out the [OneLink™ Deep Linking Guide](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#Intro).
150
-
151
-
### <aid="deferred-deep-linking"> 1. Deferred Deep Linking (Get Conversion Data)
152
-
153
-
Handle the Deferred deeplink in the following callback:
154
-
```
155
-
var options = {
156
-
157
-
onConversionDataSuccess: function(_res){
158
-
console.log("Get conversion data success: " + JSON.stringify(_res));
159
-
},
160
-
}
161
-
```
162
-
163
-
Check out the deferred deeplinkg guide from the AppFlyer knowledge base [here](https://support.appsflyer.com/hc/en-us/articles/207032096-Accessing-AppsFlyer-Attribution-Conversion-Data-from-the-SDK-Deferred-Deeplinking-#Introduction)
164
-
165
-
### <aid="handle-deeplinking"> 2. Direct Deeplinking
166
-
167
-
Handle the Direct deeplink in the 'onAppOpenAttribution' callback:
When a deeplink is clicked on the device the AppsFlyer SDK will return the link in the [onAppOpenAttribution](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#deep-linking-data-the-onappopenattribution-method-) method.
184
-
185
-
### <aid="Unified-deep-linking"> 3. Unified deep linking
186
-
187
-
Handle the Unified deeplink in the 'onDeepLinking' callback (if `onDeepLinking` callback is define, `onAppOpenAttribution` won't be called):
188
-
189
-
```
190
-
var options = {
191
-
devKey: 'devKey',
192
-
appId: "appId",
193
-
isDebug: true,
194
-
onDeepLinking: function(_res){
195
-
console.log("onDeepLinking: " + _res);
196
-
},
197
-
};
198
-
199
-
For more information about this api, please check [OneLink Guide Here](https://dev.appsflyer.com/docs/android-unified-deep-linking)
**NOTE:** On Android, AppsFlyer SDK inspects activity intent object during onResume(). Because of that, for each activity that may be configured or launched with any [non-standard launch mode](https://developer.android.com/guide/topics/manifest/activity-element#lmode) the following code was added to `MainActivity.java` in `android/app/src/main/java/com...`
216
-
217
-
Java:
218
-
219
-
```java
220
-
@Override
221
-
publicvoid onNewIntent(Intent intent) {
222
-
super.onNewIntent(intent);
223
-
setIntent(intent);
224
-
}
225
-
```
226
-
227
-
Kotlin:
228
-
229
-
```
230
-
override fun onNewIntent(intent : Intent){
231
-
super.onNewIntent(intent)
232
-
setIntent(intent)
233
-
}
234
-
```
235
-
236
-
237
-
#### App Links
238
-
239
-
In your app’s manifest add the following intent-filter to your relevant activity:
For more on App Links check out the guide [here](https://support.appsflyer.com/hc/en-us/articles/115005314223-Deep-Linking-Users-with-Android-App-Links#what-are-android-app-links).
254
-
255
-
256
-
### <aid="iosdeeplinks"> iOS Deeplink Setup
257
-
258
-
259
-
### URI Scheme
260
-
261
-
1. Create custom app delegate
262
-
263
-
2. Add the following iOS method and AppsFlyer API
264
-
265
-
```
266
-
@NativeClass()
267
-
export class CustomAppDelegate extends UIResponder, ATTrackingManager implements UIApplicationDelegate{
268
-
public static ObjCProtocols = [UIApplicationDelegate];
For more on URI-schemes check out the guide [here](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-deep-linking-guide#setups-uri-scheme-for-ios-8-and-below)
287
-
288
-
289
-
### Universal Links
290
-
291
-
1. Create custom app delegate
292
-
293
-
2. Add the following iOS method and AppsFlyer API
294
-
295
-
```
296
-
@NativeClass()
297
-
export class CustomAppDelegate extends UIResponder, ATTrackingManager implements UIApplicationDelegate{
298
-
public static ObjCProtocols = [UIApplicationDelegate];
Essentially, the Universal Links method links between an iOS mobile app and an associate website/domain, such as AppsFlyer’s OneLink domain (xxx.onelink.me). To do so, it is required to:
313
-
314
-
1. Get your SHA256 fingerprint:
315
-
316
-
a. Creating A Keystore
317
-
318
-
b. [Generate Fingerprint](https://developers.google.com/android/guides/client-auth)
319
-
2. Configure OneLink sub-domain and link to mobile app in the AppsFlyer onelink setup on your dashboard, add the fingerprint there (AppsFlyer takes care of hosting the ‘apple-app-site-association’ file)
320
-
3. Configure the mobile app to register approved domains:
321
-
322
-
```xml
323
-
<?xml version="1.0" encoding="UTF-8"?>
324
-
<!DOCTYPEplist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
325
-
<plistversion="1.0">
326
-
<dict>
327
-
<key>com.apple.developer.associated-domains</key>
328
-
<array>
329
-
<string>applinks:test.onelink.me</string>
330
-
</array>
331
-
</dict>
332
-
</plist>
333
-
```
334
-
335
-
For more on Universal Links check out the guide [here](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#setups-universal-links).
336
-
337
-
338
-
---
339
-
340
-
## <aid="ios14"> Set plugin for IOS 14
341
-
342
-
1. Add a custom App Delegate and inside add the ATT consent dialog for IDFA collection:
343
-
```
344
-
@NativeClass()
345
-
export class CustomAppDelegate extends UIResponder, ATTrackingManager implements UIApplicationDelegate{
346
-
public static ObjCProtocols = [UIApplicationDelegate];
import { CustomAppDelegate } from "./custom-app-delegate";
365
-
366
-
if (Application.ios) {
367
-
Application.ios.delegate = CustomAppDelegate;
368
-
}
369
-
```
370
-
371
-
3. Add `Privacy - Tracking Usage Description` inside your `.plist` file in Xcode.
372
-
373
-
4. Optional: Set the `timeToWaitForATTUserAuthorization` property in the `options` to delay the sdk initazliation for a number of `x seconds` until the user accept the consent dialog:
374
-
375
-
```
376
-
var options = {
377
-
devKey: 'WdpTVAcYwmxsaQ4WeTspmh',
378
-
appId: "975313579",
379
-
isDebug: true,
380
-
timeToWaitForATTUserAuthorization: 60
381
-
};
382
-
```
383
-
384
-
385
-
For more info visit our Full Support guide for iOS 14:
(GDPR/CCPA COMPLIANT - Read more information in the [following article](https://support.appsflyer.com/hc/en-us/articles/360001422989-Implementing-app-user-opt-in-opt-out-in-the-AppsFlyer-SDK)
393
-
394
-
In some cases, advertisers may want to stop sharing user-level data with ad networks/partners for specific users.
395
-
Reasons for this include:
396
-
Privacy policies such as CCPA or GDPR
397
-
User opt-out mechanisms
398
-
Competition with some partners (ad networks, 3rd parties)
399
-
AppsFlyer provides two API methods to stop sharing data with some or all partners:
This plugin has a `demo` project bundled with it. To give it a try , clone this repo and from root a.e. `nativescript-plugin-appsflyer` execute the following:
0 commit comments