ios 跳转appstore评论页面

iOS7以前是这样的:

  1.  NSString  * nsStringToOpen = [NSString  stringWithFormat: @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",nsAppId  ];  
  2.       
  3.     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:nsStringToOpen]]; 
iOS8以后那样是没有反应的,只能这样才行


找到应用程序的描述链接,比如:http://itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8

<code style="margin: 0px; padding: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">[[</span><span class="typ" style="margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(43, 145, 175); background-color: transparent;">UIApplication</span><span class="pln" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;"> sharedApplication</span><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">]</span><span class="pln" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;"> openURL</span><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">:[</span><span class="pln" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">NSURL </span><span class="typ" style="margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(43, 145, 175); background-color: transparent;">URLWithString</span><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">:@</span><span class="str" style="margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 0, 0); background-color: transparent;">"<span style="margin: 0px; padding: 0px; line-height: normal; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; white-space: normal;">itms://</span><a target=_blank href="http://itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8" style="color: rgb(59, 89, 153); text-decoration: none; margin: 0px; padding: 0px; font-family: Helvetica, Arial, sans-serif; line-height: normal; white-space: normal;">itunes.apple.com/gb/app/yi-dong-cai-bian/id391945719?mt=8</a>"</span><span class="pun" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent;">]];</span></code>

你可能感兴趣的:(ios,ipad,ios开发,appstore,UIApplication)