2011-04-21 48 views
0

我是iphone的新手。位置经理问题

当我处理的外景经理,我得到的第一个消息来访问我的位置

允许,如果我按允许然后正常工作不允许。

可是我压不那么允许它给了我,我有下面显示的警告:

Function,"void CLClientHandleDaemonDataRegistration(__CLClient*, mach_port_t, const CLDaemonCommToClientRegistration*, const __CFDictionary*)",server did not accept client registration 1 

任何一个可以拥有该

解决方案感谢名单提前......

+0

对我来说好像它的工作方式就像定义一样。必须允许访问,这是好的,或者我误解了你的问题? – Kay 2011-04-21 07:31:11

回答

1

没有解决方案,如果用户不允许您的应用使用位置服务,则无法执行该位置服务。 你可以检查你是否可以使用位置服务:

BOOL result = [CLLocationManager locationServicesEnabled]; 

if (result) { 
    dbgPrint(@"Location services enabeld"); 
} else { 
    dbgPrint(@"Location services disabeld"); 
} 
+0

我们如何避免在控制台屏幕上显示警告消息。 – SJS 2011-04-21 08:35:49

+0

在创建CLLocationManager的实例之前,您应该检查[CLLocationManager locationServicesEnabled]是否返回true。 – rckoenes 2011-04-21 08:37:34