UIFileSharingEnabled键在Info.plist中 [英] UIFileSharingEnabled key in Info.plist

查看:831
本文介绍了UIFileSharingEnabled键在Info.plist中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将密钥 UIFileSharingEnabled 添加到了我的应用程序的版本信息如此处所述,以便我的用户可以将文件保存到我的应用程序文档文件夹中。在测试中效果很好。试图使用Application Loader上载到苹果商店,并且出现 ERROR ITMS-90039:类型不匹配。Info.plist密钥UIFileSharingEnabled的值不是该密钥的必需类型。 / code>。我已经在Google上搜索,发现其他人对此有问题,但是他们的解决方案都没有帮助。以下是我尝试在Info.plist中显示此键的方法:

I added the key UIFileSharingEnabled to my app's version info as described here so my users can save files to my apps documents folder. Works great in testing. Tried to upload to apple store with Application Loader and i'm getting an ERROR ITMS-90039: "Type Mismatch. The value for the Info.plist key UIFileSharingEnabled is not of the required type for that key.. I've googled and found where other folks had problems with it but none of their solutions helped. Here are the ways i've tried to show this key in the Info.plist:

<key>UIFileSharingEnabled</key>
<string>true</string>

<key>UIFileSharingEnabled</key>
<true/>

<key>UIFileSharingEnabled</key>
<string>YES</string>

<key>UIFileSharingEnabled</key>
<YES/>

所有结果都相同,Application Loader拒绝显示 ERROR ITMS-90039 。此键是一个布尔键,对于Info.plist中的其他布尔键,它们只是看起来像我展示的最上面的一个。任何人都有一个示例Info.plist

All have the same result, Application Loader barfs out the ERROR ITMS-90039. This key is a boolean key and for other boolean keys in Info.plist they just look like that top one i show. Anyone have a sample Info.plist with this key true that we can compare too?

我已经在Rad Studio 10.3.2(C ++ Builder)中构建了我的应用。他们的关键是可以与手机上的测试版本一起使用。

I've built my app in Rad Studio 10.3.2 (C++ Builder). They key works with test builds on the phone.

推荐答案

让它正常工作,这是很容易的事情: iOSDevice64\Release 文件夹中的> Info.plist 文件仅用于提供您的信息,而不是在Application Loader中上传到Apple的文件。上载的 Info.plist .ipa文件是在Rad Studio中构建发行版时创建的,并且已签名,因此您显然无法对其进行修改。

Got it working and here is the deal: The Info.plist file in the iOSDevice64\Release folder is just for your info, it is not what gets uploaded to apple in the Application Loader. The Info.plist that gets uploaded is inside the .ipa file that is created when you build a Release version in Rad Studio and it gets signed so you obviously can't modify it.

解决方案是来编辑 info.plist.TemplateiOS .xml 在我应用程序的项目文件夹中。您在 Project-> Options-Application->版本信息中放置的密钥将添加到此 info.plist.TemplateiOS.xml 构建时。因此,我编辑了此模板文件,并在<%ExtraInfoPListKeys%> 和最后一个< / dict>

The solution was to edit the info.plist.TemplateiOS.xml that is in my app's project folder. The keys you put in Project->Options-Application->Version Info get added to this info.plist.TemplateiOS.xml when you build. So, I edited this template file and put the correct key representation in between <%ExtraInfoPListKeys%> and the last </dict>:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<%VersionInfoPListKeys%>
<%ExtraInfoPListKeys%>
<key>UIFileSharingEnabled</key>
<true/>
</dict>
</plist>

如果仅将 UIFileSharingEnabled 键放入 Project-> Options-Application->版本信息,它将最终出现在 Info.plist 中,如下所示这是错误的,Application Loader会给出该错误:

If you just put the UIFileSharingEnabled key in the Project->Options-Application->Version Info it will end up in the Info.plist like below which is wrong and Application Loader will give that error:

 <key>UIFileSharingEnabled</key>
 <string>true</string>

密钥必须如下所示,才能处理您提交到应用商店的Release:

The key must be like below to work on Release that you submit to app store:

<key>UIFileSharingEnabled</key>
<true/>

这篇关于UIFileSharingEnabled键在Info.plist中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