You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Expo iOS端Deep Linking问题:Instagram内无法唤起应用,浏览器正常

解决Instagram无法唤起Deep Link的问题

1. 补充LSApplicationQueriesSchemes的Instagram相关Scheme

你当前的infoPlist仅添加了instagram,但需要补充Instagram的其他必要Scheme才能触发正常跳转,更新后的配置如下:

"LSApplicationQueriesSchemes": ["fb","fbapi","fbauth2","fb-messenger-api","instagram","instagram-stories","instagram-url","ig","ig-stories","ig-url","instagram-direct"]

2. 配置Universal Links(推荐方案)

Instagram对自定义Scheme的跳转有严格限制,优先使用Universal Links可解决大部分唤起问题:

  • 在app.json的expo.ios字段下添加关联域名:
"ios": {
  "associatedDomains": ["applinks:your-domain.com"]
}
  • 确保你的域名根目录下存在apple-app-site-association文件,文件格式需正确包含你的App ID和Deep Link路径规则。

3. 验证Deep Link处理逻辑

  • 确认Expo Linking监听器已正确注册,示例代码如下:
import * as Linking from 'expo-linking';

Linking.addEventListener('url', (event) => {
  // 此处编写你的Deep Link跳转处理逻辑
  console.log('收到跳转链接:', event.url);
});
  • 测试时使用正式版Instagram应用(模拟器或测试版Instagram可能存在限制不生效的情况)。

4. 检查App Transport Security配置

如果你的Universal Links使用HTTPS协议,需确保infoPlist允许对应域名的请求:

"NSAppTransportSecurity": {
  "NSAllowsArbitraryLoads": false,
  "NSExceptionDomains": {
    "your-domain.com": {
      "NSIncludesSubdomains": true,
      "NSAllowsArbitraryLoads": true
    }
  }
}

内容的提问来源于stack exchange,提问作者Jean Hoffmann

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 20:05:26