简体   繁体   English

应用程序投入生产后深度链接不起作用

[英]deep-linking not working after the app on production

I created my app with react-native expo and added deep-linking and I tested the deep-linking on develop and on simulator and it is working fine "npx uri-scheme open myapp://orders --android" but when try to open this "https://myschema.com/orders" on my android device through chrome not open the app the app.json is我使用 react-native expo 创建了我的应用程序并添加了深度链接,我在开发和模拟器上测试了深度链接,它工作正常“npx uri-scheme open myapp://orders --android”但是当尝试打开它时我的 android 设备上的“https://myschema.com/orders”无法通过 chrome 打开应用程序 app.json 是

{
   "expo":{
      "scheme": "myapp",
      "android": {
          //........
          "intentFilters": [
             {
               "action": "VIEW",
               "autoVerify": true,
               "data": [
                  {
                    "scheme": "https",
                    "host": "myapp.com",
                    "pathPrefix": "/"
                  }
                ],
              "category": [
                 "BROWSABLE",
                 "DEFAULT"
               ]
            }
         ]
      }
    }
}

Add this for test ios添加此用于测试 ios

{
   "scheme": "myapp",
   "host": "*",
   "pathPrefix": "/"
 }

Your new code will be like:您的新代码将如下所示:

{
   "expo":{
      "scheme": "myapp",
      "android": {
          //........
          "intentFilters": [
             {
               "action": "VIEW",
               "autoVerify": true,
               "data": [
                  {
                    "scheme": "https",
                    "host": "myapp.com",
                    "pathPrefix": "/"
                  },
                  {
                    "scheme": "myapp",
                    "host": "*",
                    "pathPrefix": "/"
                  }
                ],
              "category": [
                 "BROWSABLE",
                 "DEFAULT"
               ]
            }
         ]
      }
    }
}

ios => after build ipa for test ios run this link in your browser phone when app installed: myapp:// ios =>在构建ipa进行测试 ios 安装应用程序后,在您的浏览器手机中运行此链接:myapp://

android => after build apk for test android send in this link in message (email, whatsapp, ...) and click link for test (after installed app) android =>在构建apk以进行测试 android 在此链接中发送消息(电子邮件,whatsapp,...)并单击链接进行测试(安装应用程序后)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 嵌套 react-navigation 与 expo react native 深度链接 - Nested react-navigation deep-linking with expo react native 不使用剪贴板的延迟深度链接有哪些替代方法? - What are some alternatives for deferred deep-linking without using the clipboard? 深度链接在 Android 上的 React Native 应用程序中不起作用 - Deep Linking not working in React Native app on Android 当应用程序处于后台状态时,深度链接不起作用 React Native - Deep linking not working when app is in background state React native 深度链接后如何重启本机应用程序 - How to restart react native app after deep linking React Native - 当应用程序不在后台(Android,iOS)时,深度链接不起作用 - React Native - Deep linking is not working when app is not in background (Android, iOS) React Navigation 4 深度链接不起作用 - React Navigation 4 Deep Linking is not working 延迟通知深度链接,直到 react-native expo 应用程序完全加载 - Defer notification deep linking until after react-native expo app is fully loaded 当应用程序处于后台状态时,React Native 深度链接不起作用 React Native - React native deep linking not working when app is in background state React native React-Navigation Android深层链接不起作用 - React-Navigation Android deep linking not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM