Initialize and Authenticate
Add the Cloneable SDK to your app, initialize the SDK and authenticate
Initialize the SDK
Initialize the class with the following parameters:
import CloneablePlatformiOS
@main
struct Example_App: App {
// CloneablePlatform conforms to ObservableObject
@StateObject private var cloneable: CloneablePlatform = CloneablePlatform(authType: .api, apiKey: "YOUR_API_KEY")
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(cloneable) // Pass the SDK reference as an environment object
}
}
}Pass the SDK as an environment variable to child views
Authenticate
API based auth
Auth status
Last updated

