What is the proper url format when linking back to your app from a WebBrowser? I have set up my scheme in exp.json myappname:// but when I redirect back to my app (with Constants.linkinguri) I get an error:
“There was a problem loading the experience”.
when setting my redirect url to my published app url myappname://exp.host/username/appname the app renders another version of the app within itself.
and Constants.linkingUri returns: projectCharlotte://
And for reference here’s my code block that builds that redirect url (copied from auth0 example)
let redirectUri;
console.log(Constants.manifest);
if (Constants.manifest.xde) {
redirectUri = 'exp358622080df04874ac8f685547ec093b://6g-ss9.awoodall.project-charlotte.exp.direct/+/redirect';
} else {
redirectUri=`${Constants.linkingUri}/redirect`;
// redirectUri = `projectCharlotte://exp.host/@awoodall/projectCharlotte/+/redirect`;
}
What’s interesting is if I pass in the published exp link the app opens another instance within itself. So I still get the black bar at the top that says “Back to project Charlotte” but no error.
**edit: the redirectUri in the example is from my ExpoKit version of the project. I’ve tried with both attached and detached with the same results as above.
The issue appears in both detached and standalone. Below is a video of the Standalone app (the above video was the detached app). Both are having similar issues but different error messages:
which sdk version are you using @awoodall? (“sdkVersion” in exp.json)
based on what I see in the error message and the code that you provided above, it looks like Constants.linkingUri is not defined. it tries to redirect to exp:///redirect, which is consistent with ${Constants.linkingUri}/redirect where Constants.linkingUri is an empty string. how are you verifying that the redirectUri is what you expect it to be?
Hello @awoodall, I will try to replicate your issue and get back to you as soon as possible. In the meantime, can you tell me it works properly when running while developing in Expo? You did confirm it was working while published on Expo correct?
Hello @awoodall, just wanted to drop by and let you know I am still working on the issue, I could reproduce and I am looking in the SDK. I will update you during the week, and feel free to PM me on the Expo Slack channel if you feel like discussing a little more!
I’ve found a bug where Constants.linkingUri is incorrect specifically when attaching to a debug ExpoKit build from Xcode. This is probably leading to this issue. I’ll work on a fix for the next release.