Skip to main content

bfgAppManager Class

Installing and launching other apps. More...#import <bfgAppManager.h>

Class Methods

(BOOL) + launchApp:
 
(BOOL) + launchApp:withParams:
 
(BOOL) + isAppInstalled:error:
 
(void) + launchStoreWithApp:
 
(BOOL) + openReferralURL:
 
(void) + cancelCurrentReferral
 

Detailed Description

Installing and launching other apps.

Method Documentation

◆ cancelCurrentReferral

+ (void) cancelCurrentReferral
Attempts to cancel the current referral URL that was started with openReferralURL:
Since
4.6

◆ isAppInstalled:error:

+ (BOOL) isAppInstalled: (NSString *) bundleIdentifier
error:(NSError *__autoreleasing *_Nullable) error 
Checks if an app is installed.
Since
4.6
Updated:\n 5.9
Parameters
bundleIdentifierBundle identifier of app to check. Example: @"com.bigfishgames.gamefinder"
errorWill return an error if the target app is not whitelisted. See LSApplicationQueriesSchemes
Return values
YESif the app is installed.
NOif the app is not installed.

◆ launchApp:

+ (BOOL) launchApp: (NSString *) bundleIdentifier
Launches an installed app.Will launch an app if it is installed on the device.
Since
4.6
Parameters
bundleIdentifierBundle identifier of app to launch. Example: @"com.bigfishgames.gamefinder"
Return values
YESif the app was successfully launched.
NOif the app is not installed.

◆ launchApp:withParams:

+ (BOOL) launchApp:(NSString *) bundleIdentifier
withParams:(NSString *_Nullable) parameterString 
Launches an installed app and passes a parameter string to the app.
Since
4.6
Parameters
bundleIdentifierBundle identifier of app to launch. Example: @"com.bigfishgames.gamefinder"
parameterStringParameter string that is passed to the app being launched. Example @"openGuide?index=5"
Return values
YESif the app was successfully launched.
NOif the app is not installed.

◆ launchStoreWithApp:

+ (void) launchStoreWithApp: (NSString *) appID
Presents app in the App Store for user to install.Presents a modal view of the App Store.
Since
4.6
Parameters
appIDApp's iTunes identifier. This number can be found at http://linkmaker.itunes.apple.com and is a string of numbers. For example, the iTunes identifier for the iBooks app is 364709193.

◆ openReferralURL:

+ (BOOL) openReferralURL: (NSURL *) url
Opens a referral link and presents the App Store view (iOS 6+) or switches to the App Store (iOS 5).A URL connection is made in the background and redirects are followed. When an App Store link is detected, the app ID is extracted and an App Store view is used to present the app in-game (iOS 6), or the user is switched to the App Store to view the app (iOS 5).
Since
4.6
Return values
YESif the URL connection has started successfully.
NOif the URL failed to start or the URL does not match one of the supported referral domains.