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

-[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文件,或者按照官方修改编译器类型。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值