• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 14.0.8198.18
<GTLauncherViewControllerDelegate> Protocol Reference

Handler for events dispatched from the Launcher view controller. More...

#import <BlackBerryDynamics/GD/GTLauncherViewController.h>

Description

Launcher state changes and requests made by GTLauncherViewController are handled by creating a class that implements this protocol.

Instance Methods

(void) - completeAdditionalProcessingBeforeUploadingLogs:
 Called before logs start uploading. More...
 
(void) - launcherViewControllerWillOpen:
 Indicate that the Launcher view will be set to an open state. More...
 
(void) - launcherViewControllerWillClose:
 Indicate that the Launcher view will be set to a closed state. More...
 
(BOOL) - launcherViewController:shouldExecuteOpenHandler:atAddress:
 Allows the host application to perform additional work before exiting to an external application. More...
 
(void) - launcherViewController:didRequestGDAuthTokenForServerName:completion:
 Provide an authentication token to Launcher [Deprecated]. More...
 
(UITableViewController *_Nullable) - applicationSettingsTableViewControllerForLauncher:
 Provide custom application settings to be presented from Launcher. More...
 
(GTLCommonSettingsCellConfiguration *_Nullable) - commonSettingsCellConfigurationForType:launcherViewController:
 Customize the styling of common settings shown in the Launcher settings menu. More...
 
(UIViewController *) - launcherViewController:viewControllerForLauncherSectionLocation:
 Called when a user selects a Launcher Collection View Element provided by the host appliction. More...
 
(void) - launcherViewController:didSelectLocalActionWithLocation:
 A local quick action, such as compose email, or an web app. More...
 

Method Documentation

◆ completeAdditionalProcessingBeforeUploadingLogs:

- (void) completeAdditionalProcessingBeforeUploadingLogs: (void(^)(void))  completionHandler
optional

This method is called before logs start uploading and must call the completion when app is ready for logs to start uploading.

If provided this function must complete before logs start uploading

Parameters
completionHandlerwhich must be called to start upload. Failure to do so may hang the UI.

◆ launcherViewControllerWillOpen:

- (void) launcherViewControllerWillOpen: (GTLauncherViewController *)  controller
optional

This method is called when the the app is in an open state and the user manually taps on the Launcher or

-[GTLauncherViewController setOpen:animated:]

with YES as the first parameter is called.

Parameters
controllerGTLauncherViewController that is being opened.

◆ launcherViewControllerWillClose:

- (void) launcherViewControllerWillClose: (GTLauncherViewController *)  controller
optional

This method is called when the the app is in a closed state and the user manually taps on the Launcher or

-[GTLauncherViewController setOpen:animated:]

with NO as the first parameter is called.

Parameters
controllerGTLauncherViewController that is being closed.

◆ launcherViewController:shouldExecuteOpenHandler:atAddress:

- (BOOL) launcherViewController: (GTLauncherViewController *)  controller
shouldExecuteOpenHandler: (void(^)(void))  handler
atAddress: (NSString *)  address 
optional

Allows the host application to perform additional work before exiting to an external application. Certain Launcher actions, like selecting another Dynamics app or selecting a create action, requires flipping to another application. However, if the host application needs to perform additional action, such as present an alert, beforebeing sent to the background, the delegate can implement this method, retain a reference to the handler, and return NO. After the host application finishes its respective action, it can then execute the open handler.

If this method is not implemented, the default value is YES and the open handler is executed immediately.

Parameters
controllerGTLauncherViewController that is requesting to launch an external application.
handlerThe block of code that, when called, executes the appropriate open behavior.
addressNSString representing the address of the application being opened and fronted. Use this value in conjunction with
-[GDiOS getServiceProviders]
to get additional information of the application being opened.
Returns
YES if the launcher should perform the open behavior immediately. NO if the host application intends on retaining the open handler and executing it at a later time.

◆ launcherViewController:didRequestGDAuthTokenForServerName:completion:

- (void) launcherViewController: (GTLauncherViewController *)  controller
didRequestGDAuthTokenForServerName: (NSString *)  name
completion: ("This method will be removed in a future release.")  completion 
optional
Deprecated:
Will be removed in a future release. BlackBerry Dynamics Launcher now handles GDAuthToken management internally.

