Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Deep Link, occur error #1276

Open
zhaoyiming0803 opened this issue Sep 28, 2023 · 0 comments
Open

Use Deep Link, occur error #1276

zhaoyiming0803 opened this issue Sep 28, 2023 · 0 comments

Comments

@zhaoyiming0803
Copy link

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: hermes

How should I solve this error???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant