FitSDK is an iOS SDK that enables seamless integration of fitness wearable devices into your iOS applications. Connect and manage various fitness trackers with a simple, intuitive interface.
- 🏃♂️ Multi-Device Support: Connect to various fitness wearables and trackers
- 📱 Native iOS Integration: Built specifically for iOS with SwiftUI support
- 🔐 Secure Authentication: Robust authentication system for device connections
- 🎨 Modern UI: Beautiful interface with custom fonts and styling
- 🔗 Deep Linking: Handle external URL redirections seamlessly
- iOS 15.0+
- Xcode 14.0+
- Swift 5.0+
Add FitSDK to your project using Swift Package Manager:
- In Xcode, go to File > Add Package Dependencies
- Enter the repository URL
- Select the version you want to use
- Add the package to your target
Alternatively, add it to your Package.swift file:
dependencies: [
.package(url: "https://github.com/tata1mg/fitsdk-ios", from: "0.0.4")
]import FitSDK// Create configuration data
let fitData = FitSDKData(
authToken: "your-auth-token",
visitorId: "unique-visitor-id",
affiliateSource: "your-app-source",
referenceId: "optional-reference-id" // Optional
)
// Initialize the SDK
FitSDKManager.initialize(
with: navigationController,
delegate: self, // Optional: implement FitSDKHandlerDelegate
data: fitData
)extension MyViewController: FitSDKHandlerDelegate {
func fitSDKHandlerDidRequestOpen(_ url: URL) {
UIApplication.shared.open(url)
}
}The main entry point for the SDK.
initialize(with:delegate:data:)- Initializes the SDK with configuration data
Configuration structure containing:
authToken- Authentication token for API accessvisitorId- Unique identifier for the visitor/useraffiliateSource- Source identifier for trackingreferenceId- Optional reference identifier
Optional protocol for handling URL redirections when connecting to wearable devices.
public protocol FitSDKHandlerDelegate: AnyObject {
func fitSDKHandlerDidRequestOpen(_ url: URL)
}For support, questions, or feature requests:
- Create an issue on GitHub
This project is licensed under the MIT License - see the LICENSE file for details.