报错如下: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. Clean Code – Chapter 5 Formatting

    The Purpose of Formatting Code formatting is about communication, and communication is the professio ...

  2. Windows Azure 的磁盘管理相关概念

    在 Windows Azure 的虚拟机中,磁盘有多种使用方式.操作系统磁盘是用来为虚拟机提供操作系统的虚拟硬盘.数据磁盘是附加到虚拟机上用来存储应用程序数据的 VHD. 根据应用程序的需要,可从多种 ...

  3. stream转byte数组几种方式

    第一种,写法最简单的.使用原生IO,一个字节一个字节读: //一个字符一个字符读,太慢 int i; while((i=in.read()) != -1){ i = in.read(); arr[j+ ...

  4. Xcode5.1离线下载安装及使用iOS5模拟器进行开发调试的方法

    Xcode5.1默认不支持iOS5版本的模拟器开发调试,在OS X Mavericks(10.9.x)下默认只能支持iOS6.1及以上版本的模拟器,在OS X Mountain Lion(10.8.x ...

  5. MINA之心跳协议运用

    转自:http://my.oschina.net/yjwxh/blog/174633 摘要 心跳协议,对基于CS模式的系统开发来说是一种比较常见与有效的连接检测方式,最近在用MINA框架,原本自己写了 ...

  6. Android应用换肤总结

    换肤,我们都很熟悉,像XP的主题,塞班的主题.看过国外的一些技术博客,就会发现国内和国外对软件的,或者说移动开发的软件的需求的不同.国外用户注重社交.邮件等功能,国内用户则重视音乐.小说.皮肤等功能, ...

  7. log4net(c#) 配置及使用

    1. 首先从apache网站下载log4net, http://logging.apache.org/log4net/download_log4net.cgi .我下的是最新版本 log4net-1. ...

  8. 3 分钟学会调用 Apache Spark MLlib KMeans

    Apache Spark MLlib是Apache Spark体系中重要的一块拼图:提供了机器学习的模块.只是,眼下对此网上介绍的文章不是非常多.拿KMeans来说,网上有些文章提供了一些演示样例程序 ...

  9. 高质量CSS编写规范

    ①id和class的命名在保持语义性的同时尽可能的短.不推荐的写法:#navigation {} .atr {}推荐的写法  : #nav {} .author {}可以缩写单词,但缩写后务必能让人明 ...

  10. linux服务器上

    命令行>mysql -uwin -pwin2009进入mysql command状态>use mindo时入mindo数据库>source 500sql.txt执行sql