You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

配置Universal Links跳转至App无响应,请求技术排查

Let’s break down the common issues and fixes for your App Links not redirecting to your app—this setup has a few easy-to-miss details that often trip people up:

  • Verify your apple-app-site-association server setup

    • First, make sure the file is served with the correct Content-Type header: it must be application/json. Run this command to check:
      curl -I https://stage.domain.com/apple-app-site-association
      
      Look for a line that says Content-Type: application/json—if it’s text/plain or anything else, update your server config to set the right header.
    • Ensure the file is accessible over HTTPS without any redirects (no HTTP→HTTPS jumps, no path redirects like /apple-app-site-association/ to /apple-app-site-association). Safari will ignore the file if there’s a redirect.
  • Double-check your App ID and Team ID

    • The appID value in your JSON must be exactly [TEAM_ID].[BUNDLE_ID], where:
      • TEAM_ID is your 10-character team identifier from Apple Developer Portal (not your team name)
      • BUNDLE_ID is the exact bundle ID of your app (case-sensitive)
    • A mismatch here is one of the most common reasons App Links fail silently.
  • Validate Associated Domains in Xcode

    • Confirm the Associated Domains capability is enabled for your target (under Signing & Capabilities), and the entry is exactly applinks:stage.domain.com—no trailing slashes, spaces, or typos.
    • Make sure your provisioning profile includes the Associated Domains entitlement. If you just enabled the capability, regenerate your profile and reselect it in Xcode to avoid missing permissions.
  • Understand Safari’s App Links trigger behavior

    • Safari won’t redirect when you type the URL directly into the address bar and hit enter. You need to click a link to your domain (from another webpage, Notes, Messages, etc.) to trigger the "Open in [App]" prompt.
    • For iOS 13+, ensure your app’s Info.plist includes NSUserActivityTypeBrowsingWeb in the NSUserActivityTypes array—Xcode usually adds this automatically when enabling Associated Domains, but it’s worth confirming.
  • Clear cached data

    • iOS caches the apple-app-site-association file aggressively. To rule out old cached data:
      1. Go to Settings > Safari > Clear History and Website Data
      2. Restart your test device
    • If testing with TestFlight, make sure the build you’re using was packaged with the correct Associated Domains configuration (local builds might work but TestFlight builds can fail if the provisioning profile is outdated).

内容的提问来源于stack exchange,提问作者Steven Matthews

火山引擎 最新活动