Deeplink fails, inconsistent cross-platform
See original GitHub issueOpening deep links across platform inconsistent, throws error on iOS.
Versions
Package version: botbuilder ^4.10.4, Nodejs version: 4.12.0 iOS version: 3.4.1 Build 3.4.77.2021042303/48 What os: iOS 3.4.1 Build 3.4.77.2021042303/48
Describe the bug
The deeplink experience across platforms is inconsistent and will terminate in an iOS error.
Only shows up on iOS when deeplinking. Error can be invoked from bot and tab.
To Reproduce
Steps to reproduce the behavior:
- Create deeplink with appId, entityId and data in Bot or Tab
- See bot and tab code examples below
- Observe error on iOS (see above)
- Observe that deeplinks will open tab extensions on all other devices, except iOS (see table)
Device | Deeplink works |
---|---|
Windows Desktop | Yes |
Mac Desktop | Yes |
Android Device | Yes |
iOS Device | No ** 👎 |
Expected behavior
Deep linking should work across platforms and devices, including iOS. This would help ensure the experience stays inside Teams. Additionally, it would make our application code cleaner.
Code to generate deep link in bot
// switch to your AppId and EntityID
const createDeepLink = (appId: string, entityId: string, data: string) => {
const context = `{"subEntityId": ${data}}`
return `https://teams.microsoft.com/l/entity/${appId}/${entityId}?context=${encodeURI(context)}`;
}
this.onMessage(async (context, next) => {
TurnContext.removeRecipientMention(context.activity);
if (context.activity.text) {
const link = createDeepLink("aedfa1bc-7ffc-48a1-9e46-bae559e541c6", "Tab", "myKey---myValue");
await context.sendActivity({
attachments: [CardFactory.heroCard(
"Deeplink iOS issue",
null,
CardFactory.actions([
{
type: "openUrl",
title: "Click deeplink to open in tab",
value: link
}
])
)]
});
}
await next();
});
Code to generate deep link in tab
// switch to your AppId and EntityID
const createDeepLink = (appId: string, entityId: string, data: string) => {
const context = `{"subEntityId": ${data}}`
return `https://teams.microsoft.com/l/entity/${appId}/${entityId}?context=${encodeURI(context)}`;
}
export const Repro = () => {
const link = createDeepLink("aedfa1bc-7ffc-48a1-9e46-bae559e541c6", "Tab", "myKey---myValue");
return (
<div>
<h2>Deeplink iOS issue for MSFT</h2>
<Button onClick={()=>{
microsoftTeams.executeDeepLink(link);
}}>Click this deeplink</Button>
</div>
)
};
export const Tab = () => {
return (<h2>Repro case landing page!</h2>)
};
Additional context
The iOS inconsistency has been brought to our attention by the Microsoft App submission team and internally in our own organization. However, I am unsure on what to do differently.
Is this just a temporary iOS inconsistency? Apologies, in advance if I may be logging this issue in the wrong place.
Since deep linking throws error on iOS, we have included special iOS conditional logic in our code. The workaround involves opening iOS deeplinks in the browser which strays from our intended design to keep the experience in Teams.
Any help would be appreciated.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Sorry notifications were not coming through. Yes all is fixed thank you. I noticed the iOS update mid June.
On Thu, Jul 29, 2021 at 10:58 AM Andrew Clear @.***> wrote:
@Meghana-MSFT @clearab Yep. Fix looks good. Noticed it mid June. Thank you!