由于CLClientCreateIso6709Notation
的原因,我无法找出崩溃的原因。
here,here,here和SO question中提到了这一点,但它们与此不同。
Crashlytics返回的堆栈跟踪是:
Crashed: com.apple.CoreLocation.ConnectionClient.0x156c4f1a0.events
0 CoreLocation 0x1896c4a20 CLClientCreateIso6709Notation + 51884
1 CoreLocation 0x1896c4cc8 CLClientCreateIso6709Notation + 52564
2 CoreLocation 0x1896c4c0c CLClientCreateIso6709Notation + 52376
3 CoreLocation 0x1896c7a10 CLClientCreateIso6709Notation + 64156
4 CoreLocation 0x1896c6ec4 CLClientCreateIso6709Notation + 61264
5 CoreLocation 0x1896c5a60 CLClientCreateIso6709Notation + 56044
6 libxpc.dylib 0x1825c8f68 _xpc_connection_call_event_handler + 68
7 libxpc.dylib 0x1825ccdf0 do_mach_notify_port_destroyed + 124
8 libxpc.dylib 0x1825ccd40 _Xmach_notify_port_destroyed + 80
9 libxpc.dylib 0x1825cccc4 notify_server + 100
10 libxpc.dylib 0x1825c6cd8 _xpc_connection_mach_event + 2076
11 libdispatch.dylib 0x18237d578 _dispatch_client_callout4 + 16
12 libdispatch.dylib 0x182381864 _dispatch_mach_msg_invoke + 656
13 libdispatch.dylib 0x182389694 _dispatch_queue_drain + 1332
14 libdispatch.dylib 0x182380978 _dispatch_mach_invoke + 600
15 libdispatch.dylib 0x182389694 _dispatch_queue_drain + 1332
16 libdispatch.dylib 0x182380f80 _dispatch_queue_invoke + 464
17 libdispatch.dylib 0x182389694 _dispatch_queue_drain + 1332
18 libdispatch.dylib 0x182380f80 _dispatch_queue_invoke + 464
19 libdispatch.dylib 0x18238b390 _dispatch_root_queue_drain + 728
20 libdispatch.dylib 0x18238b0b0 _dispatch_worker_thread3 + 112
21 libsystem_pthread.dylib 0x182595470 _pthread_wqthread + 1092
22 libsystem_pthread.dylib 0x182595020 start_wqthread + 4
zombie乐器没有显示我的设备有任何问题。我正在使用iphone 5s,崩溃似乎发生在iphone 6上。
我不知道这是苹果OS / googlemaps的问题。
这是我初始化我的位置管理器类的方法:
@property (strong,nonatomic) CLLocationManager *locationManager;
-(id)init {
if ( self = [super init] ) {
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
self.locationManager.distanceFilter = 1;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
self.buildings = [[NSMutableArray alloc] init];
}
return self;
}
+ (id)sharedInstance {
static LocationMonitor *sharedMyManager = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedMyManager = [[self alloc] init];
});
return sharedMyManager;
}
- (void)requestAuthorization {
if ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
[self.locationManager requestAlwaysAuthorization];
}
}
并在我的Vc viewDidLoad中:
[[LocationMonitor sharedInstance] requestAuthorization];
在我的plist中我有NSLocationAlwaysUsageDescription
但不是NSLocationWhenInUseUsageDescription
有什么想法吗?