【发布时间】:2013-07-19 09:59:06
【问题描述】:
PO(self);
PO(_locationManager.delegate);
PO([CLLocationHandler singleton]);
_locationManager = [[CLLocationManager alloc] init];
_locationManager.delegate = self;
PO(self);
PO(_locationManager.delegate);
NSAssert(_locationManager.delegate==self,@"They are meant for each other");
所以这段代码可以在模拟器和大多数 iPhone 上运行。我的商业伙伴有一部神奇的 iPhone,我无法用它来调试程序。
如果我直接运行已安装的程序,代码将产生:
��
<Warning>: *** -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL
<Warning>: self: <CLLocationHandler: 0x1f8df560>
<Warning>: _locationManager.delegate: (null) <Warning>: [CLLocationHandler singleton]: <CLLocationHandler: 0x1f8df560>
<Warning>: self: <CLLocationHandler: 0x1f8df560>
<Warning>: _locationManager.delegate: <RwXSxTb_DelegateProxy: 0x1e594d00>
<Warning>: *** Assertion failure in -[CLLocationHandler additionalInitialization], /business/Dropbox/badgers/BadgerNew/CLLocationHandler.m:251
<Error>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'They are meant for each other'
delegateProxy 到底是什么?
【问题讨论】:
-
他的 iPhone 有什么特别的吗?比如是不是越狱了。
-
我推荐一个干净的构建。
标签: objective-c ios6