ArcGIS Runtime SDK for iOS: AGSApplicationDelegate Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSApplicationDelegate Class Reference

Description

An iOS app delegate for handling app events related to actions initiated by ArcGIS classes.

An instance of this class represents an application delegate that can handle application related events that are of interest to or initiated by ArcGIS classes.

The methods in this class are designed to mirror those in Apple's UIApplicationDelegate. You should call them in the respective methods in your application delegate's implementation so that ArcGIS classes can respond to application events.

Since
100
Inheritance diagram for AGSApplicationDelegate:

Instance Methods

(void) - application:handleEventsForBackgroundURLSession:completionHandler:
 
(BOOL) - application:openURL:options:
 
(BOOL) - application:openURL:sourceApplication:annotation:
 

Class Methods

(instancetype) + sharedApplicationDelegate
 

Method Documentation

◆ application:handleEventsForBackgroundURLSession:completionHandler:

- (void) application: (UIApplication *)  application
handleEventsForBackgroundURLSession: (NSString *)  identifier
completionHandler: (void(^)(void))  completionHandler 

Provides a way to process NSURLSession related events for data downloaded in the background. The download could have been initiated in the background by #application:performFetchWithCompletionHandler:, or it might have been initiated in the foreground and the app later terminated or moved into the background. This method should be called in the -[UIApplicationDelegate application:handleEventsForBackgroundURLSession:completionHandler:] delegate method. Once the download finishes, the completion handler on your AGSGDBSyncTask or AGSExportTileCacheTask will be invoked to let you know that the job has completed. If your app is still in the background, you can post a local notification to alert the user.

Since
100

◆ application:openURL:options:

- (BOOL) application: (UIApplication *)  application
openURL: (NSURL *)  url
options: (NSDictionary< UIApplicationOpenURLOptionsKey, id > *)  options 

Provides a way to process the result returned from Safari/SFSafariViewController if you are using Safari-based, out-of-app authentication workflow. You should call this method from -[UIApplicationDelegate application:openURL:options:] delegate method.

ArcGIS app delegate can handle this event only if the provided URL is the same as the redirectURL used in AGSOAuthConfiguration set on AGSAuthenticationManager::OAuthConfigurations.

Returns
Flag indicating whether the app delegate did indeed handle this event because it was ArcGIS related, or if you need to handle it yourself because it isn't ArcGIS related.
Since
100
Deprecated:
100.11. The ASWebAuthenticationSession is used instead of SFSafariViewController for out-of-app authentication workflow which does not require this delegate method.

◆ application:openURL:sourceApplication:annotation:

- (BOOL) application: (UIApplication *)  application
openURL: (NSURL *)  url
sourceApplication: (nullable NSString *)  sourceApplication
annotation: (nullable id)  annotation 

Provides a way to process the result returned from Safari/SFSafariViewController if you are using Safari-based, out-of-app authentication workflow. You should call this method from -[UIApplicationDelegate application:openURL:sourceApplication:annotation:] delegate method.

ArcGIS app delegate can handle this event only if the provided URL is the same as the redirectURL used in AGSOAuthConfiguration set on AGSAuthenticationManager::OAuthConfigurations.

Returns
Flag indicating whether the app delegate did indeed handle this event because it was ArcGIS related, or if you need to handle it yourself because it isn't ArcGIS related.
Since
100
Deprecated:
100.1. Use application:openURL:options: instead.

◆ sharedApplicationDelegate

+ (instancetype) sharedApplicationDelegate

The singleton instance of this class.

Since
100