Use Deep Link, occur error
zhaoyiming0803 opened this issue · 0 comments
zhaoyiming0803 commented
I'm using Deep link refer to doc: https://reactnavigation.org/docs/deep-linking#setup-with-expo-projects.
- Install dependencies:
{
"dependencies": {
"expo": "^49.0.13",
"expo-linking": "~5.0.2"
}
}- Configure my app.json
{
"name": "ReactNativeDemo",
"displayName": "ReactNativeDemo",
"expo": {
"scheme": "mychat"
}
}- import and use Deep Link
import * as Linking from 'expo-linking'
// the following code caused an error to occur
const prefix = Linking.createURL('/')
function App() {
const linking = {
prefixes: [prefix]
}
return (
<NavigationContainer linking={linking} fallback={<Text>Loading...</Text>}>
{/* content */}
</NavigationContainer>
)
}- error message in my ternimal, but compiler is successfull, error occur only running app in ios simulator
Error: expo-linking needs access to the expo-constants manifest (app.json or app.config.js) to determine what URI scheme to use. Setup the manifest and rebuild: https://github.com/expo/expo/blob/main/packages/expo-constants/README.md, js engine: hermesHow should I solve this error???