简体   繁体   English

App Store Connect 警告 - 文档配置无效

[英]App Store Connect Warns - Invalid Document Configuration

I have submitted a Single View Swift iOS application to App Store Connect.我已经向 App Store Connect 提交了 Single View Swift iOS 申请。 The application is not Document Based.该应用程序不是基于文档的。

The application uploads successfully, but I get the following warning in an email from Apple.应用程序上传成功,但我在来自 Apple 的 email 中收到以下警告。 I can still test the application through Test Flight, but I want to eliminate the warning.我仍然可以通过 Test Flight 测试应用程序,但我想消除警告。

"Invalid Document Configuration - Document Based Apps should support either the Document Browser (UISupportsDocumentBrowser = YES) or implement Open In Place (LSSupportsOpeningDocumentsInPlace = YES/NO)." “无效的文档配置 - 基于文档的应用程序应支持文档浏览器 (UISupportsDocumentBrowser = YES) 或实施就地打开 (LSSupportsOpeningDocumentsInPlace = YES/NO)。”

I just ran into the same problem; 我刚遇到同样的问题; I don't know why, since I barely change anything since the previous version of my app. 我不知道为什么,因为自从我的应用程序的上一版本以来我几乎没有任何改变。

Anyway, my app doesn't support the Document Browser, so the first half of the error message doesn't apply. 无论如何,我的应用程序不支持文档浏览器,因此错误消息的前半部分不适用。 That left me with the second half. 这让我下半场。 I looked up LSSupportsOpeningDocumentsInPlace 's documentation and still wasn't clear on how it works, so I decided to try both options. 我查看了LSSupportsOpeningDocumentsInPlace的文档 ,但仍然不清楚它是如何工作的,所以我决定尝试这两个选项。 My app supports it's own document type, and when a user opens an appropriate file iOS shows an action sheet with the option "Copy to Leio" (my app). 我的应用程序支持它自己的文档类型,当用户打开相应的文件时,iOS会显示一个带有“Copy to Leio”(我的应用程序)选项的操作表。 After setting LSSupportsOpeningDocumentsInPlace to YES , iOS wouldn't show that action sheet anymore; LSSupportsOpeningDocumentsInPlace设置为YES ,iOS将不再显示该操作表; it would just open my app and do nothing. 它会打开我的应用程序,什么也不做。 So I set it to NO ; 所以我把它设置为NO ; now the app works as it did before and I'm not getting that error message anymore. 现在该应用程序像以前一样工作,我不再收到该错误消息了。 If you don't handle any document types I suppose you could set the option either way. 如果你不处理任何文档类型,我想你可以设置选项。


Edit: There's some more information about that option here . 编辑:有一个关于该选项更多的信息在这里

So there you go. 你去吧 If your app were to edit a document, would it edit the original document, or would it make a copy and deal with that? 如果您的应用程序要编辑文档,它是否会编辑原始文档,还是会复制并处理该文档? Set the option accordingly. 相应地设置选项。 If you really don't do anything like that I'd guess setting the option to NO would be the safest bet, and I think that's how my app behaved when I hadn't set that option at all. 如果你真的不做那样的事我猜想将选项设置为NO将是最安全的选择,我认为这是我的应用程序在我没有设置该选项时的表现。

Since your app is not Document based just set UISupportsDocumentBrowser and/or LSSupportsOpeningDocumentsInPlace ( reference and documentation ) to NO in your plist. 由于您的应用程序不是基于文档,因此只需在您的plist中将UISupportsDocumentBrowser和/或LSSupportsOpeningDocumentsInPlace参考文档 )设置为NO即可。 This should resolve the warning. 这应该解决警告。

I had the same problem with the warning from App Store Connect. 我对App Store Connect的警告也有同样的问题。 After changes these two keys to NO and resubmitting the warning was gone. 将这两个键更改为NO并重新提交警告后就消失了。

Typical Requirement 典型要求

If your application is not document based (which would typically be the case if you get this new warning) and if furthermore you are already opening files in your documents directory, then all you need is: 如果您的应用程序不是基于文档的(如果您收到此新警告通常就是这种情况),而且如果您已经在文档目录中打开文件,那么您只需要:

LSSupportsOpeningDocumentsInPlace = YES

支持打开文档


This answer does not apply if you are not opening documents in place (ie make a copy), or of course, if you so desire to support document browser, as seen in @rivera's comment. 如果您没有打开文档(即复制),或者当您希望支持文档浏览器时,这个答案不适用,如@ rivera的评论中所示。

If you are using UIDocumentInteractionController in your app, set 如果您在应用程序中使用UIDocumentInteractionController,请设置

UISupportsDocumentBrowser = YES

in your project's info.plist; 在你的项目的info.plist; otherwise, set 否则,设置

UISupportsDocumentBrowser = NO

It appears that if you have CFBundleDocumentTypes in your apps Info.plist , even if the array is empty, this warning is triggered when you submit your app. 看来,如果您的应用Info.plistCFBundleDocumentTypes ,即使数组为空,也会在您提交应用时触发此警告。 If your app doesn't support any document types remove that key and you won't get the warning. 如果您的应用不支持任何文档类型,请删除该密钥,您将不会收到警告。

I also faced the same issue recently while uploading the app to TestFlight , The below solution worked for me, 最近我在将应用程序上传到TestFlight时遇到了同样的问题,以下解决方案对我TestFlight

In your app's Info.plist file, the UISupportsDocumentBrowser key is set to YES , declaring document browser support for your app. 在您的应用程序的Info.plist文件中, UISupportsDocumentBrowser键设置为YES ,声明您的应用程序的文档浏览器支持。

For more info, please refer Setting Up a Document Browser App 有关详细信息,请参阅设置文档浏览器应用程序

Here are where you find the settings in Xcode 13:在这里您可以找到 Xcode 13 中的设置:

在 plist 中查找键

在 plist 中设置键

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

相关问题 App Store Connect 操作错误:“无效的 AdamId” - App Store Connect Operation Error : “Invalid AdamId” Invalid Bundle App Store Connect 验证操作错误 - Xcode 13 - Invalid Bundle App Store Connect Operation Error in validation - Xcode 13 App Store Connect 操作错误:核心 nfc 框架的权利无效 - App Store Connect Operation Error: Invalid entitlement for core nfc framework React-Native IOS 应用程序的 WatchOS 应用程序未上传到 App Store Connect(ITMS-90496:无效的可执行文件) - WatchOS App for React-Native IOS app is not uploading to App Store Connect (ITMS-90496: Invalid Executable) 无效的App Store图标 - Invalid App Store Icon App Store启动报错提示invalid configuration file package如何解决? - How to solve the problem of invalid configuration file package prompted by the error in the launched App Store? App Store Connect中的App Store信息项 - App Store Information items in App Store Connect Xcode 10 GM - 提交到App Store Connect时无效的二进制架构? - Xcode 10 GM - Invalid Binary Architecture when submitting to App Store Connect? App Store Connect 操作错误。 无效的图像路径。 未找到图片 - App Store Connect Operation Error. Invalid Image Path. No image found App Store Connect 提交后出错。 ITMS-90562:无效的捆绑包 - Error after App Store Connect submision. ITMS-90562: Invalid Bundle
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM