1

我正在开发这个应用程序,您可以在其中购买消耗品。应用内购买在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 {
}
4

0 回答 0