报错如下: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. mac os 常用终端软件工具

    1. homebrew 安装 网上很多版本返回400错误,以下为最新版本地址(2015/02/09) ruby -e "$(curl -fsSL https://raw.githubuser ...

  2. linux多线程大神博客网址

    http://blog.csdn.net/zjf280441589/article/details/43883055

  3. 如何禁止掉SharePoint页面个性化(网站操作-编辑页面)

    使用SharePoint Designer打开,或者创建一个新的Master Page,找到SPWebPartManager控件,如下所示,修改它的属性“Personalization-Enabled ...

  4. linux Grant 添加 MySql 用户

    Grant 添加 MySql 用户 2009-04-03 14:40 我安装的版本: mysql> select version();+------------+| version()   |+ ...

  5. A Tour of Go Structs

    A struct is a collection of fields. (And a type declaration does what you'd expect.) package main im ...

  6. Android虚拟机Dalvik介绍

     Dalvik和标准Java虚拟机(JVM)之间的首要差别之一,就是Dalvik基于寄存器,而JVM基于栈.一直以来都有人在猜测,选择基于寄存器的方式是因为它对提前优化(ahead-of-time o ...

  7. [转]非常好的vsftpd安装于配置

    环境:CentOS 5.0 操作系统一.安装:1.安装Vsftpd服务相关部件:[root@KcentOS5 ~]# yum install vsftpd*Dependencies Resolved= ...

  8. SVN高速新手教程

    因为做Zip和Rar解析的时候,找到了mucommander工具,可将其jar包导入项目里执行发现报:类型转换错误,org.apache.commons.logging.impl.Log4JLogge ...

  9. linux中安装easy_install(setuptools)

    假设是相似于ubuntu的带桌面的系统直接下载安装就能够了.下面是针对centOS的命令行安装方法 最好先查看版本号号,依据版本号来选择安装方法.终端命令例如以下 # lsb_release -a 版 ...

  10. java20 创建服务器:ServerSocket

    创建服务器:ServerSocket import java.io.BufferedReader; import java.io.IOException; import java.io.InputSt ...