2011-10-27 28 views
18

Đây là câu hỏi tiếp theo cho "In app purchases with MKStoreKit failing: “Problem in iTunes connect configuration for product: xxx"Giải quyết vấn đề về id sản phẩm không hợp lệ với mua hàng trong ứng dụng?

Tôi gặp vấn đề tương tự và đã cố gắng thực hiện cả hai có và không có MKStoreKit và nhận được thông báo tương tự.

Kiểm tra danh sách

Với nhờ: http://troybrant.net/blog/2010/01/invalid-product-ids/

Bạn đã kích hoạt trong ứng dụng mua cho App ID của bạn?

YES

Bạn đã kiểm tra dọn dẹp cần Bán cho sản phẩm của bạn?

YES

Có bạn đã gửi (và tùy chọn từ chối) nhị phân ứng dụng của bạn?

YES

Liệu ID Bundle plist của dự án của bạn khớp với ID App của bạn?

YES

Bạn đã tạo ra và cài đặt một cấp phép hồ sơ mới cho App ID mới?

YES

Bạn đã cấu hình dự án của bạn để dấu mã sử dụng cấp phép hồ sơ mới này?

YES

Bạn đang xây dựng cho iPhone OS 3.0 hoặc cao hơn?

CÓ. iOS4.2 trở lên.

Bạn có đang sử dụng ID sản phẩm đầy đủ khi tạo SKProductRequest không?

CÓ. Cũng chỉ bản thân ID sản phẩm không có miền ngược

Bạn đã đợi vài giờ kể từ khi thêm sản phẩm của mình vào iTunes Connect chưa?

CÓ. Nó nói "Đang chờ xem xét" và đã thực hiện trong 4-5 ngày qua

Chi tiết ngân hàng của bạn có hoạt động trên iTunes Connect không?

KHÔNG. Đây là một dự án khách hàng và tôi chỉ đang thử nghiệm xem nó có đang hoạt động hay không. Tôi có cần chi tiết ngân hàng để kiểm tra không?

EDIT: Tôi đã thay đổi điều này ngay bây giờ. Nhưng tôi không thấy lý do tại sao tôi cần phải làm điều này chỉ để kiểm tra hộp cát.

Bạn đã thử xóa ứng dụng khỏi thiết bị và cài đặt lại chưa?

YES

là thiết bị của bạn jailbroken?

NO


App ký hiệu là đúng

Một số ví dụ tôi đã thấy sử dụng ký hiệu này: com.domain.APP_ID.PRODUCT_TO_BUY

Nhưng những người khác sử dụng com. domain.PRODUCT_TO_BUY

Điều gì là đúng?

Trong mã của tôi, tôi đã cố gắng sử dụng ký pháp đầy đủ và chỉ ID sản phẩm nhưng vẫn gặp phải cùng một vấn đề về "Id sản phẩm không hợp lệ".

Developer từ chối

App Bundle (Hủy bỏ) là trên iTunes Connect và tôi đã "phát triển từ chối" bó.

Ảnh: App developer rejected

Chờ đợi để xem xét?

Trong giao dịch mua hàng trong ứng dụng của tôi, tôi có 1 sản phẩm, đăng ký tự động gia hạn. Nó được xóa để bán; tuy nhiên, đó là "Đang chờ xem xét" và không được chiếu sáng.

Ảnh:

waiting for review

tôi tạo này gần như 4-5 ngày trước và nó vẫn gắn cờ là "Chờ đợi để xem xét" ??

Tôi tự hỏi liệu ứng dụng của mình có bị "nhà phát triển từ chối" cho dù điều này có tác động đến "Đang chờ xem xét" đối với đăng ký tự động gia hạn không?

Tôi chưa thay đổi gì trong mục này.

Theo các bài viết khác nhau, tôi phải đợi 24-48 giờ trước khi tôi có thể sử dụng?

Nhưng tôi có cần phải đợi điều này được chấp nhận hoặc chiếu sáng màu xanh lá cây trước khi tôi có thể sử dụng nó trong thử nghiệm của mình không?

Chi tiết ngân hàng

tôi đã không điền vào bất kỳ chi tiết ngân hàng vì đây là một ứng dụng cho một khách hàng - Tôi có cần phải điền vào chi tiết ngân hàng trước khi tôi có thể tiếp tục thử nghiệm nó?

Theo các tài liệu sau: http://developer.apple.com/library/ios/#technotes/tn2259/_index.html chi tiết ngân hàng là bắt buộc?

