问题描述
我已经检查了(热门付费应用程序)样本$ 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 :
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=12It 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中的应用程序列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!