Provide an authentication token to Launcher.

GDUtility is actually a singleton class with regards to the behavior of its delegate. In other words, there can only be one for an application. Application that provide GTLHostGDAuthTokenManagement as a startup option must implement this delegate method so that Launcher can properly execute its various services.

Because the behavior of retrieving an auth token is asynchronous, a completion handler is provided that must be retained until a token is made available or an error occurs.

When requesting an auth token, nil and the name parameter should be used for the challenge string and server name parameters of

-[GDUtility getGDAuthToken:serverName:]

respectively.

Parameters
controllerGTLauncherViewController that is requesting an auth token.
nameNSString of the server name parameter to be provided to GDUtility when requesting an auth token.
completionThe block of code to be retained and executed when an GDAuthTokenDelegate method is called. In the event of a sucess, pass the NSString parameter provided in the callback. In the event of an error, pass nil.

◆ applicationSettingsTableViewControllerForLauncher:

- (UITableViewController * _Nullable) applicationSettingsTableViewControllerForLauncher: (GTLauncherViewController *)  controller
optional

The application settings table view controller to be presented from Launcher. The host application can provide its own settings table view controller that would be displayed upon the user selecting Settings from Launcher, along with Common settings provided by Launcher.

Note that the view controller being presented is not the one being returned but rather an internal context view controller which provides additional functionality to Launcher. The settings view controller is a child view controller of the context view controller and its bounds are set to the bounds of the context view controller. Thus, any setting of the modal presentation or transition style is ignored. Please exclude setting options offered by the Launcher Common settings section in the application table view controller.

If this method is not implemented, the Launcher Common settings view controller will be presented instead.

Parameters
controllerGTLauncherViewController that is requesting style for particular cell.
Returns
UITableViewController with the settings for the host application. Returning nil will cause the default behavior of having the Launcher Common settings view controller being displayed.

◆ commonSettingsCellConfigurationForType:launcherViewController:

- (GTLCommonSettingsCellConfiguration * _Nullable) commonSettingsCellConfigurationForType: (GTLCommonSettingsCellType)  cellType
launcherViewController: (GTLauncherViewController *)  controller 
optional

Host application can configure styles for the common settings section by returning GTLCommonSettingsCellConfiguration object. This includes the fonts, icons and colors.

If this method is not implemented, default style will be used.

See also
: GTLCommonSettingsCellConfiguration
: GTLCommonSettingsCellConfiguration::GTLCommonSettingsCellType
Parameters
cellTypeGTLCommonSettingsCellType type of table view cell that requests styling.
controllerGTLauncherViewController that is requesting style for particular table view cell.
Returns
GTLCommonSettingsCellConfiguration with the settings for the host application. Returning nil will cause the default behavior and default style to be applied.

◆ launcherViewController:viewControllerForLauncherSectionLocation:

- (UIViewController *) launcherViewController: (GTLauncherViewController *)  controller
viewControllerForLauncherSectionLocation: (NSString *)  location 
optional

Called when a user selects a Launcher Collection View element provided by the host application. An appropriate view controller for this element should be returned. Use the location parameter to determine what the appropriate view controller should be.

Parameters
controllerGTLauncherViewController that is requesting a view controller for given location
locationNSString id of element selected by user

◆ launcherViewController:didSelectLocalActionWithLocation:

- (void) launcherViewController: (GTLauncherViewController *)  controller
didSelectLocalActionWithLocation: (NSString *)  location 
optional

A local quick action, such as compose email, or an web app (for com.good.gdservice.open-url.http service providers) was selected. Only apps that have associated quick actions need to implement this.

Parameters
controllerGTLauncherViewController that is requesting a quick action for given location
locationNSString id of element selected by user

The documentation for this protocol was generated from the following file:
GDUtility
BlackBerry Dynamics utility for managing authentication tokens and identity.
Definition: GDUtility.h:127
GTLauncherViewController
This class represents the main application view controller class comprised of a floating Launcher but...
Definition: GTLauncherViewController.h:261
GDiOS
BlackBerry Dynamics Runtime object interface, including authorization.
Definition: GDiOS.h:272