Skip to content

Fix iOS OAuth deep link by preserving custom URL scheme in Info.plist#448

Merged
AnthonyRonning merged 1 commit intomasterfrom
fix/ios-url-scheme-build
Feb 26, 2026
Merged

Fix iOS OAuth deep link by preserving custom URL scheme in Info.plist#448
AnthonyRonning merged 1 commit intomasterfrom
fix/ios-url-scheme-build

Conversation

@AnthonyRonning
Copy link
Contributor

@AnthonyRonning AnthonyRonning commented Feb 26, 2026

Problem

iOS OAuth login (GitHub/Google) is broken. After authenticating in Safari, the redirect back to the app via cloud.opensecret.maple://auth?... fails with "Safari cannot open the page because the address is invalid."

Root Cause

The tauri-plugin-deep-link plugin's build.rs overwrites CFBundleURLTypes in the iOS Info.plist during every build. Since our tauri.conf.json mobile config only has https universal link entries (for payment/pricing paths), the plugin strips the manually-added cloud.opensecret.maple custom URL scheme from Info.plist.

The simulator worked because it had a cached URL scheme registration from previous local builds. TestFlight/CI builds always ran the full Tauri build pipeline which triggered the stripping.

Fix

Added a post-build step in build.rs that runs after tauri_build::build() (and after all plugin build scripts). It checks if the cloud.opensecret.maple scheme is present in the iOS Info.plist and re-adds it if missing.


Open with Devin

Summary by CodeRabbit

  • Chores
    • Improved iOS build configuration to ensure proper URL scheme setup during the build process.

The tauri-plugin-deep-link build.rs overwrites CFBundleURLTypes during
iOS builds based on the mobile config. Since our mobile config only has
https universal link entries, the plugin strips the cloud.opensecret.maple
custom URL scheme from Info.plist, breaking OAuth redirect back to the app.

Add a post-build step that re-adds the custom URL scheme if missing.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: 951f1e9
Status: ✅  Deploy successful!
Preview URL: https://42c08684.maple-ca8.pages.dev
Branch Preview URL: https://fix-ios-url-scheme-build.maple-ca8.pages.dev

View logs

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2af8046 and 951f1e9.

⛔ Files ignored due to path filters (1)
  • frontend/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • frontend/src-tauri/Cargo.toml
  • frontend/src-tauri/build.rs

📝 Walkthrough

Walkthrough

This PR introduces iOS custom URL scheme support for cloud.opensecret.maple. A new build-time dependency (plist = 1) and build function ensure_ios_custom_url_scheme() are added. The function reads the iOS Info.plist, checks for the custom scheme entry, injects it if missing, and integrates into the iOS build process.

Changes

Cohort / File(s) Summary
Build Dependencies
frontend/src-tauri/Cargo.toml
Added plist = "1" as a build-time dependency to enable plist file parsing and modification.
Build Script Enhancement
frontend/src-tauri/build.rs
Added ensure_ios_custom_url_scheme() function that reads the iOS Info.plist, checks for CFBundleURLTypes entry with scheme "cloud.opensecret.maple", injects it if absent, and writes back the file. Function is called in main() after tauri_build::build() on iOS targets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Through plist files I hop and weave,
Custom schemes we'll now retrieve,
Build-time magic, swift and true,
Cloud scheme paths in iOS too,
Deep links now will see us through! 🔗✨

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main fix: preserving a custom URL scheme in iOS Info.plist to resolve OAuth deep linking issues, which directly aligns with the primary changes in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ios-url-scheme-build

Comment @coderabbitai help to get the list of available commands and usage tips.

@AnthonyRonning
Copy link
Contributor Author

@TestFlight build

@github-actions
Copy link
Contributor

🚀 TestFlight deployment triggered! Check the Actions tab for progress.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@github-actions
Copy link
Contributor

✅ TestFlight deployment completed successfully!

@AnthonyRonning AnthonyRonning merged commit d305190 into master Feb 26, 2026
13 checks passed
@AnthonyRonning AnthonyRonning deleted the fix/ios-url-scheme-build branch February 26, 2026 04:15
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