Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

in app purchase - I am getting error while requesting products from App Store for IAP

In IOS6, I was successfully making in-app purchases in my app.

I downloaded IOS/ and Xcode 5 Beta and tried to open the same project.

My code to get products from app store is:

- (void)requestProductsWithIdentifiers:(NSSet*)identifiers
{
        @synchronized(self)
    {
            DebugLog(@"requesting products with identifiers: %@", identifiers);

            self.productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:identifiers] ;
            self.productsRequest.delegate = self;
            [self.productsRequest start];
    }
}

But it returns an error:

[IAPHelper request:didFailWithError:](114): request did fail with error: <SKProductsRequest: 0xb846a10> / Error Domain=SSErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo=0xb846b10 {NSLocalizedDescription=Cannot connect to iTunes Store}

Where can be the problem?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Apple blocked testing in-app purchases...

Here is the link to the release notes https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW578

See: iOS Simulator section

StoreKit (In-App purchases) will not work in the Simulator. 13962338

Very sad...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...