ディープリンクは、Adjust管理画面で設定した後にアプリで設定できます。 ダイレクトディープリンク は、ユーザーがアプリをデバイスにインストールしている場合に使用されます。このリンクは、ユーザーをアプリ内の特定のページに誘導します。
ディープリンクを有効化するには、以下を行う必要があります。
Associated Domainsを有効化する
最初に、Apple Developer AccountでAssociated Domainsを有効にする必要があります。これにより、アプリでユニバーサルリンクドメインを設定できるようになります。これを行うには、以下の手順に従ってください。
- Apple Developer Accountにログインします。
- 左側のメニューで 証明書、ID、プロフィール(Certificates, IDs & Profiles) を選択します。
- 左側のメニューで ID(Identifiers) を選択します。
- アプリを探して選択し、編集ページを開きます。
- 機能(Capabilities) で、 Associated Domains にチェックマークが付いていることを確認します。
- 保存(Save) を選択して変更内容を保存します。
次の手順に従って、ディープリンク設定をXcodeプロジェクトに追加します。
Adjustユニバーサルリンクとブランドドメイン
-
Xcodeでアプリプロジェクトを開きます。
-
左側のメニューからプロジェクトを選択します。
-
ターゲット(Targets) でアプリを選択します。
-
上部のメニューから 署名と機能(Signing & Capabilities) を選択します。
-
下のサブメニューで 全て(All) が選択されていることを確認します。
-
追加(Add)オプション( + )を選択して、機能を追加します。
-
Associated Domains を選択します。
-
プレフィックスapplinksを含むAdjustユニバーサルリンクドメインを入力します: applinks:
example.adj.st
を使用する場合、applinks:example.adj.st
のようになります。
-
Adjustでアプリのブランドドメインを設定する際に設定したブランドリンクドメインを入力します。
brandedDomain.go.link
を使用する場合、brandedDomain.go.link
のようになります。
すでにxxx.adj.st
をユニバーサルリンクのドメインとして使用している場合は、それを削除しないでください。xxx.adj.st
とbrandedDomain.go.link
の両方を関連ドメインとして保持してください。
カスタムURLスキーム
- Xcodeでアプリプロジェクトを開きます。
- 左側のメニューからプロジェクトを選択します。
- ターゲット(Targets) でアプリを選択します。
- 上部のメニューから 情報(Info) を選択します。
- URLタイプ(URL Types) セクションを展開します。
- 追加(Add)オプション( + )を選択してURLタイプを追加します。
- 次の情報を入力してURLスキームを作成します。
- 識別子 :
$(PRODUCT_BUNDLE_IDENTIFIER)
- URLスキーム(URL Schemes) :カスタムURLスキーム。これは一意のものである必要があります。
http
、https
、mailto
などの保護されたスキームは使用しないでください。
- 権限(Role) :編集者(Editor)
このスキームは、本番用ビルド および デバッグビルドで機能します。
iOSアプリに変更を加える
さまざまなディープリンクシナリオを設定するために、iOSアプリを更新する必要があります。アプリの更新方法は、アプリでシーンを使用するかどうかによって異なります。
アプリでシーンを使用しない
アプリでシーンを使用しない場合、アプリデリゲートのメソッドを更新する必要があります。
ユニバーサルリンク
Adjust SDKの次のメソッドを呼び出すために、アプリデリゲートのapplication(_:continue:restorationHandler:)
メソッドを更新します:
ADJLinkResolution.resolveLink
: このメソッドは、マーケティングチームでAdjustのリンク解析ソリューションの使用が必須である場合にのみ呼び出します。resolveUrlSuffixArray
内の要素と一致するドメインをディープリンクで使用する場合、メソッドはディープリンクの解析を試み、解析されたリンクを返します。ディープリンクがこの配列内の要素と一致しない場合、メソッドは元のディープリンクをパススルーするため、全てのディープリンクをこのメソッドにパスすることができます。
Adjust.processDeeplink
このメソッドを呼び出し、Adjustサーバーにディープリンクを送信して情報を記録します。AdjustのディープリンクとAdjust以外のディープリンクの両方をこのメソッドにパスすることができます。Adjustサーバーは、Adjustパラメーターを持たないディープリンクを計測しません。
ユーザーがユニバーサルリンクをクリックすると、iOSでアプリが開き、ディープリンクがapplication(_:continue:restorationHandler:)
に配信されます。これは、ユーザーがアプリを閉じていても、バックグラウンドで実行していても発生します。
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void)
if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
if let incomingURL = userActivity.webpageURL {
// call the below method to resolve deep link
ADJLinkResolution.resolveLink(
resolveUrlSuffixArray: ["email.example.com", "short.example.com"],
callback: { resolvedURL in
// add your code below to handle deep link
// (for example, open deep link content)
// resolvedURL object contains the deep link
if let resolvedDeeplink = resolvedURL {
// call the below method to send deep link to Adjust's servers
if let deeplink = ADJDeeplink(deeplink: resolvedDeeplink) {
Adjust.processDeeplink(deeplink)
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
(void (^)(NSArray *restorableObjects))restorationHandler {
if ([[userActivity activityType]
isEqualToString:NSUserActivityTypeBrowsingWeb]) {
NSURL *incomingURL = [userActivity webpageURL];
// call the below method to resolve deep link
resolveLinkWithUrl:incomingURL
@"email.example.com", @"short.example.com"
callback:^(NSURL* _Nullable resolvedURL) {
// add your code below to handle deep link
// (for example, open deep link content)
// resolvedURL object contains the deep link
// call the below method to send deep link to Adjust's servers
ADJDeeplink *deeplink = [[ADJDeeplink alloc] initWithDeeplink:resolvedURL];
[Adjust processDeeplink:deeplink];
カスタムURLスキーム
カスタムURLスキームのディープリンクを設定することをマーケティングチームから求められた場合、アプリデリゲートのapplication(_:open:options:)
メソッドを更新して、Adjust SDKのAdjust.processDeeplink
メソッドを呼び出します。このメソッドは、ディープリンクをAdjustサーバーに送信し、記録します。AdjustのディープリンクとAdjust以外のディープリンクの両方をこのメソッドにパスすることができます。Adjustサーバーは、Adjustパラメーターを持たないディープリンクを計測しません。
ユーザーがカスタムURLスキームのディープリンクをクリックすると、iOSでアプリが開き、ディープリンクがapplication(_:open:options:)
に配信されます。これは、ユーザーがアプリを閉じていても、バックグラウンドで実行していても発生します。
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
// add your code below to handle deep link
// (for example, open deep link content)
// incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers
if let deeplink = ADJDeeplink(deeplink: incomingURL) {
Adjust.processDeeplink(deeplink)
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)incomingURL
options:(NSDictionary *)options {
// add your code below to handle deep link
// (for example, open deep link content)
// incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers
[Adjust processDeeplink:[[ADJDeeplink alloc] initWithDeeplink:incomingURL]];
アプリでシーンを使用
アプリでシーンを使用する場合、シーンデリゲートのメソッドを更新する必要があります。
ユニバーサルリンク
- シーンデリゲートの
scene(_:willConnectTo:options:)
メソッドを更新します。アプリを閉じている状態でユーザーがユニバーサルリンクをクリックすると、iOSでアプリが開き、このメソッドへのディープリンクが配信されます。
- シーンデリゲートの
scene(_:continue:)
メソッドを更新します。バックグラウンドでアプリを実行している状態でユーザーがユニバーサルリンクをクリックすると、iOSでアプリが開き、このメソッドへのディープリンクが配信されます。
上記のメソッドにより、Adjust SDKの次のメソッドが呼び出されます。
ADJLinkResolution.resolveLink
: このメソッドは、マーケティングチームでAdjustのリンク解析ソリューションの使用が必須である場合にのみ呼び出します。resolveUrlSuffixArray
内の要素と一致するドメインをディープリンクで使用する場合、メソッドはディープリンクの解析を試み、解析されたリンクを返します。ディープリンクがこの配列内の要素と一致しない場合、メソッドは元のディープリンクをパススルーするため、全てのディープリンクをこのメソッドにパスすることができます。
Adjust.processDeeplink
- このメソッドを呼び出し、Adjustサーバーにディープリンクを送信してそれらを記録します。AdjustのディープリンクとAdjust以外のディープリンクの両方をこのメソッドにパスすることができます。Adjustサーバーは、Adjustパラメーターを持たないディープリンクを計測しません。
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
guard let userActivity = connectionOptions.userActivities.first,
userActivity.activityType == NSUserActivityTypeBrowsingWeb,
let incomingURL = userActivity.webpageURL
// call the below method to resolve deep link
ADJLinkResolution.resolveLink(
resolveUrlSuffixArray: ["email.example.com", "short.example.com"],
callback: { resolvedURL in
// add your code below to handle deep link
// (for example, open deep link content)
// resolvedURL object contains the deep link
// call the below method to send deep link to Adjust's servers
if let deeplink = ADJDeeplink(deeplink: resolvedURL) {
Adjust.processDeeplink(deeplink)
continue userActivity: NSUserActivity) {
if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
let incomingURL = userActivity.webpageURL
// call the below method to resolve deep link
ADJLinkResolution.resolveLink(
resolveUrlSuffixArray: ["email.example.com", "short.example.com"],
callback: { resolvedURL in
// add your code below to handle deep link
// (for example, open deep link content)
// resolvedURL object contains the deep link
// call the below method to send deep link to Adjust's servers
if let deeplink = ADJDeeplink(deeplink: resolvedURL) {
Adjust.processDeeplink(deeplink)
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session
options:(UISceneConnectionOptions *)connectionOptions {
NSUserActivity* userActivity =
[[[connectionOptions userActivities] allObjects] firstObject];
if ([[userActivity activityType]
isEqualToString:NSUserActivityTypeBrowsingWeb]) {
NSURL *incomingURL = [userActivity webpageURL];
// call the below method to resolve deep link
resolveLinkWithUrl:incomingURL
@"email.example.com", @"short.example.com"
callback:^(NSURL* _Nullable resolvedURL) {
// add your code below to handle deep link
// (for example, open deep link content)
// resolvedURL object contains the deep link
// call the below method to send deep link to Adjust's servers
ADJDeeplink *deeplink = [[ADJDeeplink alloc] initWithDeeplink:resolvedURL];
[Adjust processDeeplink:deeplink];
- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity{
if ([[userActivity activityType]
isEqualToString:NSUserActivityTypeBrowsingWeb]) {
NSURL *incomingURL = [userActivity webpageURL];
// call the below method to resolve deep link
resolveLinkWithUrl:incomingURL
@"email.example.com", @"short.example.com"
callback:^(NSURL* _Nullable resolvedURL) {
// add your code below to handle deep link
// (for example, open deep link content)
// resolvedURL object contains the deep link
// call the below method to send deep link to Adjust's servers
ADJDeeplink *deeplink = [[ADJDeeplink alloc] initWithDeeplink:resolvedURL];
[Adjust processDeeplink:deeplink];
カスタムURLスキーム
- シーンデリゲートの
scene(_:willConnectTo:options:)
メソッドを更新します。アプリを閉じている状態でユーザーがカスタムURLスキームのディープリンクをクリックすると、iOSでアプリが開き、このメソッドへのディープリンクが配信されます。
- シーンデリゲートの
scene(_:openURLContexts:)
メソッドを更新します。バックグラウンドでアプリを実行している状態でユーザーがカスタムURLスキームのディープリンクをクリックすると、iOSでアプリが開き、このメソッドへのディープリンクが配信されます。
これらのメソッドは、Adjust SDKでAdjust.processDeeplink
メソッドを呼び出します。このメソッドは、ディープリンクをAdjustサーバーに送信し、記録します。AdjustのディープリンクとAdjust以外のディープリンクの両方をこのメソッドにパスすることができます。Adjustサーバーは、Adjustパラメーターを持たないディープリンクを計測しません。
openURLContexts URLContexts: Set<uiopenurlcontext>
guard let incomingURL = URLContexts.first?.url else {
// add your code below to handle deep link
// (for example, open deep link content)
// incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers
if let deeplink = ADJDeeplink(deeplink: incomingURL) {
Adjust.processDeeplink(deeplink)
- (void)scene:(UIScene *)scene
openURLContexts:(nonnull NSSet<uiopenurlcontext *> *)URLContexts {
NSURL *incomingURL = [[URLContexts allObjects] firstObject].URL;
// add your code below to handle deep link
// (for example, open deep link content)
// incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers
ADJDeeplink *deeplink = [[ADJDeeplink alloc] initWithDeeplink:incomingURL];
[Adjust processDeeplink:deeplink];