概要:
简介
前期准备
第1步:
第2步:
第2步:
- 有关更多信息,请参见这里 。
第1步:
<activity android:name=".DeepLinkActivity">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="click.example.com"
android:pathPrefix="/campaign" />
</intent-filter>
</activity>
第2步:
-
AppsFlyerLib.getInstance().setResolveDeepLinkURLs("click.example.com");
第1步:
- 在 XCode 中选择您的项目
-
AppsFlyerLib.getInstance().setResolveDeepLinkURLs("clickdomain.com", "myclickdomain.com", "anotherclickdomain.com");
-
[AppsFlyerLib shared].resolveDeepLinkURLs = @[@"example.com",@"click.example.com"];
AppsFlyerLib.shared().resolveDeepLinkURLs = ["example.com", "click.example.com"]
-
- (NSDictionary *)allHTTPHeaderFieldsForResolveDeepLinkURL:(NSURL *)URL { if ([URL.host isEqual: @"click.example.com"]) { return [NSDictionary dictionary]; } else { return nil; } }func allHTTPHeaderFields(forResolveDeepLinkURL URL: URL!) -> [String : String]! { if (URL.host == "click.example.com") { /// Change User-Agent return [:] } else { return nil; } }
-
-
举例来说,
<a href="greatapp.onelink.me/abcd/1234567">Download my great app!</a>
示例
https://greatapp.onelink.me/abcd?pid=Email&c=Spring_Newsletter&is_retargeting=true& af_dp=testapp://path/to/content&af_web_dp=https://www.example.com/path/to/content& af_ios_url=https://www.example.com/path/to/content&af_android_url=https://www.example.com/path/to/content