2026-04-03-maplibra primary succsess
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
import FirebaseCore
|
||||
import GoogleMaps
|
||||
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
@@ -11,11 +10,7 @@ import GoogleMaps
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
|
||||
// --- 1. تهيئة خرائط جوجل ---
|
||||
// يتأكد من وجود ملف Config.plist ويقرأ المفتاح منه
|
||||
if let config = loadConfig(), let apiKey = config["APIKey"] as? String {
|
||||
GMSServices.provideAPIKey(apiKey)
|
||||
}
|
||||
|
||||
|
||||
// --- 2. تهيئة Firebase ---
|
||||
FirebaseApp.configure()
|
||||
@@ -87,13 +82,7 @@ import GoogleMaps
|
||||
}
|
||||
}
|
||||
|
||||
func loadConfig() -> [String: Any]? {
|
||||
guard let path = Bundle.main.path(forResource: "Config", ofType: "plist"),
|
||||
let config = NSDictionary(contentsOfFile: path) as? [String: Any] else {
|
||||
fatalError("Couldn't find Config.plist file. Please add it to your project.")
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// --- الامتدادات (Extensions) من الكود القديم ---
|
||||
|
||||
Reference in New Issue
Block a user