• app 评分的两种方法


    给app进行评分有两种方法:都是直接跳到app store 给app进行评分的,具体请看下文:

    1.App Store 上评论的链接地址是 ://(1)itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id = appID 替换成:

    itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=appID在iOS7上就行了!

                                                         (2)itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?mt=8&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software&id=appID 替换成 :

    itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?mt=8&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software&id=appID

    具体代码如下:

    [[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?mt=8&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software&id=appID"]];

    2.在用户给我们的app评分的时候,一般情况下我们都需要跳转到app store,很不方便。在iOS6以后,引入了

    SKStoreProductViewController类,可以在应用内展示App Store,用户可以不用离开应用,直接给我们的应用评分或者展示其他的app信息。

           在应用内展示AppStore,需要给项目添加StoreKit.frame. SKStoreProductViewController存在StoreKit框架内。代码如下:

    #pragma mark - 应用内评论
    - (void)openAppStore
    {
        SKStoreProductViewController * storeProductViewController = [[SKStoreProductViewController alloc] init];
        [storeProductViewController setDelegate:self];
        [storeProductViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier:@"appID"} completionBlock:^(BOOL result, NSError *error) {
            
            if(error) {
                
                NSLog(@"Error %@ with user info %@",error,[error userInfo]);
                
            } else {
                
                [self presentViewController:storeProductViewController animated:YES completion:nil];
            }
        }];

        [storeProductViewController release];

    }

    #pragma mark - SKStoreProductViewControllerDelegate

    -(void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
    {
        [self dismissViewControllerAnimated:YES completion:nil];
    }

  • 相关阅读:
    [Unity3D]调用Android接口
    android studio build.gradle中 project.ANDROID_BUILD_SDK_VERSION
    java中static{}语句块详解
    [Android][Android Studio] *.jar 与 *.aar 的生成与*.aar导入项目方法
    c++中 extern
    android studio一直卡在Gradle:Executing tasks
    Android Studio导入第三方类库的方法
    Android按返回键退出程序但不销毁,程序后台运行,同QQ退出处理方式
    Ubuntu64位下使用eclipse闪退的解决
    Android4.1中BinderService的作用
  • 原文地址:https://www.cnblogs.com/tianlin106/p/3777810.html
Copyright © 2020-2023  润新知