본문으로 건너뛰기
엔지니어링 · · 6분 소요

멀티 플랫폼 엔지니어링 팀을 위한 딥 링킹

작성자 Tolinku 팀
|
멀티플랫폼 엔지니어링 팀을 위한 딥 링킹

딥 링킹은 앱이 돌아가는 모든 플랫폼에 걸쳐 있어요. AASA 파일은 iOS 쪽 일이고, assetlinks.json은 Android 쪽 일이에요. Intent 필터는 AndroidManifest.xml에 있고, 라우트 처리 코드는 Swift, Kotlin, TypeScript, Dart에 흩어져 있을 수 있어요. 이 조각들이 서로 어긋나면 링크가 깨져요. 이 글에서는 멀티 플랫폼 팀이 딥 링크 구현을 어떻게 맞춰 나가는지 다뤄요.

공통 라우팅 패턴은 다음을 참고하세요: 크로스 플랫폼 링크 처리 패턴. 크로스 플랫폼 개요는 다음 글을 참고하세요: 2026년 크로스 플랫폼 딥 링킹 가이드.

팀 간 조율 문제

딥 링크 라우트 하나(예: /products/:productId)를 추가하려면 최대 여섯 곳을 고쳐야 해요:

  1. AASA 파일 (iOS용, 도메인에 호스팅)
  2. assetlinks.json (Android용, 도메인에 호스팅)
  3. iOS 엔타이틀먼트 (Xcode의 Associated Domains)
  4. AndroidManifest.xml (경로 접두사를 지정한 Intent filter)
  5. 클라이언트 측 라우터 (iOS, Android, 크로스 플랫폼 프레임워크 중 해당하는 것)
  6. 서버 측 폴백 (앱이 없는 사용자용)

iOS 팀이 AASA에 라우트를 추가했는데 Android 팀이 Intent filter를 빠뜨리면, 링크가 iOS에서는 동작하지만 Android에서는 동작하지 않아요. 백엔드 팀이 서버 측 리디렉션을 바꿨는데 모바일 팀이 라우터를 업데이트하지 않으면, 앱은 열리지만 엉뚱한 화면이 떠요.

단일 정보 출처

모든 딥 링크 라우트를 한곳에 정의하세요. 모든 팀이 이 파일을 기준으로 삼아요.

라우트 설정 파일

# deep-links.yaml
routes:
  - path: "/products/{productId}"
    screen: "ProductDetail"
    platforms: [ios, android, web]
    params:
      productId:
        type: string
        required: true
    queryParams:
      ref:
        type: string
        required: false
      campaign:
        type: string
        required: false

  - path: "/offers/{offerId}"
    screen: "OfferDetail"
    platforms: [ios, android, web]
    params:
      offerId:
        type: string
        required: true

  - path: "/referral/{referrerId}"
    screen: "Referral"
    platforms: [ios, android, web]
    params:
      referrerId:
        type: string
        required: true

  - path: "/ar-preview/{productId}"
    screen: "ARPreview"
    platforms: [ios]  # ARKit 전용
    params:
      productId:
        type: string
        required: true
    fallback:
      screen: "ProductDetail"

코드 생성

공유 정의에서 플랫폼별 설정을 생성하세요:

// generate-deep-link-configs.ts
import { parse } from 'yaml';
import { readFileSync, writeFileSync } from 'fs';

const config = parse(readFileSync('deep-links.yaml', 'utf8'));

function generateAASA(routes: Route[]) {
  const iosRoutes = routes.filter(r => r.platforms.includes('ios'));
  return {
    applinks: {
      details: [{
        appIDs: [process.env.APPLE_APP_ID],
        components: iosRoutes.map(r => ({
          '/': r.path.replace(/\{[^}]+\}/g, '*')
        }))
      }]
    }
  };
}

function generateIntentFilters(routes: Route[]) {
  const androidRoutes = routes.filter(r => r.platforms.includes('android'));
  const prefixes = new Set(
    androidRoutes.map(r => '/' + r.path.split('/')[1])
  );
  return Array.from(prefixes);
}

