简体   繁体   English

应用因缺少info.plist键而被拒绝

[英]App rejected due to missing info.plist key

My app is getting rejected due to a missing info.plist key. 由于缺少info.plist键,我的应用被拒绝了。

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. 缺少Info.plist键-此应用尝试访问对隐私敏感的数据,而没有使用说明。 The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data. 该应用程序的Info.plist必须包含一个NSPhotoLibraryUsageDescription键,该键具有字符串值,该字符串值向用户说明该应用程序如何使用此数据。

I know how to "fix" it. 我知道如何“修复”它。 It's just as simple as it sounds, just add NSPhotoLibraryUsageDescription to my info.plist with a description of what it's used for. 听起来很简单,只需将NSPhotoLibraryUsageDescription添加到我的info.plist中,并说明其用途。

The problem is that I'm not using anything that should trigger this requirement. 问题是我没有使用任何可以触发此要求的东西。 I do not want to add this description without knowing what it's for . 我不想添加此描述,而不知道它的用途

The only thing I can think of that could cause this problem right now is that one of the external frameworks I'm using via CocoaPods has something to do with it. 我能想到的唯一可能导致此问题的原因是我通过CocoaPods使用的一个外部框架与此有关。

This is my podfile: 这是我的podfile:

def myPods
    pod 'HockeySDK',          '4.1.2'
    pod 'ReactiveCocoa',      '2.4.7'
    pod 'TTTAttributedLabel', '2.0.0'
    pod 'GoogleMaps',         '2.1.0'
    pod 'GoogleAnalytics',    '3.17.0'
end

target 'MainApp' do
    myPods
end

target 'BetaApp' do
    myPods
    pod 'Instabug', '7.0.5'
end

I know for a fact that Instabug requires this key (along with the key for Microphone usage), but I'm not always including Instabug, as you can see. 我知道一个事实,即Instabug需要此密钥(以及用于麦克风的密钥),但是正如您所见,我并不总是包含Instabug。 Let's say I have two targets; 假设我有两个目标; MainApp and BetaApp . MainAppBetaApp They each have its own info.plist . 它们每个都有自己的info.plist In BetaApp's info.plist, I have included the keys required. 在BetaApp的info.plist中,我包括了所需的密钥。 In MainApp I have not included them, because Instabug is not used in MainApp. 在MainApp中,我没有包括它们,因为在MainApp中未使用Instabug。 When I now try to upload the MainApp to AppStore I get this rejection. 现在,当我尝试将MainApp上传到AppStore时,遭到拒绝。 I have also tried removing the Instabug-pod completely (even though it's just present in the BetaApp), and it still happens in MainApp. 我还尝试了完全删除Instabug-pod(即使它仅存在于BetaApp中),并且仍然在MainApp中发生。

I have never had this rejection in MainApp before (it's not a new app, just an update). 我以前从未在MainApp中遇到过这种拒绝(这不是一个新应用,只是一个更新)。 I think I have updated GoogleMaps since last release, and maybe some of the others as well, but I have no idea how to find out why Apple thinks I have to implement NSPhotoLibraryUsageDescription . 认为自上一个版本以来,我已经更新了GoogleMaps,也许还有其他一些,但是我不知道如何找出Apple为什么认为我必须实现NSPhotoLibraryUsageDescription

Is there a way to find out what part of my app is triggering this requirement? 有没有办法找出我的应用程序的哪一部分触发了此要求?

I assume that if I implement the keys, they will never actually be triggered, and the user would never be prompted to allow access to the photos library (because I have no code that attempts to access the user's photos library), but I'd like to know why this is happening, and I'm reluctant to add it before I know.. 假设如果实现这些键,它们实际上将不会被触发,也永远不会提示用户允许访问照片库(因为我没有尝试访问用户照片库的代码),但是我会我想知道为什么会这样,所以我不愿意在知道之前添加它。

I'd suggest you to follow instructions found in this answer 我建议您按照此答案中的说明进行操作

I understand that this might sound dumb to add NSPhotoLibraryUsageDescription key for no reason, however binary validation on the Apple's side is the process you don't have control over so it's simpler just to add this key. 我知道, NSPhotoLibraryUsageDescription添加NSPhotoLibraryUsageDescription密钥听起来NSPhotoLibraryUsageDescription愚蠢,但是Apple方面的二进制验证是您无法控制的过程,因此添加此密钥更加简单。

As for the background reason, I believe, Apple validator looks for UIImagePickerController usage in binary, not only AssetsLibrary or Photos framework linkage. 至于背景原因,我相信Apple验证程序会寻找二进制格式的UIImagePickerController用法,而不仅仅是AssetsLibraryPhotos框架链接。 So if you'd like to get your app submitted & approved, you have either sanitize around this, or simply add required key. 因此,如果您想让您的应用程序提交并获得批准,则可以对此进行清理或仅添加必需的密钥。

If you think, you don't use it, take a look at ReactiveCocoa/UI/UIImagePickerController+RACSignalSupport.m , so, unless you are not ready to have a custom ReactiveCocoa or avoid it's usage, you'll have to deal with NSPhotoLibraryUsageDescription 如果您认为自己不使用它,请查看ReactiveCocoa/UI/UIImagePickerController+RACSignalSupport.m ,因此,除非您不准备使用自定义ReactiveCocoa或避免使用它,否则必须处理NSPhotoLibraryUsageDescription

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 应用程序被拒绝:缺少Info.plist密钥“NSBluetoothPeripheralUsageDescription”但框架不存在 - App rejected: Missing Info.plist key “NSBluetoothPeripheralUsageDescription” but framework is not present 应用因缺少Info.plist键而被拒绝 - App rejected because of missing Info.plist key 由于来自appstore的Info.plist文件中缺少目的字符串,拒绝响应本机iOS应用程序 - Rejected react native iOS app due to Missing Purpose String in Info.plist File from appstore 仅观看由于缺少 HealthKit info.plist 键而被拒绝的应用程序二进制文件 - Watch only app binary rejected due to missing HealthKit info.plist keys 为什么使用NSBluetoothPeripheralUsageDescription键的“ Info.plist文件中缺少目标字符串”拒绝应用程序? - Why app is rejected with “Missing Purpose String in Info.plist File” for NSBluetoothPeripheralUsageDescription key? 缺少Info.plist键 - Missing Info.plist key 应用程序因Info.plist文件麦克风中缺少目的字符串而被拒绝,但我无法在info.plist中添加说明 - App got rejected for missing Purpose String in Info.plist File Microphone, but I can't add the description in info.plist 由于缺少 Info.plist,xcarchive 格式错误 - xcarchive malformed due to missing Info.plist 缺少Cordova Info.plist NSCameraUsageDescription键 - Cordova Info.plist NSCameraUsageDescription key is missing Xcode:缺少 NSCameraUsageDescription 的 Info.plist 键 - Xcode: Missing Info.plist key for NSCameraUsageDescription
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM