Cllocationmanager Didupdatelocation委托没有互联网就被调用

时间:2015-04-23 11:18:46

标签: ios objective-c cllocationmanager

我目前正在开发基于位置的ios应用程序。我使用---TRANSACTION 75459395, ACTIVE (PREPARED) 362 sec mysql tables in use 1, locked 1 4 lock struct(s), heap size 1184, 4 row lock(s), undo log entries 2 MySQL thread id 1077860, OS thread handle 0x7fcd388d1700, query id 10200793 xen xx.xx.xx.xx yyy query end REPLACE iplock SET ip = 'xx.xx.xx.xx', count = '1', lut = '1430055393' Trx #rec lock waits 0 #table lock waits 0 Trx total rec lock wait time 0 SEC Trx total table lock wait time 0 SEC TABLE LOCK table `main`.`iplock` trx id 75459395 lock mode IX lock hold time 362 wait time before grant 0 RECORD LOCKS space id 677 page no 9 n bits 744 index `ip` of table `main`.`iplock` trx table locks 1 total table locks 4 trx id 75459395 lock_mode X lock hold time 362 wait time before grant 0 RECORD LOCKS space id 677 page no 15 n bits 264 index `PRIMARY` of table `main`.`iplock` trx table locks 1 total table locks 4 trx id 75459395 lock_mode X locks rec but not gap lock hold time 362 wait time before grant 0 RECORD LOCKS space id 677 page no 9 n bits 744 index `ip` of table `main`.`iplock` trx table locks 1 total table locks 4 trx id 75459395 lock_mode X locks gap before rec lock hold time 362 wait time before grant 0 ---TRANSACTION 75459393, ACTIVE (PREPARED) 362 sec 1 lock struct(s), heap size 360, 0 row lock(s), undo log entries 1 MySQL thread id 45, OS thread handle 0x7fcade563700, query id 10200790 localhost 127.0.0.1 ejabberd init commit Trx #rec lock waits 0 #table lock waits 0 Trx total rec lock wait time 0 SEC Trx total table lock wait time 0 SEC TABLE LOCK table `ejd_im`.`spool` trx id 75459393 lock mode IX lock hold time 362 wait time before grant 0 ---TRANSACTION 75459390, ACTIVE 362 sec doing SYNC index 1 lock struct(s), heap size 360, 0 row lock(s), undo log entries 18453 Trx #rec lock waits 0 #table lock waits 0 Trx total rec lock wait time 0 SEC Trx total table lock wait time 0 SEC TABLE LOCK table "nlb"."FTS_0000000000000321_0000000000000724_INDEX_1" trx id 75459390 lock mode IX lock hold time 362 wait time before grant 0 ---TRANSACTION 75459389, ACTIVE (PREPARED) 362 sec committing 2 lock struct(s), heap size 360, 0 row lock(s), undo log entries 3 MySQL thread id 1077859, OS thread handle 0x7fcd355d0700, query id 10200783 localhost nlb init COMMIT Trx #rec lock waits 0 #table lock waits 0 Trx total rec lock wait time 0 SEC Trx total table lock wait time 0 SEC TABLE LOCK table `nlb`.`posts` trx id 75459389 lock mode IX lock hold time 362 wait time before grant 0 TABLE LOCK table `nlb`.`dashboards` trx id 75459389 lock mode IX lock hold time 362 wait time before grant 0 委托方法来显示用户的当前位置。当我将设备连接到互联网时,它工作正常。但是当我断开互联网连接时,它表现得很奇怪,didupdatelocation没有被进一步调用。请给出一个解决方案。 已编辑,包含代码详情

didupdatelocation

1 个答案:

答案 0 :(得分:0)

您可以使用iPhone的基本GPS,无需互联网即可使用。要访问它,您需要使用CoreLocation框架。

您可以参考:CoreLocation methods来使用GPS数据。

如果需要任何其他帮助,请告诉我。