1

I have an app which is 50MB+ in size. It is filled with image sets. Since the app has IAP I would like to download image sets on demand (when the user buys one image set). In order to do that I am trying to use apple's hosted content option.

I created a new project with the correct name/bundle ID and configured everything in iTunes conect. In order to deliver these IAP image sets I used a Asset catalog for every IAP product. However, when I want to archieve the product Xcode gives me the following message:

/Users/MyCompany/Desktop/Programming projects/Tutorials/Vegetables1/Vegetables1/Media.xcassets: The output directory "/Users/MyCompany/Library/Developer/Xcode/DerivedData/Vegetables1-dzbpbuiozhaliyezacnqehsgubdt/Build/Intermediates/ArchiveIntermediates/Vegetables1/InstallationBuildProductsLocation/Library/InAppPurchaseContent/Vegetables1/Contents" does not exist.

The Media.xcassets is empty... I didn't add any picture. No matter what I do it keeps giving me this error.

The Media.xcasset is correctly added in the Copy Bundle Resources and is visible via Finder.

I could add all the images manually without the Asset catalog. I don't think this a good approach but if it doesn't work I will have no other choice.

4

2 回答 2

2

只有在Copy Bundle Resources下列出的文件不是图像 xcasset时,您才能执行此操作。

对我来说,因为我的 IAP 包中也有音乐,所以我必须简单地将音乐添加到包中以使其正确构建。尝试使用空白文件或其他项目,以便您可以包含在 IAP 中,这些项目不一定需要但可以包含在 Xcode 中的 IAP 中。

于 2015-01-05T02:04:04.363 回答
1

资产目录是捆绑包中的资源,因此您无法在运行时修改或添加它们。您也不能引用在编译时不可用的资源。您必须预先打包所有 IAP 并通过购买解锁它们(如果您愿意,可以使用资产目录),或者以不同的格式(可能是带有原始图像和字典的 zip)打包您的 IAP 内容,以便您可以阅读它们从包外的本地目录。

于 2014-12-30T19:33:26.607 回答