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에서 작동합니다. 저의 biz 파트너는 프로그램을 디버그 할 수없는 하나의 마법의 iPhone이 있습니다. 내가 설치된 프로그램을 실행하면이 간단한 코드가 어떻게 어설 션에 실패 할 수 있습니까?
직접 코드는이를 얻을 것입니다 : delegateProxy 도대체 무엇
<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'
입니까?
그의 iPhone과 관련된 구체적인 내용이 있습니까? 예를 들어 jailbroken입니까? –
깨끗한 빌드를 권장합니다. – Sulthan