Skip to content

Instantly share code, notes, and snippets.

@odrobnik
Created November 25, 2011 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odrobnik/1393523 to your computer and use it in GitHub Desktop.
Save odrobnik/1393523 to your computer and use it in GitHub Desktop.
//
// NSURL+DTAppLinks.h
// DTFoundation
//
// Created by Oliver Drobnik on 11/25/11.
// Copyright (c) 2011 Cocoanetics. All rights reserved.
//
/** A collection of category extensions for `NSURL` that provide direct access to built-in app capabilites.
For example: Open the app store on the page for the app
NSURL *appURL = [NSURL appStoreURLforApplicationIdentifier:@"463623298"];
[[UIApplication sharedApplication] openURL:appURL];
*/
@interface NSURL (DTAppLinks)
///---------------------------------------------------------------------------------------
/** @name App Store */
///---------------------------------------------------------------------------------------
/** Formats the passed number as a byte value in Megabytes (MB), Kilobytes (KB) or Bytes (B).
@param identifier The application identifier that gets assigned to a new app when you add it to iTunes Connect.
@return Returns the URL to the direct app store link
*/
+ (NSURL *)appStoreURLforApplicationIdentifier:(NSString *)identifier;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment