Fix iOS OAuth deep link by preserving custom URL scheme in Info.plist#448
Fix iOS OAuth deep link by preserving custom URL scheme in Info.plist#448AnthonyRonning merged 1 commit intomasterfrom
Conversation
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>
Deploying maple with
|
| 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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR introduces iOS custom URL scheme support for cloud.opensecret.maple. A new build-time dependency (plist = 1) and build function Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
|
@TestFlight build |
|
🚀 TestFlight deployment triggered! Check the Actions tab for progress. |
|
✅ TestFlight deployment completed successfully! |
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-linkplugin'sbuild.rsoverwritesCFBundleURLTypesin the iOSInfo.plistduring every build. Since ourtauri.conf.jsonmobile config only hashttpsuniversal link entries (for payment/pricing paths), the plugin strips the manually-addedcloud.opensecret.maplecustom 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.rsthat runs aftertauri_build::build()(and after all plugin build scripts). It checks if thecloud.opensecret.maplescheme is present in the iOSInfo.plistand re-adds it if missing.Summary by CodeRabbit