function generateRouterTests(routes: Route[]) {
  return routes.map(route => ({
    testUrl: route.path.replace(/\{(\w+)\}/g, 'test-$1'),
    expectedScreen: route.screen,
    expectedParams: Object.keys(route.params).reduce((acc, key) => {
      acc[key] = `test-${key}`;
      return acc;
    }, {} as Record<string, string>)
  }));
}

CI에서 이 생성기를 실행해서 플랫폼별 설정이 기준 파일과 일치하는지 확인하세요.

팀별 역할

담당 범위

구성 요소 담당 리뷰 필요 팀
deep-links.yaml 제품/엔지니어링 리드 모든 플랫폼 팀
AASA 파일 백엔드/DevOps iOS 팀
assetlinks.json 백엔드/DevOps Android 팀
iOS 엔타이틀먼트 iOS 팀 –
AndroidManifest.xml Android 팀 –
클라이언트 측 라우팅 각 플랫폼 팀 –
서버 측 폴백 백엔드 팀 제품

변경 절차

새 딥 링크 라우트를 추가할 때:

  1. 제안: PR로 deep-links.yaml 에 라우트를 추가하고, 모든 플랫폼 팀에 리뷰를 요청하세요.
  2. 백엔드: AASA와 assetlinks.json 업데이트를 배포하세요. 앱 업데이트보다 먼저 반영돼야 해요.
  3. iOS: iOS 라우터에 라우트를 추가하세요. 도메인이 바뀌었다면 엔타이틀먼트도 업데이트하세요.
  4. Android: Intent filter를 추가하고 Android 라우터를 업데이트하세요.
  5. 웹: 서버 측 폴백 라우트를 추가하세요.
  6. QA: 출시 전에 모든 플랫폼에서 테스트하세요.

iOS와 Android는 이 파일들을 캐시하기 때문에 AASA와 assetlinks.json 업데이트를 먼저 배포해야 해요. 새 라우트가 들어간 앱이 출시됐는데 검증 파일이 업데이트되지 않았다면, 캐시가 갱신될 때까지 링크가 동작하지 않아요(iOS는 최대 24시간, Android는 경우에 따라 달라요).

공동 테스트

계약 테스트

각 플랫폼의 라우터가 같은 URL을 똑같이 처리하는지 검증하는 테스트를 작성하세요:

// shared-deep-link-tests.json
{
  "tests": [
    {
      "url": "https://yourdomain.com/products/abc123",
      "expectedScreen": "ProductDetail",
      "expectedParams": { "productId": "abc123" }
    },
    {
      "url": "https://yourdomain.com/products/abc123?ref=email&campaign=summer",
      "expectedScreen": "ProductDetail",
      "expectedParams": {
        "productId": "abc123",
        "ref": "email",
        "campaign": "summer"
      }
    },
    {
      "url": "https://yourdomain.com/offers/deal456",
      "expectedScreen": "OfferDetail",
      "expectedParams": { "offerId": "deal456" }
    },
    {
      "url": "https://yourdomain.com/nonexistent/path",
      "expectedScreen": null,
      "expectedParams": {}
    }
  ]
}

각 플랫폼 팀은 이 파일을 읽어서 자기 라우터를 검증하는 테스트 러너를 작성해요:

iOS (XCTest):

func testSharedDeepLinkContracts() {
    let tests = loadSharedTests()
    for test in tests {
        let result = DeepLinkRouter.match(url: test.url)
        XCTAssertEqual(result?.screen, test.expectedScreen)
        XCTAssertEqual(result?.params, test.expectedParams)
    }
}

Android (JUnit):

@Test
fun `shared deep link contracts`() {
    val tests = loadSharedTests()
    tests.forEach { test ->
        val result = DeepLinkRouter.match(test.url)
        assertEquals(test.expectedScreen, result?.screen)
        assertEquals(test.expectedParams, result?.params)
    }
}

엔드투엔드 테스트

CI에서 플랫폼별로 E2E 테스트를 실행하세요:

# iOS (Xcode Cloud 또는 Bitrise)
xcrun simctl openurl booted "https://yourdomain.com/products/abc123"
# ProductDetail 화면이 보이는지 확인

# Android (Firebase Test Lab)
adb shell am start -a android.intent.action.VIEW \
  -d "https://yourdomain.com/products/abc123" \
  -c android.intent.category.BROWSABLE
# ProductDetail 화면이 보이는지 확인

