RBAppDelegateObserver Protocol Reference

Conforms to NSObject
Declared in RBAppDelegate.h

Overview

An application-delegate observer. These can be registered with RBAppDelegate to provide application-delegate functionality.

– applicationDidFinishLaunching

This event is raised when the application has finished launching.

- (void)applicationDidFinishLaunching

Discussion

This event is raised when the application has finished launching.

Declared In

RBAppDelegate.h

– applicationWillFinishLaunchingWithOptions:

This event is raised when the application is about to finish launching.

- (BOOL)applicationWillFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions

Parameters

launchOptions

A dictionary of launch options.

Return Value

Whether the tasks performed in the handler were successful.

Discussion

This event is raised when the application is about to finish launching.

Declared In

RBAppDelegate.h

– applicationDidFinishLaunchingWithOptions:

This event is raised when the application has finished launching.

- (BOOL)applicationDidFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions

Parameters

launchOptions

A dictionary of launch options.

Return Value

Whether the tasks performed in the handler were successful.

Discussion

This event is raised when the application has finished launching.

Declared In

RBAppDelegate.h

– applicationDidBecomeActive

This event is raised when the application has been entered the active state.

- (void)applicationDidBecomeActive

Discussion

This event is raised when the application has been entered the active state.

Declared In

RBAppDelegate.h

– applicationWillResignActive

This event is raised when the application is about to exit the active state. For example when the user switches to another application.

- (void)applicationWillResignActive

Discussion

This event is raised when the application is about to exit the active state. For example when the user switches to another application.

Declared In

RBAppDelegate.h

– applicationHandleOpenURL:

This function is called to determine whether this application will handle a given URL.

- (BOOL)applicationHandleOpenURL:(nonnull NSURL *)url

Parameters

url

The URL that has been opened on the device.

Return Value

Whether this application should handle the given URL.

Discussion

This function is called to determine whether this application will handle a given URL.

Declared In

RBAppDelegate.h

– applicationOpenURL:sourceApplication:annotation:

This event is raised to allow the application to handle a URL open event.

