我的应用程序中打开我在App Store中的应用程序列表 [英] Open a list of my apps in the App Store within my App

查看:160
本文介绍了我的应用程序中打开我在App Store中的应用程序列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经检查了(热门付费应用程序)样本$ C $从苹果网站C,你可以看到在App Store中所有顶级的应用程序,我想这样做在我的应用程序,但只显示我的应用程序应用商店。这里是我的样品中找到的网址:

I have checked the (Top Paid Apps) sample code from Apple website where you can see all the top apps in the App store, I want to do the same in my app but to show only my apps in the App Store. Here is the URL which i found in that sample :

<一个href=\"http://phobos.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/limit=75/xml\">http://phobos.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/limit=75/xml

什么我需要在这个网址更改为只显示我的应用程序?

What do I need to change in this URL to show only my Apps?

推荐答案

这是pretty容易与 SKStoreProductViewController 在IOS 6中引入随着用户能够买到在应用程序中就在您的其他应用程序。

This is pretty easy with the SKStoreProductViewController introduced in iOS 6. With that users can buy your other apps right within the application.

首先添加StoreKit.framework到项目中。然后找到链接到使用iTunes您的应用程序iTunes的URL。您可以复制从iTunes Store的链接。例如,对于苹果的应用程序的URL是<一个href=\"http://itunes.apple.com/de/artist/apple/id284417353?mt=12\">http://itunes.apple.com/de/artist/apple/id284417353?mt=12
它包含iTunes的标识,你传递给 SKStoreProductViewController

First add StoreKit.framework to your project. Then find the iTunes URL that links to your apps using iTunes. You can copy the link from the iTunes Store. For example the URL for the Apple apps is http://itunes.apple.com/de/artist/apple/id284417353?mt=12 It contains the iTunes identifier, that you pass to the SKStoreProductViewController.

样code:

#import "ViewController.h"
#import <StoreKit/SKStoreProductViewController.h>

@interface ViewController ()<SKStoreProductViewControllerDelegate>
@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self showMyApps];
}

-(void)showMyApps
{
    SKStoreProductViewController* spvc = [[SKStoreProductViewController alloc] init];
    [spvc loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier : @284417353}
                    completionBlock:nil];
    spvc.delegate = self;
    [self presentViewController:spvc animated:YES completion:nil];

}

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

@end

这篇关于我的应用程序中打开我在App Store中的应用程序列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