我在这个应用程序上工作,您可以购买消耗品。应用内购买设置为itunes上的耗材,我正在使用urbairship。问题是,当我购买物品时,它只要求(第一次)支付它。之后,它的工作方式相同,但没有AlertView节目要求您付费。它进入代表就好像您已支付产品一样。
任何人都可以帮助我吗?感谢。
更新:
[UAStoreFront registerObserver: self];
//[[UAStoreFront shared] setDelegate:self];
// Urban Airship Subscriptions
[UAStoreFront useCustomUI:[UAStoreFrontUI class]];
// Init Airship launch options
NSMutableDictionary *takeOffOptions = [[[NSMutableDictionary alloc] init] autorelease];
[takeOffOptions setValue:[[AppDelegate appDelegate] appDelegateLaunchOptions] forKey: UAirshipTakeOffOptionsLaunchOptionsKey];
// Create Airship singleton that's used to talk to Urban Airship servers.
// Please populate AirshipConfig.plist with your info from http://go.urbanairship.com
[UAirship takeOff:takeOffOptions];
[UAStoreFront registerObserver: self];
[[UAStoreFront shared] setDelegate:self];
[UAStoreFront resetAndLoadInventory];
此代码位于viewDidLoad。
我有一个提出请求的方法:
- (IBAction)pushBuyMoreTime
{
[UAStoreFront purchase: @"in-app id"];
}
即使它没有要求我支付,它也会调用此代表:
-(void)productPurchased:(UAProduct*) product {
}