-
-
Notifications
You must be signed in to change notification settings - Fork 9
getting a "this screen doesn't exist" with expo router #14
Comments
👋 To use Here an example for export default function Unmatched() {
const pathname = usePathname();
const router = useRouter();
const { shareIntent, resetShareIntent } = useShareIntent();
return (
<View style={styles.container}>
<Text style={styles.gap}>Screen could not be found : {pathname}</Text>
<Text style={styles.gap}>{JSON.stringify(shareIntent)}</Text>
<Text
onPress={() => {
if (router.canGoBack()) {
router.back();
} else {
router.replace("/");
}
}}
>
Go back.
</Text>
</View>
);
} You can also get the shareintent data from here and navigate to a specific screen with parameters to split the code. if (pathname?.includes(`dataurl=${Constants.expoConfig.scheme}sharekey`) && shareIntent) {
router.replace({ pathname: 'shareintent', params: { shareIntent } })
} let me know if you managed to get it to work, I will update the documentation afterwards |
ahhh awesome thank you for the detailed explanation I'm very new to expo and expo router, so this is perfect info. Will try this out and let you know how it goes! Btw did you figure out a way to test this in development? I notice that the default expo dev flow uses Expo Go in the simulator and so there's no share intent for the app there. What's the recommended way for testing this or do I have to actually build it and transfer it to my device each time? |
We are using native code to make share intent works, so we can't use Expo Go and have to use a custom dev client, that's why the demo use That way you can test your share intent into simulator, but that does not exempt you to test a complete build on device at the end of your development process to make sure all works as excepted :) |
working example with expo router is now available on branch expo49-expo-router, enjoy ! |
btw is there a better way to remove the auto-generated
that gets adds to "eas" in |
as mention you just have to add your projectId in app.json
ok I'm going to test it in more depth on my side |
@spencerc99 i finally found a fix for this fee330a. So
|
@achorein amazing!! i will check this out tonight. I also realized there's an interface distinction between the share intent triggering the opening of the app with the data and apps opening a pop-up screen to handle the share in-context. Do you know if that's supported with the react-native-share-intent library you are using / if there's a different solution for that? |
as mentioned in #15 this project does not support custom view for ios, all the share intent must be handle into the app. I close the issue, I think we have covered the subject of expo-router. feel free to re-open if problem persist. |
hi there! thanks so much for making this demo
I got as far as getting it onto my iOS device using your
useShareIntent
hook, and my app successfully shows up in the share sheet! But when I send something to the app, I'm getting a "this screen doesn't exist." I wonder if it's due to using Expo Router? Would love any ideas!The text was updated successfully, but these errors were encountered: