我有一个使用CoreLocation的iPhone应用程序。
在首次安装应用程序时,会显示iPhone系统消息,询问用户是否希望允许位置服务。如果他们单击“是”,我的应用程序会突然显示我的应用程序的第一个屏幕(我正在使用导航控制器),并崩溃。这是我在日志中看到的-
warning: UUID mismatch detected with the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephony
=uuid-mismatch-with-loaded-file,file="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephony"
Program received signal: âEXC_BAD_ACCESSâ.
堆栈跟踪如下所示
CLLocationManager *clLocationManager = [[CLLocationManager alloc] init];
clLocationManager.delegate = self;
if (clLocationManager.locationServicesEnabled) {
[clLocationManager startUpdatingLocation];
} else {
self.searchBar.placeholder = @"Enter location";
}
知道我做错了什么吗?