iOS10之Expected App Behaviors

  昨天上架到appStore的时候碰到个问题,构建好后上传到itunesconnect的的包都用不了,

显示错误为:此构建版本无效。

或者英文显示为:ITC.apps.preReleaseBuild.errors.invalidBinary

由于和itunesconnect帐号绑定的邮箱暂时进不去,没看到apple发到我们邮箱的通知信息,所以只在度娘搜索:有的说

是网络问题,有说是电脑问题,有说是icon问题,有说使用Application Loader上传.....

但是试了都没解决问题,然后就出现了这么多个『此构建版本无效』

后面终于登录了邮箱,看打了apple那边的团队发过来的通知邮件,原来是这个原因:

......This app attempts to access privacy-sensitive data without a usage description. The app‘s Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.
Once these issues have been corrected, you can then redeliver the corrected binary.
Regards,
The App Store team

意思是app的配置文件info.plist少了一个app请求使用设备蓝牙的请求配置:NSBluetoothPeripheralUsageDescription

然后加上后,再次打包上传就可以使用了!

查了下资料,apple从iOS10之后,Expected App Behaviors(预期应用行为),对于用户的隐私更加重视,如果需要访问用户手机的相机、多媒体、蓝牙、通讯录、位置、健康、运动...等等,必须询问用户征得用户授权才可以使用。

官方说明链接:

https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ExpectedAppBehaviors/ExpectedAppBehaviors.html

在项目工程配置文件info.plist添加时会自动提示的,截图如下:

查看info.plist的source code,展开如下:

<key>NSBluetoothPeripheralUsageDescription</key>
    <string>是否允许此App访问您的蓝牙</string>
    <key>NSCalendarsUsageDescription</key>
    <string>是否允许此App访问您的日历</string>
    <key>NSCameraUsageDescription</key>
    <string>是否允许此App使用您的相机</string>
    <key>NSContactsUsageDescription</key>
    <string>是否允许此App访问您的通讯录</string>
    <key>NSHealthShareUsageDescription</key>
    <string>是否允许此App访问您的健康分享</string>
    <key>NSHealthUpdateUsageDescription</key>
    <string>是否允许此App访问您的健康更新</string>
    <key>NSHomeKitUsageDescription</key>
    <string>是否允许此App访问您的HomeKit</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>我们需要通过您的地理位置信息获取您周边的相关数据</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>您的位置信息将用于地图上显示您的位置,并发送给联系人</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>是否允许此App使用您的麦克风</string>
    <key>NSMotionUsageDescription</key>
    <string>App需要您的同意,才能访问运动与健身</string>
    <key>kTCCServiceMediaLibrary</key>
    <string>是否允许此App访问您的音乐</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>是否允许此App访问您的媒体资料库</string>
    <key>NSRemindersUsageDescription</key>
    <string>是否允许此App访问您的提醒事项</string>
    <key>NSSiriUsageDescription</key>
    <string>是否允许此App访问您的Siri</string>
    <key>NSSpeechRecognitionUsageDescription</key>
    <string>是否允许此App使用您的语音识别</string>
    <key>NSVideoSubscriberAccountUsageDescription</key>
    <string>是否允许此App访问您的tv供应商账户</string>

原文链接:http://www.cnblogs.com/tandaxia/p/6207236.html

时间: 2024-10-20 18:32:02

iOS10之Expected App Behaviors的相关文章

iOS坑点解析

iOS 9 版本的哪些坑 http://blog.csdn.net/worldzhy/article/details/49250565 在iOS9中,如果使用 canOpenURL: 方法,该方法所涉及到的 URL scheme 必须在 [Info.plist]中将URL添加到白名单,否则直接返回False,白名单上限是50个. iOS9中 openURL: 方法没有什么实质性的变化,仅仅多了一个确认动作.即不添加白名单也可以用. iOS10各种授权的描述 查了下资料,apple从 iOS10

The App Life Cycle &amp; The Main Function

The App Life Cycle Apps are a sophisticated interplay between your custom code and the system frameworks. The system frameworks provide the basic infrastructure that all apps need to run, and you provide the code required to customize that infrastruc

Linkedin - product

Application decrease – 4 times if the amonunt of job applications decrease significantly, as a data scientist, what would you do to find out why? application rate 降低 你怎么调查和解决 产品答得不好 面试官说的话有点不太好理解 但主要问题还是自己不熟练这一块 劝小伙伴们多练下这一块 多重视下 如果作为ds 的你突然发现current

Yii2 behavior运用

1 class ReturnDataTypeBehaviors extends Behavior 2 { 3 4 public $type = 'json'; 5 public $pcOrMobile = 'pc'; // or mobile 6 7 //控制器执行之后事件 8 public function events() 9 { 10 return [Controller::EVENT_BEFORE_ACTION => 'beforeType']; 11 } 12 13 /** 14 *

挖掘angularjs &quot;controller as&quot; 语法

原文:http://toddmotto.com/digging-into-angulars-controller-as-syntax/ AngularJS Controllers have recently gone under some changes (version 1.2 to be precise). What this means for scopes, Controllers and Angular development is some very subtle but power

iOS interview questions and Answers

http://gksanthoshbe.blogspot.com/2013/03/ios-interview-questions-and-answers.html 1-How would you create your own custom view? By Subclassing the UIView class. 2-Whats fast enumeration? Fast enumeration is a language feature that allows you to enumer

关于UIApplicationMain

The main.m File and the UIApplicationMain Function The main function in main.m calls the UIApplicationMain function within an autorelease pool. @autoreleasepool {   return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));}Th

iOS 10 推送的简单使用

首先介绍一下本文涉及到UserNotifications的几个主要类. 其中 [1]UNNotification主要是作为通知delegate方法的参数使用.包含UNNotificationRequest信息. [2]UNNotificationAction是通知中添加的action,展示在通知栏的下方.默认以的button样式展示.有一个文本输入的子类UNTextInputNotificationAction.可以在点击button之后弹出一个键盘,输入信息.用户点击信息和输入的信息可以在UN

最近IOS10.2.1 iphone6 无法通过appStore 来更新 下载任何APP。好烦啊。

今天打开爱思助手,查看事实日志,发现了原因: Mar 19 13:19:20 iPhone6 appstored(StoreServices)[341] <Notice>: SSSQLiteDatabase: Could not execute SQL: ATTACH DATABASE "/private/var/containers/Data/System/2EC11498-9F3C-40EE-BF61-6102235B9A0C/Documents/updates.sqlitedb