2026-04-03-maplibra primary succsess

This commit is contained in:
Hamza-Ayed
2026-04-04 14:08:07 +03:00
parent e325405dff
commit 8d5fefc9e3
23 changed files with 2331 additions and 947 deletions

View File

@@ -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) من الكود القديم ---