Edit: I'm not sure if anything in my first post is terribly relevant to the issue I'm having... maybe it'd be best to skip to my follow up post?
I'd like to make it so that users of my app can pay to remove an iAd banner from it.
There's a "Remove Ads" button just above the banner. Here's the code for when it's hit:
This object is the delegate for the purchase. Initially, my program would crash when it tried to run the next section, but checking the crash logs, I determined that the app store was sending back a response.products array that was empty. So I added a check to see how big the array is. If it's anything other than 1, it has to be an issue, right?
Now, rather than crash, my app always says that no such product exists (the message I programmed it to display if there's an issue with the array size.)
I've attached a screenshot of what iTunes Connect shows for In-App purchases in my app.
It says "Ready to Submit" as the status, but when I click on it, it takes me to a page where I can edit details on it, but the "Submit for Review" button is grayed out, for no apparent reason.
So, can anyone help me out here? What am I doing wrong? I can't imagine Apple actually wants me to submit the binary at this point, because it doesn't make any sense to not be able to test the In-App Purchase feature of my app until after I submit it, does it?
Edit: Before anyone asks, the 512x512 is just a dummy image. I haven't actually made an icon for my app yet.
I'd like to make it so that users of my app can pay to remove an iAd banner from it.
There's a "Remove Ads" button just above the banner. Here's the code for when it's hit:
Code:
-(IBAction)removeAds:(id)sender
{
if ([SKPaymentQueue canMakePayments])
{
SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject: @"findItFirstRemoveAds"]];
request.delegate = self;
[request start];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"In-App Purchases are Disabled"
message:@"The ads could not be removed because In-App Purchases are disabled on this device. To change this, go to your device Settings, choose General, then Restrictions, and enable In-App Purchases."
delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
alert.delegate = self;
[alert show];
[alert release];
}
}
This object is the delegate for the purchase. Initially, my program would crash when it tried to run the next section, but checking the crash logs, I determined that the app store was sending back a response.products array that was empty. So I added a check to see how big the array is. If it's anything other than 1, it has to be an issue, right?
Code:
#pragma mark - SKRequestDelegate
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
if ([response.products count] == 1)
{
SKProduct *adRemovalProduct = [response.products objectAtIndex:0];
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[numberFormatter setLocale:adRemovalProduct.priceLocale];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:adRemovalProduct.localizedTitle
message:[NSString stringWithFormat:@"%@ %@", adRemovalProduct.localizedDescription, [numberFormatter stringFromNumber:adRemovalProduct.price], nil]
delegate:self cancelButtonTitle:@"No Thanks" otherButtonTitles:@"Purchase", nil];
[alert show];
[alert release];
[numberFormatter release];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Such Product"
message:@"The product you attempted to purchase is not yet available on the App Store. The developer apologizes for any inconvience. Your account was not charged."
delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
[request autorelease];
}
Now, rather than crash, my app always says that no such product exists (the message I programmed it to display if there's an issue with the array size.)
I've attached a screenshot of what iTunes Connect shows for In-App purchases in my app.
It says "Ready to Submit" as the status, but when I click on it, it takes me to a page where I can edit details on it, but the "Submit for Review" button is grayed out, for no apparent reason.
So, can anyone help me out here? What am I doing wrong? I can't imagine Apple actually wants me to submit the binary at this point, because it doesn't make any sense to not be able to test the In-App Purchase feature of my app until after I submit it, does it?
Edit: Before anyone asks, the 512x512 is just a dummy image. I haven't actually made an icon for my app yet.
Attachments
Last edited: