iOS "NSURLConnection finished with error - code -1022" 錯(cuò)誤解決
問題
在訪問高德地圖定位時(shí)返回error,返回錯(cuò)誤碼Code = -1022.
原因
這是因?yàn)閕OS9以后,需要APP的網(wǎng)絡(luò)協(xié)議里面都必須使用https協(xié)議!這與接口中的http不兼容
解決
在工程的plist文件中,新增一個(gè)屬性
1.字典 NSAppTransportSecurity
2.在NSAppTransportSecurity下添加NSAllowsArbitraryLoads類型Boolean,值設(shè)為YES

2、高德實(shí)時(shí)導(dǎo)航sdk異常日志
:-1: Undefined symbol: _OBJC_CLASS_$_AVAudioPlayer
:-1: Undefined symbol: _OBJC_CLASS_$_AVSpeechSynthesisVoice
:-1: Undefined symbol: _OBJC_CLASS_$_AVSpeechUtterance
完整錯(cuò)誤日志

解決方法
只需添加Foundation.framework和AVFoundation.framework框架,Build Phases=>Link Binaries With Libraries然后嘗試一下。