딥 링크 경로가 바뀌면 하위 호환성을 챙겨야 해요. 이메일, 소셜 미디어, QR 코드로 공유된 예전 링크는 언제까지고 돌아다닐 수 있어요.

서버 측 리디렉션

더 이상 쓰지 않는 경로는 서버 측 리디렉션으로 처리하세요:

// 예전 경로를 새 경로로 리디렉션
const redirects: Record<string, string> = {
  '/item/': '/products/',     // 예전 경로 형식
  '/deal/': '/offers/',       // 이름이 바뀐 라우트
  '/invite/': '/referral/'    // 이름이 바뀐 라우트
};

app.use((req, res, next) => {
  for (const [oldPrefix, newPrefix] of Object.entries(redirects)) {
    if (req.path.startsWith(oldPrefix)) {
      const newPath = req.path.replace(oldPrefix, newPrefix);
      res.redirect(301, newPath + (req.originalUrl.includes('?')
        ? '?' + req.originalUrl.split('?')[1]
        : ''));
      return;
    }
  }
  next();
});

클라이언트 측 호환성

클라이언트 라우터에는 예전 라우트를 최소 두 번의 릴리스 주기 동안 남겨 두세요:

function matchRoute(url: string): RouteMatch | null {
  // 현재 라우트
  const currentMatch = matchCurrentRoutes(url);
  if (currentMatch) return currentMatch;

  // 레거시 라우트 (v3.0 이후 제거)
  const legacyMatch = matchLegacyRoutes(url);
  if (legacyMatch) {
    analytics.track('legacy_deep_link', { url });
    return legacyMatch;
  }

  return null;
}

모니터링

플랫폼별로 딥 링크 상태를 추적하세요:

// 모든 딥 링크 시도를 기록
function trackDeepLink(url: string, result: 'matched' | 'unmatched', platform: string) {
  analytics.track('deep_link_received', {
    url,
    result,
    platform,
    screen: result === 'matched' ? matchedScreen : null,
    timestamp: Date.now()
  });
}

다음 상황에는 알림을 걸어 두세요:

  • 매칭되지 않은 딥 링크 가 한 플랫폼에서만 급증하는 경우(라우트 누락).
  • AASA 검증 실패 (확인 도구: curl -v https://yourdomain.com/.well-known/apple-app-site-association).
  • assetlinks.json 검증 실패 (확인 도구: Google의 Statement List Generator).

문서

모든 팀이 참고하는 문서를 하나 두고 계속 업데이트하세요:

라우트 화면 플랫폼 추가일 담당
/products/{productId} ProductDetail iOS, Android, 웹 v1.0 제품
/offers/{offerId} OfferDetail iOS, Android, 웹 v1.2 마케팅
/referral/{referrerId} Referral iOS, Android, 웹 v1.5 Growth
/ar-preview/{productId} ARPreview iOS v2.0 제품

포함할 내용:

  • 지원하는 쿼리 파라미터
  • 앱이 설치되지 않았을 때의 동작
  • 기대하는 뒤로 가기 동작
  • 링크가 깨졌을 때 연락할 담당자

멀티 플랫폼 팀을 위한 Tolinku

Tolinku 는 딥 링크 설정을 한곳에서 관리해요. 라우트 는 Tolinku 대시보드에서 정의하고, AASA와 assetlinks.json 파일은 플랫폼이 자동으로 생성하고 호스팅해요. 파일을 직접 관리할 필요가 없고, 플랫폼별 파일이 서로 어긋날 일도 줄어들어요. 분석 에서 어떤 링크가 플랫폼별로 잘 동작하는지 확인할 수 있어요.

딥 링크 테스트는 다음 글을 참고하세요: 여러 플랫폼과 기기에서 딥 링크 테스트하기. 크로스 플랫폼 개요는 다음 글을 참고하세요: 2026년 크로스 플랫폼 딥 링킹 가이드.

딥 링킹 팁을 메일로 받아 보세요

일주일에 한 번만 보내요. 스팸은 없어요.

앱에 딥 링킹을 추가해 볼까요?

유니버설 링크, 앱 링크, 디퍼드 딥 링킹, 분석을 몇 분 만에 설정할 수 있어요. 무료로 시작하세요.