Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending a user to gift an app from inside an app doesn't work anymore?

Up until a few days ago, the following URL handler to redirect a user for gifting an app worked:

  static NSString * const kAppStoreGiftURL = @"itms-appss://buy.itunes.apple.com/"
  "WebObjects/MZFinance.woa/wa/giftSongsWizard"
  "?gift=1&salableAdamId=%u&productType=C&pricingParameter=STDQ&mt=8&ign-mscache=1";

  NSString *url = [NSString stringWithFormat:kAppStoreGiftURL, kAppID];
  NSLog(@"Opening store with URL: %@", url);
  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];

However, it seems that right now this yields the following error message after openURL:

App store app after redirection

Gifting an app directly via the store is still available.

Did Apple disable this feature completely, or is there a new URL that mitigates this issue?

like image 702
StatusReport Avatar asked Dec 12 '13 08:12

StatusReport


1 Answers

The old Gift URL was undocumented and Apple has stopped supporting it now. I noticed it stopped working sometime in December 2013. To my knowledge, Apple has not given any public comment if it will ever be possible again.

I've resorted to using an alert view to instruct users about how to give a gift. There isn't much else you can do until Apple brings back this functionality.

// Gift app
UIAlertView *giftAlertView = [[UIAlertView alloc] initWithTitle:@"Gift this App" 
      message:@"Give a copy of this app as a gift?\n\nTap Share > 
           Gift\non the App Store page" 
      delegate:self 
      cancelButtonTitle:@"I'll think about it" 
      otherButtonTitles:@"OK", nil];
[giftAlertView show];
like image 139
Suedehead Avatar answered Nov 18 '22 03:11

Suedehead