热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

在我的应用内展示并链接至AppStore中的应用列表-DisplayandLinktoMyAppsintheAppStoreWithinMyApplication

Ihavecheckedthe(TopPaidApps)samplecodefromApplewebsitewhereyoucanseeallthetopapps

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 :

我已经检查了Apple网站上的(Top Paid Apps)示例代码,您可以在App Store中查看所有顶级应用程序,我想在我的应用程序中执行相同的操作,但只在App Store中显示我的应用程序。这是我在该示例中找到的URL:

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?

我需要在此网址中更改哪些内容才能仅展示我的应用?

2 个解决方案

#1


17  

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

使用iOS 6中引入的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.

首先将StoreKit.framework添加到您的项目中。然后找到使用iTunes链接到您的应用的iTunes URL。您可以从iTunes Store复制链接。例如,Apple应用程序的URL是http://itunes.apple.com/de/artist/apple/id284417353?mt=12它包含您传递给SKStoreProductViewController的iTunes标识符。

Sample code:

#import "ViewController.h"
#import 

@interface ViewController ()
@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

#2


0  

You could use DAAppsViewController. It can be configured with a developer ID to show all the apps by that developer. It will use StoreKit if available, otherwise fallback to switching to the App Store.

您可以使用DAAppsViewController。可以使用开发者ID配置它以显示该开发人员的所有应用程序。如果可用,它将使用StoreKit,否则将回退到App Store。


推荐阅读
author-avatar
翟厉害
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有