StoreKit返回所有产品ID [英] StoreKit to return all product IDs

查看:148
本文介绍了StoreKit返回所有产品ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题与我在这里找到的其他问题略有不同。 My In App StoreKit正在运行,我可以在我的商店中成功列出产品。我已经浏览了Apple文档,从未看过我的问题(我可能已经错过了)。



我的客户(非盈利组织)希望能够通过他们的应用程序接受捐款。我想让他们能够动态添加新的捐赠活动,而无需用户更新他们的应用程序。我的意思是,他们可能有一个特殊的帮助我们赞助即将到来的植树节活动并接受特定于该案例的捐款。



我目前正在阅读像这个:

  SKProductsRequest * request = 
[[SKProductsRequest alloc] initWithProductIdentifiers:
[NSSet setWithObjects:@ goldSponsor,@silverSponsor];

这意味着如果Arbor Day活动出现,我将不得不发布更新以包含@arborSponsor在我的请求列表中。我怎样才能请求我的捆绑下的每件产品?



我尝试过使用@com.thedomain。*和其他一些没有运气的猜测。有可能返回整个列表,我错过了一些非常简单的东西吗?谢谢!

解决方案

很遗憾,您必须提供所有您想要获取信息的产品ID。可以看到。



处理此问题的一种方法是将您的产品ID存储在远程服务器上,然后向服务器发出请求以下拉当前ID的集合加载商店时。



这样你就可以在itunes方面添加或删除产品,而不必向你的应用程序提交任何二进制更新。



我认为您可以通过缓存iphone应用程序中的产品列表找到一个快乐的媒介,然后快速请求查看是否有任何更改,以便您不会甚至每次都必须得到完整列表。



这可以使用服务器端的简单http API甚至只是你下载的xml文件来完成。 / p>

从In App购买编程指南


Apple建议您从服务器中检索产品
标识符,而不是将
包含在属性
列表中。这使您可以灵活地
添加新产品而无需更新
您的应用程序。



This question is a little different from the others I've found here. My In App StoreKit is working, I can list products in my store successfully. I've gone through the Apple documentation and never saw my question addressed(I may have missed it).

My client(non-profit) would like to be able to accept donations through their App. I would like to let them have the ability to add new donation events on the fly without users having to update their app. What I mean is, they may have a special "Help us sponsor an event this upcoming Arbor Day" and accept donations particular to that case.

I am currently reading products like this:

SKProductsRequest *request= 
         [[SKProductsRequest alloc] initWithProductIdentifiers: 
          [NSSet setWithObjects: @"goldSponsor", @"silverSponsor"];

This means if that Arbor Day event comes up, I'll have to issue an update to include the @"arborSponsor" in my request list. How can I request every product under my bundle?

I've tried using @"com.thedomain.*" and some other guesses without luck. Is it possible to return the whole list, am I missing something very simple? Thanks!

解决方案

You unfortunately have to provide all of the ID's for products you'd like to get information for as far as I could see.

One way to handle this is to store your product ID's on a remote server and then to make a request to the server to pull down the current set of ID's when loading the store.

That would allow you to add or remove products from the itunes side of things and not have to submit any binary updates to your app.

I think you could probably find a happy medium by caching the list of products in the iphone app and then just making a quick request to see if there had been any changes so you wouldn't even have to get the full list each time.

This could be done using a simple http API on the server side or even just an xml file you pull down.

From the In App purchase Programming Guide

Apple recommends you retrieve product identifiers from your server, rather than including them in a property list. This gives you the flexibility to add new products without updating your application.

这篇关于StoreKit返回所有产品ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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