Skip to content

fix: iOS deep link + Android prod package for task sharing - #4760

Merged
beastoin merged 1 commit into
mainfrom
fix/ios-deep-link
Feb 12, 2026
Merged

beastoin merged 1 commit into
mainfrom
fix/ios-deep-link

Conversation

@beastoin

@beastoin beastoin commented Feb 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two bugs preventing "Open in Omi" from working on the task share page:

  1. iOS (web): Universal Links don't trigger for same-domain navigation — user is already on h.omi.me so tapping https://h.omi.me/tasks/{token} just reloads the page. Fixed by using omi:// custom URL scheme.

  2. Android (web): Intent URL had package=com.friend.ios.dev (dev flavor) instead of com.friend.ios (production).

  3. App (Flutter): omi://tasks/{token} parses "tasks" as uri.host (not uri.pathSegments), so the existing routing check pathSegments.first == 'tasks' never matches. Added uri.host == 'tasks' handler matching the pattern used by other omi:// callbacks (todoist, asana, etc).

Files changed

File Fix
web/frontend/src/app/tasks/[token]/page.tsx iOS: https:// → omi://, Android: fix prod package name
app/lib/core/app_shell.dart Add uri.host == 'tasks' handler for omi:// scheme

Test plan

  • iOS: open share page in Safari → tap "Open in Omi" → app opens → AcceptSharedTasksSheet appears
  • Android: same flow in Chrome
  • Verify existing deep links still work (apps, wrapped, unlimited, OAuth callbacks)

🤖 Generated with Claude Code

iOS: Universal Links don't trigger for same-domain navigation (user is
already on h.omi.me). Switch to omi:// custom URL scheme which opens
the app directly.

Android: Fix intent package from com.friend.ios.dev (dev flavor) to
com.friend.ios (production).

Co-Authored-By: Claude Opus 4.6 <[email protected]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses critical deep linking issues for both iOS and Android platforms, ensuring the app opens as intended by updating the Android package name and using a custom URL scheme (omi://) for iOS. However, a high-severity Intent Injection vulnerability was identified in the Android link generation logic: the token parameter must be URL-encoded before being interpolated into the intent:// URL to prevent attackers from manipulating Intent parameters. The iOS custom scheme implementation and other metadata updates appear secure.

Comment on lines +70 to 72
? `intent://h.omi.me/tasks/${token}#Intent;scheme=https;package=com.friend.ios;S.browser_fallback_url=${encodeURIComponent(
'https://play.google.com/store/apps/details?id=com.friend.ios',
)};end`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

While the update to the Android package name (com.friend.ios) is correct for production deep links, the token parameter is directly interpolated into the Android Intent URL without URL encoding. This creates a high-severity Intent Injection vulnerability. An attacker can provide a token containing a # character to inject arbitrary Intent parameters like package, action, or component, potentially leading to unintended actions or redirection to malicious applications. Ensure the token is URL-encoded to prevent this.

Suggested change
? `intent://h.omi.me/tasks/${token}#Intent;scheme=https;package=com.friend.ios;S.browser_fallback_url=${encodeURIComponent(
'https://play.google.com/store/apps/details?id=com.friend.ios',
)};end`
? `intent://h.omi.me/tasks/${encodeURIComponent(token)}#Intent;scheme=https;package=com.friend.ios;S.browser_fallback_url=${encodeURIComponent(
'https://play.google.com/store/apps/details?id=com.friend.ios'
)};end`

@beastoin beastoin left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@beastoin
beastoin merged commit c27c016 into main Feb 12, 2026
2 of 3 checks passed
@beastoin
beastoin deleted the fix/ios-deep-link branch February 12, 2026 06:52
@beastoin beastoin mentioned this pull request Feb 12, 2026
3 tasks done
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

Successfully merging this pull request may close these issues.

1 participant