Skip to main content
Version: 10.8.x

bfgAppManager Class

Static Public Member Functions

static bool launchApp (string bundleIdentifier)
 Launches an installed app. More...
 
static bool launchAppWithParams (string bundleIdentifier, string parameterString)
 Launches an installed app and passes a parameter string to the app. More...
 
static bool isAppInstalled (string bundleIdentifier)
 Checks if an app is installed. More...
 
static void launchStoreWithApp (string appID)
 Presents app in the App Store for user to install. More...
 
static bool openReferralURL (string url)
 Opens a referral link and presents the App Store view (iOS 6+) or switches to the App Store (iOS 5). More...
 
static void cancelCurrentReferral ()
 Attempts to cancel the current referral URL that was started with openReferralURL(string):
 

Member Function Documentation

◆ isAppInstalled()

static bool BFGSDK.bfgAppManager.isAppInstalled (string bundleIdentifier)
inlinestatic
Checks if an app is installed.
Parameters
bundleIdentifierBundle identifier of app to check.
Returns
Will return an error if the target app is not whitelisted. See LSApplicationQueriesSchemes

◆ launchApp()

static bool BFGSDK.bfgAppManager.launchApp (string bundleIdentifier)
inlinestatic
Launches an installed app. Will launch an app if it is installed on the device.
Parameters
bundleIdentifierBundle identifier of app to launch.
Returns
true if the app was successfully launched. false if the app is not installed.

◆ launchAppWithParams()

static bool BFGSDK.bfgAppManager.launchAppWithParams (string bundleIdentifier,
string parameterString 
)
inlinestatic
Launches an installed app and passes a parameter string to the app.
Parameters
bundleIdentifierBundle identifier of app to launch.
parameterStringParameter string that is passed to the app being launched.
Returns
true if the app was successfully launched. false if the app is not installed.

◆ launchStoreWithApp()

static void BFGSDK.bfgAppManager.launchStoreWithApp (string appID)
inlinestatic
Presents app in the App Store for user to install.
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()

static bool BFGSDK.bfgAppManager.openReferralURL (string url)
inlinestatic
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).
Parameters
urlThe URL to connect to.
Returns
true if the URL connection has started successfully. false if the URL failed to start or the URL does not match one of the supported referral domains.