10
votes

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?

2
Can you post the link to the sample?alexandresoli
it looks that the sample code is not available any more, i can email it to you if you want.4slices
the (updated) sample code is available here developer.apple.com/library/ios/#samplecode/LazyTableImagesFelix

2 Answers

22
votes

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

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.

Sample 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
0
votes

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.