Files
supabase/supa-mdx-lint
Guilherme Souza a18ee934cd docs(auth): handle incoming deep link URLs on Swift (#48774)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Docs update.

## What is the current behavior?

The Swift tab in the [Native Mobile Deep Linking
guide](https://supabase.com/docs/guides/auth/native-mobile-deep-linking?platform=swift)
only covers registering a custom URL scheme (Info.plist config). Unlike
the React Native, Flutter, and Kotlin tabs, it never shows the runtime
code that actually consumes the incoming URL and completes the sign-in,
so a Swift developer following the guide is left without a working
implementation.

Linear:
[SDK-83](https://linear.app/supabase/issue/SDK-83/swift-improve-docs-on-how-to-handle-deep-link-url)

## What is the new behavior?

Added a "Handling the incoming URL" section to the Swift tab with:
- SwiftUI: `onOpenURL` calling `supabase.auth.handle(url)`
- UIKit app delegate lifecycle:
`application(_:didFinishLaunchingWithOptions:)` and
`application(_:open:options:)`
- UIKit scene delegate lifecycle: `scene(_:openURLContexts:)`
- A note pointing to `session(from:)` for callers that need the returned
`Session` or custom error handling

`handle(url)` and its usage patterns match the current `supabase-swift`
reference spec (`supabase_swift_v2.yml`) and source.

Also added `UIKit` to the docs spelling allowlist
(`supa-mdx-lint/Rule003Spelling.toml`) since it isn't in the dictionary.

## Additional context

`pnpm lint:mdx` passes on the changed file. `pnpm build:guides-markdown`
fails, but on a pre-existing unrelated issue (missing generated
`database-advisors.json`), not on this change.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Added Swift guidance for handling authentication deep links in SwiftUI
and UIKit apps.
* Documented deep-link behavior during cold launches and scene-based URL
delivery.
* Clarified when to use `handle(_:)` and `session(from:)`, including
error-handling considerations.
* Updated the SwiftUI tutorial to pass authentication URLs directly to
the recommended handler.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-06 08:37:47 +00:00
..