Skip to content

Instantly share code, notes, and snippets.

@brianensorapps
Created May 9, 2011 02:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianensorapps/961954 to your computer and use it in GitHub Desktop.
Save brianensorapps/961954 to your computer and use it in GitHub Desktop.
BELinkHelper
//
// BELinkHelper.h
//
// Created by Brian Ensor on 5/8/11.
// Copyright 2011 Brian Ensor Apps. All rights reserved.
//
#import <Foundation/Foundation.h>
// Your ID in iTunes Connect
#define APP_ID @"349733798"
// Your developer name on the App Store lowercase and without spaces
#define DEVELOPER_NAME @"incognitek"
@interface BELinkHelper : NSObject
+ (void)showAllApps;
+ (void)showAppReviews;
+ (void)showAppWithID:(NSString *)appID;
@end
//
// BELinkHelper.m
//
// Created by Brian Ensor on 5/8/11.
// Copyright 2011 Brian Ensor Apps. All rights reserved.
//
#import "BELinkHelper.h"
@implementation BELinkHelper
+ (void)showAllApps {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"itms-apps://itunes.com/apps/%@", [DEVELOPER_NAME stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]]];
}
+ (void)showAppReviews {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", APP_ID]]];
}
+ (void)showAppWithID:(NSString *)appID {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%@", appID]]];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment