Files
suixinkan_ios_uikit/suixinkan_ios/App/AMapBootstrap.swift
2026-06-26 14:33:31 +08:00

37 lines
1.0 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// AMapBootstrap.swift
// suixinkan
//
// SDK AMAP_ENABLED AMap
//
import Foundation
#if AMAP_ENABLED
import AMapFoundationKit
import AMapLocationKit
import AMapSearchKit
import MAMapKit
enum AMapBootstrap {
/// App `apiKey` Key
static func configure(apiKey: String) {
guard !apiKey.isEmpty else { return }
AMapServices.shared().apiKey = apiKey
AMapServices.shared().enableHTTPS = true
AMapSearchAPI.updatePrivacyShow(.didShow, privacyInfo: .didContain)
AMapSearchAPI.updatePrivacyAgree(.didAgree)
MAMapView.updatePrivacyShow(.didShow, privacyInfo: .didContain)
MAMapView.updatePrivacyAgree(.didAgree)
AMapLocationManager.updatePrivacyShow(.didShow, privacyInfo: .didContain)
AMapLocationManager.updatePrivacyAgree(.didAgree)
}
}
#else
enum AMapBootstrap {
static func configure(apiKey: String) {}
}
#endif