A powerful, flexible, and production-ready deep linking library for iOS.
SmartDeeplinkKit
helps your app handle universal links, push notifications, custom URL schemes, and dynamically parsed paths — with support for runtime navigation registration, logging, analytics hooks, and testability.
- ✅ Handles deep links from:
- Universal links (e.g.
https://example.com/profile/123
) - Push notifications (with custom payload)
- Custom schemes (e.g.
myapp://settings
)
- Universal links (e.g.
- ✅ Dynamic path-based routing (
/profile/123
,/settings
) - ✅ Optional analytics hook and debug logging
- ✅ Supports runtime navigation logic
- ✅ Fully testable with
XCTest
- ✅ Minimal, lightweight, and Swift Package compatible
https://github.com/user-attachments/assets/56eb5467-8cf6-4a44-a7ba-ab3a0b5a7b50
CocoaPods
pod 'SmartDeeplinkKit'
dependencies: [
.package(url: "https://github.com/yourusername/SmartDeeplinkKit.git", from: "1.0.0")
]
Or use Xcode:
- File → Add Packages →
Enter:https://github.com/yourusername/SmartDeeplinkKit.git
import SwiftUI
import SmartDeeplinkKit
class NavigationCoordinator: ObservableObject, DeepLinkNavigating {
@Published var path = [String]()
nonisolated func navigate(to deepLink: DeepLink) {
print("📦 Navigating to:", deepLink.path)
let components = deepLink.path.components(separatedBy: "/")
DispatchQueue.main.async {
switch components.first {
case "profile":
if components.count > 1 {
let userID = components[1]
self.path.append("profile/\(userID)")
} else {
self.path.append("profile")
}
case "settings":
self.path.append("settings")
default:
print("❌ Unhandled path:", deepLink.path)
}
}
}
}
let manager = DeepLinkManager.shared
manager.setNavigator(yourCoordinatorInstance)
manager.setLogging(enabled: true)
manager.setAnalyticsHandler { deepLink in
print("📊 Tracked:", deepLink)
}
manager.handleURL(URL(string: "https://example.com/profile/123")!)
manager.handleNotificationPayload(["deep_link": "/settings"])
https://example.com/profile/123?ref=ios
Will result in:
DeepLink(
path: "profile/123",
parameters: ["ref": "ios"]
)
- iOS 13+
- Swift 5.5+
Sources/
└── SmartDeeplinkKit/
├── DeepLink.swift
├── DeepLinkManager.swift
├── DeepLinkParser.swift
├── DeepLinkNavigating.swift
└── Extensions/
└── URLExtension.swift
Tests/
└── SmartDeeplinkKitTests/
└── DeepLinkParserTests.swift
App Type Works with SmartDeeplinkKit? How? Pure Swift (UIKit or SwiftUI) ✅ Fully Supported Direct usage Mixed (Swift + Objective-C) ✅ Use in Swift layer Swift handles deep link & calls Obj-C Pure Objective-C ❌ Not directly Needs custom bridging or wrapper
SmartDeeplinkKit is available under the MIT license.
See the LICENSE file for more info.
Made with ❤️ by Rjiosdev(https://github.com/rjiosdev)