1.cocoapods集成Google Map SDK
platform :ios, '8.1'
use_frameworks!
target 'GoogleMapTest' do
pod 'GoogleMaps'
end
2.plist文件配置
1>LSApplicationQueriesSchemes array
item1 googlechromes
item2 comgooglemaps
2>App Transport Security Settings
Allow Arbitrary Loads YES
3>Privacy - Location Always Usage Description
4>Privacy - Location When In Use Usage Description
3.代码
import UIKit
import GoogleMaps
import CoreLocation
class WeizhiViewController: UIViewController,CLLocationManagerDelegate {
let locationManager = CLLocationManager()
var currentLocation:CLLocation!
var lock = NSLock()
override func viewDidLoad() {