Linking to app

2019-08-23  本文已影响0人  glenlg
createStackNavigator(
    {
      App: { screen: Mybet },
      Login: { 
        screen: Results,
        path:'test/:aa'
       }
    },
    {
      initialRouteName: 'App',
    }
  )

android:新加intent, lunchmode

<activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustPan"
        android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="jim" />
        </intent-filter>
      </activity>

ios: 在xcode中配制url types

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
  return [RCTLinkingManager application:application openURL:url
                      sourceApplication:sourceApplication annotation:annotation];
}
上一篇下一篇

猜你喜欢

热点阅读