通过应用内购买解决无效的产品ID问题?

zar*_*don 18 itunesconnect subscriptions in-app-purchase

这是" 使用MKStoreKit失败的应用内购买 "的后续问题:"iTunes连接产品配置问题:xxx "

我有一个类似的问题,并尝试使用和不使用MKStoreKit同时做一个类似的消息.

检查列表

感谢:http://troybrant.net/blog/2010/01/invalid-product-ids/

您是否为应用程序ID启用了应用程序内购买?

你有没有检查过你的产品清仓?

您是否已提交(并可选择拒绝)应用程序二进制文件?

您的项目的.plist捆绑ID是否与您的应用ID相匹配?

您是否为新的App ID生成并安装了新的配置文件?

您是否已使用此新配置文件将项目配置为代码签名?

您是为iPhone OS 3.0或更高版本构建的吗?

是.iOS4.2及以上.

您在制作SKProductRequest时是否使用完整的产品ID?

是.也只是没有反向域的产品ID本身

自从将产品添加到iTunes Connect后,您有几个小时的时间吗?

是.它说"等待审查"并且已经过去4-5天了

您的银行详细信息是否在iTunes Connect上有效?

没有.这是一个客户端项目,我只是在测试它是否正常工作.我需要银行详细信息来测试吗?

编辑:我现在改变了.但我不明白为什么我需要这样做只是为了测试沙盒.

您是否尝试从设备中删除该应用并重新安装?

你的设备越狱了吗?

没有


应用表示法是正确的

我见过的一些例子使用了这种表示法:com.domain.APP_ID.PRODUCT_TO_BUY

但其他人使用com.domain.PRODUCT_TO_BUY

哪个是对的?

在我的代码中,我尝试使用完整的符号和产品ID本身,但仍然遇到"无效的产品ID"的相同问题.

开发者被拒绝

App Bundle(发布)在iTunes Connect上,我有"开发者拒绝"这个包.

图片: App开发者拒绝了

等待审核?

在我的应用内购买中,我有一个产品,一个可自动更新的订阅.它被清除出售; 然而,它是"等待审查"并且不是绿灯.

图片:

等待审查

我差不多4-5天前创建了它,它仍然被标记为"等待审查"?

我想知道我的应用程序是否被"开发人员拒绝",这是否会对自动续订订阅的"等待审核"产生影响?

我在这个项目中没有改变任何东西.

根据各种文章,我必须等待24-48小时才可以使用它?

但是,在我可以在测试中使用它之前,是否需要等待接受或绿灯?

银行明细

我没有填写任何银行详细信息,因为这是一个客户端的应用程序 - 在继续测试之前,我是否需要填写银行详细信息?

根据这些文档:http://developer.apple.com/library/ios/#technotes/tn2259/_index.html 银行详细信息是否必需?

在运行应用程序之前,我是否需要在测试帐户下登录设备上的iTunes?

我想知道是否有人可以澄清这些问题?也许它就像等待应用内购买"绿灯"一样简单,或者我错过了一步?

注意:无论我是使用MKStoreKit还是使用后面的代码,都会发生这种情况.

谢谢.

我的代码(这是非MKStoreKit版本)

#define kMySubscriptionFeature @"uk.co.samplewebsite.myappproject.sub1"

    - (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title = @"Manage Subscriptions";


    if ([SKPaymentQueue canMakePayments])
    {
        // Display a store to the user.

        //[MKStoreManager sharedManager];
        //NSLog(@"purhcasable = %@", [[MKStoreManager sharedManager] purchasableObjectsDescription] );
        [self requestProUpgradeProductData];

    }
    else
    {
        // Warn the user that purchases are disabled.
        NSString *message = @"In-app purchases are disabled. Please review your settings";
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [alertView show];
        [alertView release];
    } // end if
}


#pragma mark - StoreKit Delegate

- (void) requestProductData
{
    SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject:kMySubscriptionFeature]];
    request.delegate = self;
    [request start];
}

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
    NSArray *myProduct = [[NSArray alloc] initWithArray:response.products];

    for(SKProduct *item in myProduct)
    {

        NSLog(@"Product title: %@" , item.localizedTitle);
        NSLog(@"Product description: %@" , item.localizedDescription);
        NSLog(@"Product price: %@" , item.price);
        NSLog(@"Product id: %@" , item.productIdentifier);
    }


    for (NSString *invalidProductId in response.invalidProductIdentifiers)
    {
        NSLog(@"Problem in iTunes connect configuration for product: %@" , invalidProductId);
    }


    [myProduct release];

    // populate UI
    [request autorelease];
}
Run Code Online (Sandbox Code Playgroud)

编辑:

作为一个故障保险,我已经添加了银行详细信息以防万一,但我不明白为什么这会导致问题.

我还确保上传并拒绝了应用程序发布包而不是adhoc; 虽然我不知道这是否有所不同.

小智 11

经过2天的等待,新的应用程序ID,配置文件等,这对我来说是固定的..

