0

現在、アプリ内購入の「復元」ボタンがありますが、

それ機能しますが、基本的に、プロセスの途中でユーザーにアップグレードを「購入」するように求めます (通常のアプリ内で行うのと同じように)。

a) Apple に拒否される 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];
}
4

2 に答える 2

1

絶対に可能です、実際には必要です。やや似た質問に対する私の回答を参照してください。

基本的に、復元ボタンを押すと、ユーザーは自分のアカウントを確認するよう求められるはずです。これは によって処理されStoreKitます。アカウントの IA 購入が見つかった場合、プロセスは、アイテムを初めて購入する場合と同じ方法で購入の復元を開始する必要がありますが、実際に購入するプロンプトは表示されません。

于 2012-07-13T00:10:36.747 に答える
0

MKStoreKit を使用しているようです。アプリで iCloud を有効にするだけで、あとは MKStoreKit が処理します。他のデバイスでは、ストア ページを開かなくても、購入が「購入済み」として「表示」されます。

PS: MKStoreKit を書きました

于 2012-07-15T16:10:48.560 に答える