Actually, I'm developing an app on react-native 0.58 with react-navigation 3.1.5, and I can't make my app run properly.
This is my code:
app-navigation.js
const MainStack = createBottomTabNavigator({
Home: { screen: Home },
Pets: { screen: Pets, path: 'spidersecurity://terque/pets' },
Notifications: { screen: UserNotifications },
UpdateUser: { screen: UpdateUser },
});
const AppStack = createStackNavigator({
MainStack: { screen: MainStack, path: '' },
PetStack: { screen: PetStack }
});
const Main = createSwithNavigator({
App: { screen: AppStack, path: '' }
});
Basically this is my navigation structure. I've setted my AndroidManifest.xml
to the following:
<intent-filter android:label="filter_react_native">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="spidersecurity" android:host="terque" />
</intent-filter>
And, when I open a link with the address spidersecurity://terque/pets
this link open the app, but it does not navigate to the specified screen. I don't know if I'm doing something bad, but I've read a lot of pages and blogs with no success.
NOTE: I was verified if 'spidersecurity://terque/pets' is the route matching because I add a
console.log
to my code when getting the Linking
''
, Where I set the schema if I remove from Pets. Can you provide an example more explicit? – Archaism