报错如下:Trying to start MapKit location updates without prompting for location authorization. Must call -[CLLocationManager requestWhenInUseAuthorization] or -[CLLocationManager requestAlwaysAuthorization] first.

网上一搜大把类似的帖子

解决办法:在工程的info.plist文件里面添加两项属性。value值为yes

      NSLocationWhenInUseUsageDescription

      NSLocationAlwaysUsageDescription

    

代码里面写:

   

 _locationManager=[[CLLocationManager alloc]init];

     if(![CLLocationManager locationServicesEnabled]||[CLLocationManager authorizationStatus]!=kCLAuthorizationStatusAuthorizedWhenInUse){

         [_locationManager requestWhenInUseAuthorization];

     }

     [_locationManager setDelegate:self];

     [_locationManager requestAlwaysAuthorization];        //NSLocationAlwaysUsageDescription

     [_locationManager requestWhenInUseAuthorization];     //NSLocationWhenInUseDescription

 

ios8地图开发的报错的更多相关文章

  1. 【转】 IOS开发xcode报错之has been modified since the precompiled header was built

    本文转载自  IOS开发xcode报错之has been modified since the precompiled header was built 其实我是升级xcode到4.6.3的时候遇到的 ...

  2. IOS开发 xcode报错之has been modified since the precompiled header was built

    转载的文章  很实用 IOS开发xcode报错之has been modified since the precompiled header was built 今天做百度地图的时候第一次发现下面错误 ...

  3. 高德地图Demo运行报错 com.android.ide.common.process.ProcessException: Failed to execute aapt

    最近由于有需求去做导航方面的Android开发,很是无奈,以前也的确是没有搞过,领导开大会当着所有人的面说这是给我分配的第一个工作,无论如何要做好,突然间感觉压力好大,自己已经多年没有敲过代码,而且A ...

  4. hadoop项目开发运行报错(log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).)

    使用hadoop+myeclipse开发项目是测试运行报错: log4j:WARN No appenders could be found for logger (org.apache.hadoop. ...

  5. Vue tools开发工具报错Cannot read property '__VUE_DEVTOOLS_UID__' of undefined

    使用 vue tools 开发工具,不显示调试面板中的组件,点击控制台报错: Cannot read property 'VUE_DEVTOOLS_UID' of undefined 在 main.j ...

  6. iOS开发编译报错、常见问题(实时更新)

    一.报错与警报 1.错误代码:No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCH ...

  7. win7+IE11 中开发工具报错occurredJSLugin.3005解决办法

    系统环境 win7+IE11 报错描述: Exception in window.onload: Error: An error has ocurredJSPlugin.3005 Stack Trac ...

  8. iOS 开发笔记-报错处理

    1.xcode7报错:does not contain bitcode 解决方法:Build Settings 搜索 bitcode  将Enable Bitcode更改为NO即可 2.Code Si ...

  9. iOS开发——打包报错error: linker command failed with exit code 1

    真机运行没问题,打包报错: clang: error: linker command failed with exit code 1 (use -v to see invocation) 原因:在Xc ...

随机推荐

  1. 【JS】Intermediate8:jQuery:AJAX

    1.$.ajax is the main method, allowing you to manually construct your AJAX request 2.eg: gets some da ...

  2. Bzoj 1562: [NOI2009]变换序列 匈牙利算法,二分图匹配

    题目: http://cojs.tk/cogs/problem/problem.php?pid=409 409. [NOI2009]变换序列 ★★☆   输入文件:transform.in   输出文 ...

  3. 《Genesis-3D开源游戏引擎--横版格斗游戏制作教程05:技能读表》

    5.技能读表 技能读表概述: 技能读表,作为实现技能系统更为快捷的一种方式,被广泛应用到游戏开发中.技能配表,作为桥梁连接着游戏策划者和开发者在技能实现上的关系.在游戏技能开发中,开发者只需要根据策划 ...

  4. yuv 图像里的stride和plane的解释

    stride可以翻译为:跨距 stride指在内存中每行像素所占的空间.如下图所示,为了实现内存对齐(或者其它的什么原因),每行像素在内存中所占的空间并不是图像的宽度. plane一般是以luma p ...

  5. [置顶] 项目进阶 之 持续构建环境搭建(二)Nexus私服器

    上一篇博文项目进阶 之 持续构建环境搭建(一)架构中,我们大致讲解了一下本系列所搭建环境的基本框架,这次开始我们进入真正的环境搭建实战.重点不在于搭建的环境是否成功和完善,而是在搭建过程中充分认识到每 ...

  6. salt-minion安装脚本

    #!/bin/bash cd /usr/local/src/ wget http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.no ...

  7. XML Drawable与9-Patches

    可绘制对象资源 两种设计工具均属于drawable.Android把任何可绘制在屏幕上的图形图像都称为drawable drawable可以是一种抽象的图形.一个继承 Drawable 类的子类,或者 ...

  8. OpenOffice的安装与启动

    一.安装openOffice1.使用tar -xzvf OOo_3.2.0_LinuxIntel_install_wJRE_en-US.tar.gz解压缩后,会得到OOO320_m12_native_ ...

  9. [Node.js] Creating JWTs (JSON Web Tokens) in Node

    In this lesson we will look at all of the pieces that combine together to create a JWT (j AWT) or JS ...

  10. [Angular 2] Handle Reactive Async opreations in Service

    When you use ngrx/store and you want to fire a service request. When it sucessfully return the respo ...