以编程方式添加导出类型的UTI以进行应用内购买 [英] Adding Exported Type UTIs Programmatically for In-App Purchase

查看:30
本文介绍了以编程方式添加导出类型的UTI以进行应用内购买的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个应用内购买,该应用允许我的用户从电子邮件和其他应用中导入文件.为此,我需要在我的.plist文件中添加 Exported Type UTI 键.

I am wanting to have an In-App Purchase that allows my users to import files from emails and other apps. To do this, I need to add the Exported Type UTI key to my .plist file.

问题是,在用户进行应用内购买之前,我不想这样做.一旦他们这样做了,那么我想允许这个功能.

Problem is, I don't want to do this until the user has made the In-App Purchase. Once they do, then I want to allow this feature.

是否可以通过编程方式将 Exported Type UTI 添加到我的.plist?还是使用应用内购买提供此功能的另一种首选方法?

Is it possible to add the Exported Type UTI to my .plist programmatically? Or is there another preferred way to offer this functionality using In-App Purchasing?

推荐答案

info.plist是应用程序捆绑包的一部分,因此也是代码签名的一部分.一旦应用程序签名,您将无法更改它,因为那样会更改应用程序的校验和.

The info.plist is part of the app bundle, and thus is part of the code-signing. You can't change it once the app has been signed, as that would change the app's checksum.

因此,不幸的是,您想做的事情是不可能的.最好的选择是将UTI始终保留在plist中,并在用户尝试打开文件时仅警告用户他们需要付费才能启用该功能.

So unfortunately what you want to do is not possible. Your best bet would be to have the UTI always in the plist and just alert the user when they try to open a file that they need to pay to have that feature enabled.

这篇关于以编程方式添加导出类型的UTI以进行应用内购买的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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