SalesforceSDKManager Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | SalesforceSDKManager.h |
Overview
This class will manage the basic infrastructure of the Mobile SDK elements of the app, including the orchestration of authentication, screen lock displaying, and management of app backgrounding and foregrounding state.
Other Methods
+ setInstanceClass:
Class instance to be used to instantiate the singleton.
+ (void)setInstanceClass:(Class)classNameParameters
className |
Name of instantiator class. |
|---|
Declared In
SalesforceSDKManager.h
)
Sets & Gets the app name being used by the analytics framework.
@property (class, nonatomic, strong) NSString *NS_SWIFT_NAME ( analyticsAppName )Return Value
App name.
Declared In
SalesforceSDKManager.h
– deviceId
Returns a unique device ID.
- (NSString *)deviceIdReturn Value
Device ID.
Declared In
SalesforceSDKManager.h
appType
App type (native, hybrid or react native)
@property (nonatomic, readonly) SFAppType appTypeDeclared In
SalesforceSDKManager.h
isDevSupportEnabled
Use this flag to indicate if the dev support dialog should be enabled in the APP
@property (nonatomic, assign) BOOL isDevSupportEnabledDeclared In
SalesforceSDKManager.h
isLoginWebviewInspectable
Use this flag to indicate if the login webview should be inspectable
@property (nonatomic, assign) BOOL isLoginWebviewInspectableDeclared In
SalesforceSDKManager.h
URLCacheType
The type of cache used for the shared URL cache, defaults to kSFURLCacheTypeEncrypted.
@property (nonatomic, assign) SFURLCacheType URLCacheTypeDeclared In
SalesforceSDKManager.h
useEphemeralSessionForAdvancedAuth
Use this flag to indicate if advanced authentication should use an ephemeral web session. Defaults to YES.
@property (nonatomic, assign) BOOL useEphemeralSessionForAdvancedAuthDeclared In
SalesforceSDKManager.h
useWebServerAuthentication
Whether or not the app should use web server oauth flow in web view. If false, user-agent will be used.
@property (nonatomic, assign) BOOL useWebServerAuthenticationDeclared In
SalesforceSDKManager.h
useHybridAuthentication
Whether hybrid authentication flow should be used. Defaults to YES.
@property (nonatomic, assign) BOOL useHybridAuthenticationDeclared In
SalesforceSDKManager.h
customDomainInferencePattern
Detect use of “Use Custom Domain” input from login web view using the given regex. Example for a specific org: “^https:\/\/mobilesdk\.my\.salesforce\.com/\?startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage\.apexp” For any my domain: “^https:\/\/[a-zA-Z0-9]+\.my\.salesforce\.com/\?startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage\.apexp”
@property (nonatomic, copy, nullable) NSRegularExpression *customDomainInferencePatternDeclared In
SalesforceSDKManager.h
blockSalesforceIntegrationUser
Sets authentication ability for Salesforce integration users. When true, Salesforce integration users will be prohibited from initial authentication and receive an error message. Defaults to NO.
@property (nonatomic, assign) BOOL blockSalesforceIntegrationUserDeclared In
SalesforceSDKManager.h
+ initializeSDKWithClass:
Initializes the SDK. Class instance to be used to instantiate the sdkManager.
+ (void)initializeSDKWithClass:(Class)classNameDeclared In
SalesforceSDKManager.h
– getAppTypeAsString
app type as a string
- (NSString *)getAppTypeAsStringReturn Value
app type as a string
Declared In
SalesforceSDKManager.h
– showDevSupportDialog:
Show dev support dialog
- (void)showDevSupportDialog:(UIViewController *)presentingViewControllerParameters
presentingViewController |
The view controller currently presented. |
|---|
Declared In
SalesforceSDKManager.h
– getDevActions:
The view controller currently presented.
- (NSArray<SFSDKDevAction*> *)getDevActions:(UIViewController *)presentedViewControllerParameters
presentedViewController |
The view controller currently presented. |
|---|
Return Value
Dev actions (list of DevAction objects) to show in dev support dialog
Declared In
SalesforceSDKManager.h
– getDevSupportInfos
Dev info (list of name1, value1, name2, value2 etc) to show in SFSDKDevInfoController
- (NSArray<NSString*> *)getDevSupportInfosReturn Value
Dev info (list of name1, value1, name2, value2 etc) to show in SFSDKDevInfoController
Declared In
SalesforceSDKManager.h
– devInfoTitleString
Returns the title string of the dev support menu.
- (nonnull NSString *)devInfoTitleStringReturn Value
Title string of the dev support menu.
Declared In
SalesforceSDKManager.h
– screenLockManager
Returns The ScreenLockManager instance.
- (id<SFScreenLockManager>)screenLockManagerReturn Value
The Screen Lock Manager.
Declared In
SalesforceSDKManager.h
– biometricAuthenticationManager
Returns The BiometricAuthenticationManager instance.
- (id<SFBiometricAuthenticationManager>)biometricAuthenticationManagerReturn Value
The Biometric Authentication Manager.
Declared In
SalesforceSDKManager.h
– useNativeLoginWithConsumerKey:callbackUrl:communityUrl:nativeLoginViewController:scene:
Creates the NativeLoginManager instance.
- (id<SFNativeLoginManager>)useNativeLoginWithConsumerKey:(nonnull NSString *)consumerKey callbackUrl:(nonnull NSString *)callbackUrl communityUrl:(nonnull NSString *)communityUrl nativeLoginViewController:(nonnull UIViewController *)nativeLoginViewController scene:(nullable UIScene *)sceneParameters
consumerKey |
The Connected App consumer key. |
|---|---|
callbackUrl |
The Connected App redirect URI. |
communityUrl |
The login url for native login |
nativeLoginViewController |
The view presented to the user and responsible for using the returned Native Login Manager to initiate either of the authorization code and credentials login flow or the headless, password-less login flow. |
scene |
Optional UIScene to enable multi-window support. |
Return Value
The Native Login Manager.
Declared In
SalesforceSDKManager.h
– useNativeLoginWithConsumerKey:callbackUrl:communityUrl:reCaptchaSiteKeyId:googleCloudProjectId:isReCaptchaEnterprise:nativeLoginViewController:scene:
- (id<SFNativeLoginManager>)useNativeLoginWithConsumerKey:(nonnull NSString *)consumerKey callbackUrl:(nonnull NSString *)callbackUrl communityUrl:(nonnull NSString *)communityUrl reCaptchaSiteKeyId:(nullable NSString *)reCaptchaSiteKeyId googleCloudProjectId:(nullable NSString *)googleCloudProjectId isReCaptchaEnterprise:(BOOL)isReCaptchaEnterprise nativeLoginViewController:(nonnull UIViewController *)nativeLoginViewController scene:(nullable UIScene *)scene– nativeLoginManager
Returns The NativeLoginManager instance.
- (id<SFNativeLoginManager>)nativeLoginManagerReturn Value
The Native Login Manager.
Declared In
SalesforceSDKManager.h
Extension Methods
snapshotViewControllers
@property (nonatomic, strong, nonnull) SFSDKSafeMutableDictionary<NSString*UIViewController*> *snapshotViewControllers nativeLoginViewControllers
@property (nonatomic, strong, nullable) SFSDKSafeMutableDictionary<NSString*UIViewController*> *nativeLoginViewControllers– dismissSnapshot:completion:
- (void)dismissSnapshot:(nonnull UIScene *)scene completion:(void ( ^ __nullable ) ( void ))completion