-[UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to instance 0x6c29000

來源:互聯網
上載者:User

-[UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to instance 0x6c29000

 BaiduMapDemo[716:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to instance 0x6c29000'

*** First throw call stack:
(0x15c1022 0x1b79cd6 0x15c2cbd 0x1527ed0 0x1527cb2 0xa747d 0x5fa4a 0x12508 0xee4b 0xefda 0x10b34 0x29c0 0x443386 0x444274 0x453183 0x453c38 0x447634 0x23f9ef5 0x1595195 0x14f9ff2 0x14f88da 0x14f7d84 0x14f7c9b
0x443c65 0x445626 0x28e8 0x2845)

terminate called throwing an exception(gdb) 

解決辦法:

(1)運行報  [UIDevice uniqueGlobalDeviceIdentifier]: unrecognized selector sent to此時需要 other linker  flags 添加 -all_load參數。
         具體:Project ->build settings ->linking->Other Linker flags

(2)請檢查有沒有添加QuartzCore.framework 和 CoreLocation.framework 可能因為缺少這兩個架構中的某一個架構造成的錯誤。

(3)BMKMapManager
強烈建議通過單例模式管理起來,並且不要手動調用其release方法。

(4)進行使用者位置定位時除了要設定showsUserLocation
= YES,還要在mapView:didUpdateUserLocation:方法中調用setCenterCoordinate:animated
         另外一定要在dealloc中,或者其他離開頁面的地方調用showsUserLocation= NO,否則會出現第二次push到定位頁面時,不會重新置放問題。
(5)必須至少讓一個類保持.mm檔案,或者按照官方修改編譯器類型。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.