整合百度地圖時,先加入 BaiduMapAPI 框架,並補上 CoreLocation、QuartzCore、OpenGLES、SystemConfiguration、CoreGraphics、Security 等系統庫。
接著在 Build Settings 的 Other Linker Flags 加入 -ObjC,並匯入 mapapi.bundle 資源檔。若缺少此資源,地圖可能無法正常顯示。
使用相關類別時需引入對應標頭檔,並在 Info.plist 加入定位用途描述,例如 NSLocationWhenInUseUsageDescription 或 NSLocationAlwaysUsageDescription。若未加入定位描述,定位功能可能失敗。