Tôi có cần đăng nhập vào iTunes trên thiết bị của mình trong tài khoản thử nghiệm trước khi chạy ứng dụng không?

Tôi tự hỏi nếu ai đó có thể làm rõ những vấn đề này? Có lẽ nó chỉ đơn giản như chờ đợi cho việc mua trong ứng dụng được "xanh thắp sáng", hoặc có lẽ tôi đã bỏ lỡ một bước?

Lưu ý: Điều này xảy ra bất kể tôi có sử dụng MKStoreKit hay sử dụng mã sau đây.

Cảm ơn.

Mã của tôi (đây là phiên bản không 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]; 
} 

Edit:

Là một failsafe, tôi đã thêm chi tiết ngân hàng chỉ trong trường hợp, nhưng tôi không hiểu tại sao điều này sẽ gây ra vấn đề.

Tôi cũng đảm bảo rằng tôi đã tải lên và từ chối gói phát hành ứng dụng và không phải gói quảng cáo; mặc dù tôi không biết nếu điều này làm cho bất kỳ sự khác biệt.

Trả lời

6

Tôi nghĩ tôi đã thực hiện nó ngay bây giờ. Tôi sẽ chạy một số xét nghiệm để đảm bảo.

Điều này sẽ không được chấp nhận; Tôi đang chạy một số thử nghiệm với các khung công cụ lưu trữ khác nhau.

đầu ra của tôi:

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 

Đây là những gì tôi đã làm.

  1. Tôi đã thêm chi tiết ngân hàng của mình. Tôi vẫn không nghĩ rằng điều này có bất cứ điều gì để làm với nó mặc dù.

  2. Lưu ý. Mua trong ứng dụng của ứng dụng vẫn là "Đang chờ xem xét" và tôi đã nhận được kết quả ở trên.

  3. tôi thay thế:

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

với:

#define kMySubscriptionFeature @"sub1" 

Tôi sẽ chạy một số xét nghiệm với MKStoreKit và với các khuôn khổ khác để xem nếu nó là okay.

Mã tôi đã sử dụng được dưới đây, thay đổi nội dung vì lý do an ninh:

.h tập tin

// 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 

tập tin .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 
11

Sau 2 ngày chờ đợi, id ứng dụng mới, hồ sơ, v.v. điều này đã sửa nó cho tôi ..

Tại sao các tài liệu nói để sử dụng cú pháp com.iap.isrubbish đầy đủ?

Nhờ sự giúp đỡ của bạn

tôi thay thế:

xác định kMySubscriptionFeature @ "uk.co.somesite.someapp.sub1"

với:

xác định kMySubscriptionFeature @ "Sub1 "

+0

Đây là bước cuối cùng tôi cần. Cảm ơn –

+0

Man, bạn đã thực hiện một ngày của tôi. Tôi nợ bạn bia :) –

+0

WOW ... Tôi đã dành cả tuần để tìm kiếm một sai lầm. Tôi đã xóa 2 gói, tạo các nhóm mới, đã thực hiện rất nhiều nghiên cứu chỉ để tìm ra điều này. Và nó đã làm việc ... Tôi chỉ muốn ôm cả hai bạn. : D –

1

Tôi vừa phát hiện ra tha t Tôi đổi tên ID sản phẩm và tên tham chiếu khi tôi tạo mua hàng trong ứng dụng, vì vậy trong trường hợp của tôi, tôi đã sử dụng chuỗi sai để thử và tìm Sản phẩm ... Khó phát hiện.

1

Tôi đã thử nghiệm phiên bản mới nhất của ứng dụng hiện có, đầy đủ chức năng với tính năng mua ứng dụng để đảm bảo chức năng vẫn hoạt động như mong đợi, khi tôi bắt đầu thấy sự cố trong iTunes kết nối tin nhắn. Vấn đề của tôi là (tôi quên) rằng MKStoreKit đã lưu trữ thực tế của việc mua trên keychain của các thiết bị khác nhau của tôi, vì vậy mặc dù tôi đã sử dụng tài khoản người dùng mới, keychain của tôi đã đăng ký thiết bị như đã mua. [self removeAllKeychainData] từ trong MKStoreManager đã khắc phục sự cố. Hy vọng điều này sẽ giúp một số người thất vọng.

0

Vấn đề của tôi là, tôi đã đăng nhập trên thiết bị bằng id táo thực. Sau đó đăng xuất (Iphone-> Cài đặt -> App Store -> ID của tôi-> Đăng xuất) Sau đó triển khai lại và làm việc hiệu quả.

Cảm ơn mọi người trên web.

Các vấn đề liên quan