Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.