最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to open another app in react native + expo - Stack Overflow

programmeradmin3浏览0评论

First of all, the versions I am currently using are "react-native": "0.76.7" and "expo": "~52.0.31".

I am creating an app with React Native and expo in this version, but there is an issue where other apps (banking apps, etc.) do not open in the app I created.

I think the intentFilter setting is wrong, but iOS opens fine, but Android doesn't...

/versions/latest/config/app/ /versions/latest/sdk/build-properties/ There are official documents for the latest version, but they are not easy to understand, so could you please tell me how to set them up?

The current expo settings are as follows:

{
  "expo": {
    "name": "//",
    "slug": "//",
    "version": "1.1.5",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "scheme": "//",
    "userInterfaceStyle": "automatic",
    "newArchEnabled": true,
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "//",
      "infoPlist": {
        "LSApplicationQueriesSchemes": [
          "kftc-bankpay",
          "ispmobile",
          "itms-apps",
          "hdcardappcardansimclick",
          "smhyundaiansimclick",
          "shinhan-sr-ansimclick",
          "smshinhanansimclick",
          "kb-acp",
          "mpocket.online.ansimclick",
          "ansimclickscard",
          "ansimclickipcollect",
          "vguardstart",
          "samsungpay",
          "scardcertiapp",
          "lottesmartpay",
          "lotteappcard",
          "cloudpay",
          "nhappcardansimclick",
          "nonghyupcardansimclick",
          "citispay",
          "citicardappkr",
          "citimobileapp",
          "kakaotalk",
          "payco",
          "chaipayment",
          "kb-auth",
          "hyundaicardappcardid",
          "com.wooricard.wcard",
          "lmslpay",
          "lguthepay-xpay",
          "liivbank",
          "supertoss",
          "naversearchapp",
          "ispmobile",
          "paycojoin",
          "fidopayco",
          "naversearchthirdlogin",
          "payco",
          "smilepayapp",
          "NewSmartPib",
          "newliiv",
          "kbbank",
          "monimopay",
          "monimopayauth",
          "com.shinhan.smartcaremgr",
          "nhallonepayansimclick",
          "cloudpay",
          "com.wooricard.wcard",
          "line",
          "alipays",
          "weixin"
        ],
        "NSAppTransportSecurity": {
          "NSAllowsArbitraryLoads": true,
          "NSAllowsArbitraryLoadsInWebContent": true
        }
      }
    },
    "android": {
      "package": "//",
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "intentFilters": [
        {
          "autoVerify": true,
          "action": "VIEW",
          "category": ["DEFAULT", "BROWSABLE"],
          "data": {
            "scheme": "//"
          }
        }
      ]
    },
    "web": {
      "bundler": "metro",
      "output": "static",
      "favicon": "./assets/images/favicon.png"
    },
    "plugins": [
      "expo-router",
      [
        "expo-build-properties",
        {
          "android": {
            "intentFilters": [
              {
                "action": "android.intent.action.VIEW",
                "data": "package:kvp.jjy.MispAndroid320"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.kftc.bankpay.android"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.kbstar.liivbank"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.nh.cashcardapp"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:kr.co.kfcc.mobilebank"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.knb.psb"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.kakao.talk"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.mysmilepay.app"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:finance.chai.app"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.nhnent.payapp"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.hyundaicard.appcard"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:viva.republica.toss"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.shcard.smartpay"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.shinhan.smartcaremgr"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.hanaskard.paycla"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:kr.co.samsungcard.mpocket"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.kbcard.cxh.appcard"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:nh.smart.nhallonepay"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:kr.co.citibank.citimobile"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.lcacApp"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.lotte.lpay"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.ssg.serviceapp.android.egiftcertificate"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.inicis.kpay"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.kbankwith.smartbank"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.lguplus.paynow"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.wooricard.smartapp"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.lottemembers.android"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.kt.ktauth"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.lguplus.smartotp"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.sktelecom.tauth"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.wooribank.smart.npib"
              },
              {
                "action": "android.intent.action.VIEW",
                "data": "package:com.kakaobank.channel"
              }
            ]
          }
        }
      ],
      [
        "expo-splash-screen",
        {
          "image": "./assets/images/splash-icon.png",
          "imageWidth": 200,
          "resizeMode": "contain",
          "backgroundColor": "#ffffff"
        }
      ],
      "expo-font",
      "expo-secure-store"
    ],
    "owner": "//",
    "experiments": {
      "typedRoutes": true
    }
  }
}

Just in case, I am leaving a download link to an example file for the exact same environment.

I want to configure my app made with react native and expo to allow other apps to be opened. (iOS was successful. Only Android did not work)

I tried using android manifestQueries, but a build error occurred. I think it only worked in older versions of expo.

android manifestQueries was inserted as follows:

{
  "expo": {
    ...,
    "ios": {
      ...
      "infoPlist": {
        "LSApplicationQueriesSchemes": [
          "kftc-bankpay",
          "ispmobile",
          "itms-apps",
          "hdcardappcardansimclick",
          "smhyundaiansimclick",
          "shinhan-sr-ansimclick",
          "smshinhanansimclick",
          "kb-acp",
          "mpocket.online.ansimclick",
          "ansimclickscard",
          "ansimclickipcollect",
          "vguardstart",
          "samsungpay",
          "scardcertiapp",
          "lottesmartpay",
          "lotteappcard",
          "cloudpay",
          "nhappcardansimclick",
          "nonghyupcardansimclick",
          "citispay",
          "citicardappkr",
          "citimobileapp",
          "kakaotalk",
          "payco",
          "chaipayment",
          "kb-auth",
          "hyundaicardappcardid",
          "com.wooricard.wcard",
          "lmslpay",
          "lguthepay-xpay",
          "liivbank",
          "supertoss",
          "kakaobank"
        ],
        "NSAppTransportSecurity": {
          "NSAllowsArbitraryLoads": true,
          "NSAllowsArbitraryLoadsInWebContent": true
        }
      }
    },
    ...
    "android": {
      ...
      "intentFilters": [
        {
          "action": "VIEW",
          "category": [
            "DEFAULT",
            "BROWSABLE"
          ],
          "data": {
            "scheme": "exampleformanagedexpo"
          }
        }
      ]
    },
    ...
    "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "manifestQueries": {
              "intent": {
                "action": "android.intent.action.VIEW",
                "category": "android.intent.category.BROWSABLE",
                "data": {
                  "scheme": "https"
                }
              },
              "package": [
                "kvp.jjy.MispAndroid320",
                "com.kftc.bankpay.android",
                "com.kbstar.liivbank",
                "com.nh.cashcardapp",
                "kr.co.kfcc.mobilebank",
                "com.knb.psb",
                "com.kakao.talk",
                "com.mysmilepay.app",
                "finance.chai.app",
                "com.nhnent.payapp",
                "com.hyundaicard.appcard",
                "viva.republica.toss",
                "com.shcard.smartpay",
                "com.shinhan.smartcaremgr",
                "com.hanaskard.paycla",
                "kr.co.samsungcard.mpocket",
                "com.kbcard.cxh.appcard",
                "nh.smart.nhallonepay",
                "kr.co.citibank.citimobile",
                "com.lcacApp",
                "com.lotte.lpay",
                "com.ssg.serviceapp.android.egiftcertificate",
                "com.inicis.kpay",
                "com.kbankwith.smartbank",
                "com.lguplus.paynow",
                "com.wooricard.smartapp",
                "com.lottemembers.android",
                "com.kt.ktauth",
                "com.lguplus.smartotp",
                "com.sktelecom.tauth",
                "com.wooribank.smart.npib",
                "com.kakaobank.channel"
              ]
            }
          }
        }
      ]
    ]
  }
}

The reason I am sure this only works with older versions of expo is because an error occurred during the build process.

The error was as follows :

Error: Invalid expo-build-properties config: [{"instancePath":"/android/manifestQueries/intent","schemaPath":"#/properties/android/properties/manifestQueries/properties/intent/type","keyword":"type","params":{"type":"array"},"message":"must be array"}]
发布评论

评论列表(0)

  1. 暂无评论