gpt4 book ai didi

iphone - 恢复应用内购买时没有出现 'buy' 提示?是否可以?

转载 作者:行者123 更新时间:2023-11-29 04:32:55 24 4
gpt4 key购买 nike

我目前有应用内购买“恢复”按钮,

确实工作,但本质上它要求用户在整个过程中“购买”升级(就像普通的应用程序内一样)我担心这会

a) 被苹果拒绝b) 吓唬用户,让他们认为他们再次付费

有什么办法可以改变它,让它有不同的消息吗?

-(IBAction)restore:(id)sender
{=
[[SKPaymentQueue defaultQueue]
addTransactionObserver:self];
[[SKPaymentQueue defaultQueue]
restoreCompletedTransactions];

UIAlertView *alert;

alert = [[[UIAlertView alloc] initWithTitle:@"Restoring Your Purchases, Please Wait..." message:nil delegate:self cancelButtonTitle:nil otherButtonTitles: nil] autorelease];
[alert show];

UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];

// Adjust the indicator so it is up a few pixels from the bottom of the alert
indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50);
[indicator startAnimating];
[alert addSubview:indicator];
[indicator release];

[alert dismissWithClickedButtonIndex:0 animated:YES];

[[MKStoreManager sharedManager] buyFeature];=
}

-(void)productPurchased
{
for (UIView *view in self.view.subviews)
{
if (view.tag==2000)
{
[view removeFromSuperview];
}
}

UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Thank you" message:@"Your restore was successful." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alert show];
[alert release];
}

// error restore
- (void)failed
{
for (UIView *view in self.view.subviews)
{
if (view.tag==2000)
{
[view removeFromSuperview];
}
}

UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Error" message:@"Your restore has failed." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alert show];
[alert release];
}

最佳答案

完全可以,事实上这是必要的。看我的answer有点类似question .

本质上,当您按下恢复按钮时,应该要求用户验证他们的帐户;这是由 StoreKit 处理的。如果找到该帐户的 IA 购买行为,则该过程应该开始以与第一次购买该商品相同的方式恢复购买行为,只是没有提示实际购买。

关于iphone - 恢复应用内购买时没有出现 'buy' 提示?是否可以?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11462389/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com