Go to the dashboard to configure your Android and iOS app with Branch. And then create links by following the steps on the branch docs (https://docs.branch.io/links/integrate/). The branch has two environments. You can work “Live” and “Test
With EAS Build it should be possible, in theory. I have never used Branch myself, so not sure exactly what’s entailed normally or with NativeLink. If you can list the specific things that would need to be done to a plain React Native project to integrate NativeLink support then someone should be able to say what would be required of a Config Plugin to do the same in a managed Expo app that can then be built with EAS Build. (There’s a misconception that EAS Build is only available if you pay for the Expo Priority Plan. That is the easiest way to use it, but you can also use eas build --local to build locally on your own machine, in which case you don’t need to pay Expo.)
Also, it might be worth contacting Branch and pointing to the Config Plugin docs in case they’re willing to write one so that their users can use it in a managed Expo app without having to write their own plugin.
How can I see what react-native-branch version will be coupled with the SDK 43 release coming up? It seems that the fix was released in July/August so that version probably didn’t make it in the SDK 42 release.
One of the Expo team members (or maybe an interested user) would most likely have to update the config plugin to do the extra things needed to support NativeLink.
I’m not sure just bumping the version number is enough. I think it also requires at least the addition of permission to read the clip board or something like that.
It might be worth talking to one of these companies if you’re looking for help with getting this implemented:
Do you not think the ticket I added will be addressed by the SDK 44 release or is this something that is low priority?
This issue will make the expo-branch library broken for 25% of smartphone users in the coming months. It also might bring a significant amount of related, hard to debug tickets, into triage I suspect.
Good point. OK, maybe bumping the version will be enough. I’m not sure, though. Isn’t there extra stuff the Branch docs say you need to do for NativeLink support?
I do not have any inside knowledge of what Expo is planning. I don’t work for Expo
EDIT: I don’t work for an Expo consulting company either.
Just FYI, I was able to solve this by implementing my own version of NativeLink (I catch the token on the landing page button press which launches Branch and put the token on the clipboard) and then check when the user hits the first screen of the app.
On your app’s landing page, add this script in and fire it on the onpress event when they are supposed to go to the app store.
<script>
// https://stackoverflow.com/a/33928558/7180620
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
// Internet Explorer-specific code path to prevent textarea being shown while dialog is visible.
return window.clipboardData.setData("Text", text);
}
else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
textarea.style.position = "fixed"; // Prevent scrolling to bottom of page in Microsoft Edge.
document.body.appendChild(textarea);
textarea.select();
try {
return document.execCommand("copy"); // Security exception may be thrown by some browsers.
}
catch (ex) {
console.warn("Copy to clipboard failed.", ex);
return false;
}
finally {
document.body.removeChild(textarea);
}
}
}
</script>
Then in your app you just read the token from the clipboard when they hit the first screen of the app (or whatever the logic should be).