I initialized the API using the following methodology
https://www.docs.developers.amplitude.com/data/sdks/ios/#install
I connect API_KEY through Environment.
import UIKit<br />import Amplitude<br /><br />class AppDelegate: NSObject, UIApplicationDelegate {<br /><br /> func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]?) -> Bool {<br /> // Enable sending automatic session events<br /> Amplitude.instance().trackingSessionEvents = true<br /> // Initialize SDK<br /> Amplitude.instance().initializeApiKey("API_KEY")<br /> // Set userId<br /> Amplitude.instance().setUserId("userId")<br /> // Log an event<br /> Amplitude.instance().setServerZone(AMPServerZone.EU)<br /> return true<br /> }<br />}
import Amplitude<br /><br />@main<br />struct easylearnApp: App {<br /><br /> let store: IAPStore<br /> var locale = LocalizationManager()<br /><br /> @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate<br /> @StateObject private var firebaseController = FirebaseController()<br /><br />........<br /><br />}

I get an error when I run the application:
ERROR: Connection response received:400, invalid_api_key
The key is correct.
What can I do about it?
Thank you in advance for your answers.
Max