为什么文档说要使用完整的com.iap.isrubbish语法?

谢谢你的帮助

我换了:

定义kMySubscriptionFeature @"uk.co.somesite.someapp.sub1"

有:

定义kMySubscriptionFeature @"sub1"


zar*_*don 6

我想我现在已经做到了.我要做一些测试只是为了确保.

这还不会被接受; 我正在使用不同的storekit框架运行一些测试.

我的输出:

2011-10-27 15:17:49.297 My Simple App[7376:707] productsRequest
2011-10-27 15:17:49.298 My Simple App[7376:707] Product title: Simple subscription
2011-10-27 15:17:49.299 My Simple App[7376:707] Product description: Subscribe and get the latest content to your iPhone or iPod Touch device
2011-10-27 15:17:49.299 My Simple App[7376:707] Product price: 2.99
2011-10-27 15:17:49.300 My Simple App[7376:707] Product id: sub1
Run Code Online (Sandbox Code Playgroud)

这就是我做的.

  1. 我添加了银行详细信息.我仍然认为这与它无关.

  2. 注意.该应用程序的应用内购买仍然是"等待审核",我得到了上述输出.

  3. 我换了:

    #define kMySubscriptionFeature @"uk.co.somesite.someapp.sub1"

有:

#define kMySubscriptionFeature @"sub1"
Run Code Online (Sandbox Code Playgroud)

我将使用MKStoreKit和其他框架运行一些测试,看看它是否正常.

我使用的代码如下,出于安全原因进行了编辑:

.h文件

//  ManageSubscriptionsVC.h
//  This doesn't have visual output, just NSLog at the moment
//  This doesn't use MKStoreKit yet

#import <UIKit/UIKit.h>
#import "StoreKit/StoreKit.h"

#define kMySubscriptionFeature @"sub1"

/*
 Shared Secret

 A shared secret is a unique code that you should use when you make the 
 call to our servers for your In-App Purchase receipts. 
 Without a shared secret, you will not be able to test auto-renewable 
 In-App Purchase subscriptions in the sandbox mode. 

 Also note that you will not be able to make them available 
 on the App Store.

 Note: Regardless of what app they are associated with, 
 all of your auto-renewable subscriptions will use this 
 same shared secret.
 */
#define sharedSecret @"PUTSHAREDSECRETHERE"


@interface ManageSubscriptionsVC : UIViewController
<SKProductsRequestDelegate, SKProductsRequestDelegate, SKPaymentTransactionObserver>
{
    SKProduct *proUpgradeProduct;
    SKProductsRequest *productsRequest;
}

- (void)requestProUpgradeProductData;

@end
Run Code Online (Sandbox Code Playgroud)

.m文件

//
//  ManageSubscriptionsVC.m

#import "ManageSubscriptionsVC.h"

@implementation ManageSubscriptionsVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title = @"Manage Subscriptions";


    if ([SKPaymentQueue canMakePayments])
    {
        // Display a store to the user.

        //[MKStoreManager sharedManager];
        //NSLog(@"purhcasable = %@", [[MKStoreManager sharedManager] purchasableObjectsDescription] );
        [self requestProUpgradeProductData];

    }
    else
    {
        // Warn the user that purchases are disabled.
        NSString *message = @"In-app purchases are disabled. Please review your settings";
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [alertView show];
        [alertView release];
    } // end if
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

#pragma mark - StoreKit Delegate

- (void) requestProductData
{
    NSLog(@"requestProductData");
    SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject:kMySubscriptionFeature]];
    request.delegate = self;
    [request start];
}

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
    NSLog(@"productsRequest");

    NSArray *myProduct = [[NSArray alloc] initWithArray:response.products];

    for(SKProduct *item in myProduct)
    {

        NSLog(@"Product title: %@" , item.localizedTitle);
        NSLog(@"Product description: %@" , item.localizedDescription);
        NSLog(@"Product price: %@" , item.price);
        NSLog(@"Product id: %@" , item.productIdentifier);


    }

    /*
    for(NSString *invalidProduct in response.invalidProductIdentifiers)
        NSLog(@"Problem in iTunes connect configuration for product: %@", invalidProduct);
    */

    for (NSString *invalidProductId in response.invalidProductIdentifiers)
    {
        NSLog(@"Problem in iTunes connect configuration for product: %@" , invalidProductId);
    }


    [myProduct release];

    // populate UI
    [request autorelease];
}

#pragma mark - PaymentQueue

-(void)paymentQueue:(SKPaymentQueue *)queue removedTransactions:(NSArray *)transactions
{
}

-(void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error
{
}

-(void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
}

-(void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
{
}

#pragma mark - Other


- (void)requestProUpgradeProductData
{
    NSSet *productIdentifiers = [NSSet setWithObject:kMySubscriptionFeature];
    productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
    productsRequest.delegate = self;
    [productsRequest start];

    // we will release the request object in the delegate callback
}





@end
Run Code Online (Sandbox Code Playgroud)