<BlockSwitcher>
<Block name="SwiftUI">

In your `App` scene, configure Amplify in the initializer:

```swift
@main
struct MyAmplifyApp: App {

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }

    init() {
        do {
            let datastoreConfiguration = DataStoreConfiguration.custom(authModeStrategy: .multiAuth)
            let dataStorePlugin = AWSDataStorePlugin(
                modelRegistration: AmplifyModels(),
                configuration: datastoreConfiguration
            )
            try Amplify.add(plugin: dataStorePlugin)
            try Amplify.configure()
            print("Amplify configured with DataStore plugin")
        } catch {
            print("Failed to initialize Amplify with \(error)")
        }
    }
}
```
</Block>
<Block name="UIKit">

Add to your AppDelegate's `application:didFinishLaunchingWithOptions` method

```swift
func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {

    do {
        let datastoreConfiguration = DataStoreConfiguration.custom(authModeStrategy: .multiAuth)
        let dataStorePlugin = AWSDataStorePlugin(
            modelRegistration: AmplifyModels(),
            configuration: datastoreConfiguration
        )
        try Amplify.configure()
        print("Amplify configured with DataStore plugin")
    } catch {
        print("Failed to initialize Amplify with \(error)")
        return false
    }

    return true
}
```
</Block>
</BlockSwitcher>