- (BOOL)applicationOpenURL:(nonnull NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(nonnull id)annotation

Parameters

url

The URL that has been opened on the device and should be handled.

sourceApplication

The identifier of the application that opened this URL.

annotation

The annotation to the event, if any.

Return Value

true if the handling of this URL was successful.

Discussion

This event is raised to allow the application to handle a URL open event.

Declared In

RBAppDelegate.h

– applicationOpenURL:options:

This event is raised to allow the application to handle a URL open event.

- (BOOL)applicationOpenURL:(nonnull NSURL *)url options:(nonnull NSDictionary<NSString*,id> *)options

Parameters

url

The URL that has been opened on the device and should be handled.

options

The passed options.

Return Value

true if the handling of this URL was successful.

Discussion

This event is raised to allow the application to handle a URL open event.

Declared In

RBAppDelegate.h

– applicationDidReceiveMemoryWarning

This event is raised when the application has received a memory warning and should reduce it’s memory footprint as much as is safe.

- (void)applicationDidReceiveMemoryWarning

Discussion

This event is raised when the application has received a memory warning and should reduce it’s memory footprint as much as is safe.

Declared In

RBAppDelegate.h

– applicationWillTerminate

This event is raised when the application is about to terminate, which occurs for example when the user swipes to kill the application.

- (void)applicationWillTerminate

Discussion

This event is raised when the application is about to terminate, which occurs for example when the user swipes to kill the application.

Declared In

RBAppDelegate.h

– applicationSignificantTimeChange

This event is raised when there has been a significant time change. For example the arrival of midnight or a timezone change.

- (void)applicationSignificantTimeChange

Discussion

This event is raised when there has been a significant time change. For example the arrival of midnight or a timezone change.

Declared In

RBAppDelegate.h

– applicationWillChangeStatusBarOrientation:duration:

This event is raised when the application is about to change the orientation of the status bar.

- (void)applicationWillChangeStatusBarOrientation:(UIInterfaceOrientation)newStatusBarOrientation duration:(NSTimeInterval)duration

Parameters

newStatusBarOrientation

The new orientation that the status bar will transition to.

duration

The time duration that the animation will occur over.

Discussion

This event is raised when the application is about to change the orientation of the status bar.

Declared In

RBAppDelegate.h

– applicationDidChangeStatusBarOrientation:

This event is raised when the application has changed the orientation of the status bar.

- (void)applicationDidChangeStatusBarOrientation:(UIInterfaceOrientation)oldStatusBarOrientation

Parameters

oldStatusBarOrientation

The orientation that the status bar did transition from.

Discussion

This event is raised when the application has changed the orientation of the status bar.

Declared In

RBAppDelegate.h

– applicationWillChangeStatusBarFrame:

This event is raised when the application is about to change the frame of the status bar.

- (void)applicationWillChangeStatusBarFrame:(CGRect)newStatusBarFrame

Parameters

newStatusBarFrame

The new frame that the status bar will transition to.

Discussion

This event is raised when the application is about to change the frame of the status bar.

Declared In

RBAppDelegate.h

– applicationDidChangeStatusBarFrame:

This event is raised when the application has changed the frame of the status bar.

- (void)applicationDidChangeStatusBarFrame:(CGRect)oldStatusBarFrame

Parameters

oldStatusBarFrame

The frame that the status bar did transition from.

Discussion

This event is raised when the application has changed the frame of the status bar.

Declared In

RBAppDelegate.h

– applicationDidRegisterUserNotificationSettings:

Called when the application has registered a new user notification.

- (void)applicationDidRegisterUserNotificationSettings:(nonnull UIUserNotificationSettings *)notificationSettings

Parameters

notificationSettings

The settings of the user notification that was registered.

Discussion

Called when the application has registered a new user notification.

Declared In

RBAppDelegate.h

– applicationDidRegisterForRemoteNotificationsWithDeviceToken:

Called when the application has registered for remote notifications from devices with the given token.

- (void)applicationDidRegisterForRemoteNotificationsWithDeviceToken:(nonnull NSData *)deviceToken

Parameters

deviceToken

The device token that the application has registered for.

Discussion

Called when the application has registered for remote notifications from devices with the given token.

Declared In

RBAppDelegate.h

– applicationDidFailToRegisterForRemoteNotificationsWithError:

Called when the application has failed to register for remote notifications.

- (void)applicationDidFailToRegisterForRemoteNotificationsWithError:(nonnull NSError *)error

Parameters

error

The error that occurred.

Discussion

Called when the application has failed to register for remote notifications.

Declared In

RBAppDelegate.h

– applicationDidReceiveRemoteNotification:

Called when the application has received a remote notification.

- (void)applicationDidReceiveRemoteNotification:(nonnull NSDictionary *)userInfo

Parameters

userInfo

The user information for the remote notification that was received.

Discussion

Called when the application has received a remote notification.

Declared In

RBAppDelegate.h

– applicationDidReceiveLocalNotification:

Called when the application has received a local notification.

- (void)applicationDidReceiveLocalNotification:(nonnull UILocalNotification *)notification

Parameters

notification

The UILocalNotification object.

Discussion

Called when the application has received a local notification.

Declared In

RBAppDelegate.h

– applicationHandleActionWithIdentifier:forLocalNotification:completionHandler:

Called when the application needs to handle an action with the given identifier for a local notification.

- (void)applicationHandleActionWithIdentifier:(nullable NSString *)identifier forLocalNotification:(nonnull UILocalNotification *)notification completionHandler:(nonnull dispatch_block_t)completionHandler

Parameters

identifier

The identifier of the action to be performed.

notification

The local notification that the action belongs to.

completionHandler

The completion block to be called when the action has been performed.

Discussion

Called when the application needs to handle an action with the given identifier for a local notification.

Declared In

RBAppDelegate.h

– applicationHandleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:

Called when the application needs to handle an action with the given identifier for a local notification.

- (void)applicationHandleActionWithIdentifier:(nullable NSString *)identifier forLocalNotification:(nonnull UILocalNotification *)notification withResponseInfo:(nonnull NSDictionary *)responseInfo completionHandler:(nonnull dispatch_block_t)completionHandler

Parameters

identifier

The identifier of the action to be performed.

notification

The local notification that the action belongs to. belongs to.

responseInfo

The response info.

completionHandler

The completion block to be called when the action has been performed.

Discussion

Called when the application needs to handle an action with the given identifier for a local notification.

Declared In

RBAppDelegate.h

– applicationHandleActionWithIdentifier:forRemoteNotification:completionHandler:

Called when the application needs to handle an action with the given identifier for a remote notification.

- (void)applicationHandleActionWithIdentifier:(nullable NSString *)identifier forRemoteNotification:(nonnull NSDictionary *)userInfo completionHandler:(nonnull dispatch_block_t)completionHandler

Parameters

identifier

The identifier of the action to be performed.

userInfo

The user information of the remote notification that the action belongs to.

completionHandler

The completion block to be called when the action has been performed.

Discussion

Called when the application needs to handle an action with the given identifier for a remote notification.

Declared In

RBAppDelegate.h

– applicationHandleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:

Called when the application needs to handle an action with the given identifier for a remote notification.

- (void)applicationHandleActionWithIdentifier:(nullable NSString *)identifier forRemoteNotification:(nonnull NSDictionary *)userInfo withResponseInfo:(nonnull NSDictionary *)responseInfo completionHandler:(nonnull dispatch_block_t)completionHandler

Parameters

identifier

The identifier of the action to be performed.

userInfo

The user information of the remote notification that the action belongs to.

responseInfo

The response info.

completionHandler

The completion block to be called when the action has been performed.

Discussion

Called when the application needs to handle an action with the given identifier for a remote notification.

Declared In

RBAppDelegate.h

– applicationDidReceiveRemoteNotification:fetchCompletionHandler:

Called when the application has received a remote notification.

- (void)applicationDidReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler

Parameters

userInfo

The user information of the remote notification that was received.

completionHandler

The completion block to call when the notification has been processed.

Discussion

Called when the application has received a remote notification.

Declared In

RBAppDelegate.h

– applicationPerformFetchWithCompletionHandler:

Called when the application needs to perform a fetch.

- (void)applicationPerformFetchWithCompletionHandler:(nonnull void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler

Parameters

completionHandler

The completion block to call when the fetch is complete.

Discussion

Called when the application needs to perform a fetch.

Declared In

RBAppDelegate.h

– applicationPerformActionForShortcutItem:completionHandler:

Called when a user selects your application from a shortcut on the homescreen.

- (void)applicationPerformActionForShortcutItem:(nonnull UIApplicationShortcutItem *)shortcutItem completionHandler:(nonnull void ( ^ ) ( BOOL succeeded ))completionHandler

Parameters

shortcutItem

The shortcut item that was selected.

completionHandler

The completion block to call when action has been performed.

Discussion

Called when a user selects your application from a shortcut on the homescreen.

Declared In

RBAppDelegate.h

– applicationHandleEventsForBackgroundURLSession:completionHandler:

Called when the application should handle events for a background URL session.

- (void)applicationHandleEventsForBackgroundURLSession:(nonnull NSString *)identifier completionHandler:(nonnull dispatch_block_t)completionHandler

Parameters

identifier

The identifier of the background URL session.

completionHandler

The completion block to call when the events have been handled.

Discussion

Called when the application should handle events for a background URL session.

Declared In

RBAppDelegate.h

– applicationHandleWatchKitExtensionRequest:reply:

Called when the application should handle a watch kit extension request.

- (void)applicationHandleWatchKitExtensionRequest:(nullable NSDictionary *)userInfo reply:(nonnull void ( ^ ) ( NSDictionary *__nullable replyInfo ))reply

Parameters

userInfo

The user info.

reply

The reply block.

Discussion

Called when the application should handle a watch kit extension request.

Declared In

RBAppDelegate.h

– applicationShouldRequestHealthAuthorization

Called when a health kit request is made.

- (void)applicationShouldRequestHealthAuthorization

Discussion

Called when a health kit request is made.

Declared In

RBAppDelegate.h

– applicationDidEnterBackground

Called when the application has entered the background and the user is no longer directly interacting with the app.

- (void)applicationDidEnterBackground

Discussion

Called when the application has entered the background and the user is no longer directly interacting with the app.

Declared In

RBAppDelegate.h

– applicationWillEnterForeground

Called when the application is about to enter the foreground for use by the user.

- (void)applicationWillEnterForeground

Discussion

Called when the application is about to enter the foreground for use by the user.

Declared In

RBAppDelegate.h

– applicationProtectedDataWillBecomeUnavailable

Called when the application will lose access to protected data.

- (void)applicationProtectedDataWillBecomeUnavailable

Discussion

Called when the application will lose access to protected data.

Declared In

RBAppDelegate.h

– applicationProtectedDataDidBecomeAvailable

Called when the application will gain access to protected data.

- (void)applicationProtectedDataDidBecomeAvailable

Discussion

Called when the application will gain access to protected data.

Declared In

RBAppDelegate.h

– applicationSupportedInterfaceOrientationsForWindow:

Called to determine which interface orientations the application supports for the given window.

- (NSUInteger)applicationSupportedInterfaceOrientationsForWindow:(nullable UIWindow *)window

Parameters

window

The UIWindow object.

Return Value

A mask of the supported interface orientations.

Discussion

Called to determine which interface orientations the application supports for the given window.

Declared In

RBAppDelegate.h

– applicationShouldAllowExtensionPointIdentifier:

Called to determine whether the application should allow the extension point identifier given.

- (BOOL)applicationShouldAllowExtensionPointIdentifier:(nonnull NSString *)extensionPointIdentifier

Parameters

extensionPointIdentifier

The extension point identifier string.

Return Value

Whether or not permission is granted.

Discussion

Called to determine whether the application should allow the extension point identifier given.

Declared In

RBAppDelegate.h

– applicationViewControllerWithRestorationIdentifierPath:coder:

Called to restore the UIViewController object using the given restoration identifier path.

- (nullable UIViewController *)applicationViewControllerWithRestorationIdentifierPath:(nonnull NSArray *)identifierComponents coder:(nonnull NSCoder *)coder

Parameters

identifierComponents

The components of the restoration identifier path.

coder

The NSCoder object.

Return Value

The restored UIViewController object.

Discussion

Called to restore the UIViewController object using the given restoration identifier path.

Declared In

RBAppDelegate.h

– applicationShouldSaveApplicationState:

Called to determine whether the application should save it’s application state.

- (BOOL)applicationShouldSaveApplicationState:(nonnull NSCoder *)coder

Parameters

coder

The NSCoder object.

Return Value

Whether or not to save the application state.

Discussion

Called to determine whether the application should save it’s application state.

Declared In

RBAppDelegate.h

– applicationShouldRestoreApplicationState:

Called to determine whether the application should restore it’s application state.

- (BOOL)applicationShouldRestoreApplicationState:(nonnull NSCoder *)coder

Parameters

coder

The NSCoder object.

Return Value

Whether or not to restore the application state.

Discussion

Called to determine whether the application should restore it’s application state.

Declared In

RBAppDelegate.h

– applicationWillEncodeRestorableStateWithCoder:

Called when the application will encode/serialise it’s restorable application state with the given coder.

- (void)applicationWillEncodeRestorableStateWithCoder:(nonnull NSCoder *)coder

Parameters

coder

The NSCoder object.

Discussion

Called when the application will encode/serialise it’s restorable application state with the given coder.

Declared In

RBAppDelegate.h

– applicationDidDecodeRestorableStateWithCoder:

Called when the application has encoded/serialised it’s restorable application state with the given coder.

- (void)applicationDidDecodeRestorableStateWithCoder:(nonnull NSCoder *)coder

Parameters

coder

The NSCoder object.

Discussion

Called when the application has encoded/serialised it’s restorable application state with the given coder.

Declared In

RBAppDelegate.h

– applicationWillContinueUserActivityWithType:

Called to determine whether the application will continue user activity with the given type.

- (BOOL)applicationWillContinueUserActivityWithType:(nonnull NSString *)userActivityType

Parameters

userActivityType

The user activity type string.

Return Value

Whether or not the activity will continue.

Discussion

Called to determine whether the application will continue user activity with the given type.

Declared In

RBAppDelegate.h

– applicationContinueUserActivity:restorationHandler:

Called to continue the user activity given.

- (BOOL)applicationContinueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void ( ^ ) ( NSArray *__nullable restorableObjects ))restorationHandler

Parameters

userActivity

The NSUserActivity object of the activity to continue.

restorationHandler

A block to call to provide the restorable objects.

Return Value

Whether or not the operation was successful.

Discussion

Called to continue the user activity given.

Declared In

RBAppDelegate.h

– applicationDidFailToContinueUserActivityWithType:error:

Called when the application failed to continue a user activity with the given type.

- (void)applicationDidFailToContinueUserActivityWithType:(nonnull NSString *)userActivityType error:(nonnull NSError *)error

Parameters

userActivityType

The user activity type string.

error

The error that occurred.

Discussion

Called when the application failed to continue a user activity with the given type.

Declared In

RBAppDelegate.h

– applicationDidUpdateUserActivity:

Called when the application successfully updated the given user activity.

- (void)applicationDidUpdateUserActivity:(nonnull NSUserActivity *)userActivity

Parameters

userActivity

The NSUserActivity object.

Discussion

Called when the application successfully updated the given user activity.

Declared In

RBAppDelegate.h