Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,14 @@ This guide explains how to handle Universal Links in iOS applications using the

### SwiftUI Project

For SwiftUI apps, use the `onOpenURL` modifier at the entry point of your app to process incoming URLs and navigate to the appropriate views. Below is an example implementation in SwiftUI.
For SwiftUI apps, use the `onOpenURL` modifier at the entry point of your app to process incoming URLs and retrieve the original URL.
Copy link
Preview

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

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

The description is incomplete. It mentions retrieving the original URL but doesn't explain what happens after retrieval (e.g., navigation to appropriate views). Consider adding 'and navigate to the appropriate views' to maintain completeness.

Suggested change
For SwiftUI apps, use the `onOpenURL` modifier at the entry point of your app to process incoming URLs and retrieve the original URL.
For SwiftUI apps, use the `onOpenURL` modifier at the entry point of your app to process incoming URLs, retrieve the original URL, and navigate to the appropriate view based on the URL.

Copilot uses AI. Check for mistakes.

The SDK parses the link and provides:

* host → The domain of the short link.

* path → The path component of the link.

* url → The original URL that the short link points to.

```swift
import SwiftUI
Expand All @@ -277,7 +284,11 @@ struct YourApp: App {
switch result {
case .success(let result):
// Handle successful URL processing
print("result", result, "Host: \(result.host), Path: \(result.path)", "QueryParams: \(result.queryItems)")
print(
"Original URL: \(result.url)",
"Host: \(result.host), Path: \(result.path)",
"QueryParams: \(result.queryItems)"
)
case .failure(let error):
// Handle error with proper error type
print("Error: \(error.localizedDescription)")
Expand All @@ -293,7 +304,16 @@ struct YourApp: App {

### Storyboard Project

For Storyboard apps, implement the `scene(_:continue:)` method in your `SceneDelegate` to handle Universal Links. Below is an example implementation in Storyboard.
For Storyboard-based apps, you can handle incoming Short.io links (Universal Links) in your SceneDelegate. Implement the scene(_:continue:) method to capture the URL and pass it to the SDK for processing.
Copy link
Preview

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

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

The method name formatting is inconsistent. Use backticks around scene(_:continue:) to match the formatting style used elsewhere in the documentation.

Suggested change
For Storyboard-based apps, you can handle incoming Short.io links (Universal Links) in your SceneDelegate. Implement the scene(_:continue:) method to capture the URL and pass it to the SDK for processing.
For Storyboard-based apps, you can handle incoming Short.io links (Universal Links) in your SceneDelegate. Implement the `scene(_:continue:)` method to capture the URL and pass it to the SDK for processing.

Copilot uses AI. Check for mistakes.

The SDK parses the link and provides:

* host → The domain of the short link.

* path → The path component of the link.

* url → The original URL that the short link points to.

Below is an example implementation in Storyboard.

```swift
import UIKit
Expand All @@ -313,7 +333,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
switch result {
case .success(let result):
// Handle successful URL processing
print("result", result, "Host: \(result.host), Path: \(result.path)", "QueryParams: \(result.queryItems)")
print(
"Original URL: \(result.url)",
"Host: \(result.host), Path: \(result.path)",
"QueryParams: \(result.queryItems)"
)
case .failure(let error):
// Handle error with proper error type
print("Error: \(error.localizedDescription)")
Expand Down