ios – 发送用户从应用程序内赠送应用程序不再工作了吗?

直到前几天,以下URL处理程序重定向用户才能使应用程序工作:
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]];

然而,现在看来,在openURL之后会产生以下错误消息:

通过商店直接赠送应用程序仍然可用.

苹果是否完全禁用此功能,还是有一个可以减轻此问题的新网址?

解决方法

旧的礼物网址没有文件,苹果现在已经停止支持.我注意到,在2013年12月的某个时候,它停止了工作.据我所知,如果再次可能,苹果公司没有发表任何公开评论.

我已经诉诸使用警报视图来指示用户如何赠送礼物.除非苹果带回这个功能,否则还没有太多的其他功能.

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

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...