#import <SecurityHandler.h>
◆ addPersistentStoreToCoordinator:WithType:configuration:URL:options:error:()
- (NSPersistentStore* _Nullable) addPersistentStoreToCoordinator: |
|
(NSPersistentStoreCoordinator *_Nullable) |
persistentCoordinator |
WithType: |
|
(NSString *_Nullable) |
storeType |
configuration: |
|
(NSString *_Nullable) |
configuration |
URL: |
|
(NSURL *_Nullable) |
storeURL |
options: |
|
(NSDictionary *_Nullable) |
options |
error: |
|
(NSError *_Nullable *_Nullable) |
error |
|
|
| |
Returns the persistent store based on the current Security Framework. The API is a wrapper on the API addPersistentStoreWithType:configuration:URL:options:error: defined in the class NSPersistentStoreCoordinator
- Parameters
-
objectModel | the objectModel |
storeType | the store type configuration the configuration |
storeURL | the storeURL options the options |
error | the error |
- Returns
- persistent store
◆ applicationLaunchedWithURL()
- (void) applicationLaunchedWithURL |
|
|
|
◆ applicationLaunchWithURLFailed()
- (void) applicationLaunchWithURLFailed |
|
|
|
◆ authorize()
Authorize using the current Security Framework
◆ authorizedWithURL:()
- (BOOL) authorizedWithURL: |
|
(NSString *_Nullable) |
urlString |
|
Returns whether the URL is authenticated. This is only used for Facebook app switch authentication, where we have to handle the URL from Facebook app or Safari. For other types of authentication, this method returns NO
- Returns
- authorizedByFacebook
◆ cancelMailCompose()
- (void) cancelMailCompose |
|
|
|
◆ canHandleNetworkAuthenticationChallenge:()
- (BOOL) canHandleNetworkAuthenticationChallenge: |
|
(NSURLAuthenticationChallenge *_Nullable) |
challenge |
|
◆ canHandleURL:()
- (BOOL) canHandleURL: |
|
(NSURL *_Nullable) |
url |
|
◆ canPersistCertificate()
- (BOOL) canPersistCertificate |
|
|
|
◆ featureAvailable:()
Returns whether the feature is avialable with the current Security Framework. The enum for MSTRFeature are defined in Enums.h
- Parameters
-
- Returns
- whether the feature is supported with the current security framework
◆ fileManager()
Returns the current fileManager
◆ getApplicationLaunchedWithURL()
- (BOOL) getApplicationLaunchedWithURL |
|
|
|
◆ handleNetworkAuthenticationChallenge:completionHandler:()
- (BOOL) handleNetworkAuthenticationChallenge: |
|
(NSURLAuthenticationChallenge *_Nullable) |
challenge |
completionHandler: |
|
(void(^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *_Nonnull)) |
completionHandler |
|
|
| |
◆ handleSecurityFrameworkURL:fromApplication:()
- (BOOL) handleSecurityFrameworkURL: |
|
(NSURL *_Nullable) |
url |
fromApplication: |
|
(id) |
sourceApplication |
|
|
| |
◆ initialize:()
- (void) initialize: |
|
(NSArray *_Nullable) |
parameters |
|
Initialize the security framework with the paramters read from the property SecurityFramework in the Info.plist. The Info.plist has SecurityFramework property with the value in format "SecurityFramework&Application ID&MSTR Aplication Version"
- Parameters
-
parameters | the paramters used for framework initialization |
◆ isAuthorizationInProgress()
- (BOOL) isAuthorizationInProgress |
|
|
|
◆ isAuthorized()
Returns whether the application has authorized with the current Security Framework
- Returns
- authorized
◆ isSecurityFrameworkURL:()
- (BOOL) isSecurityFrameworkURL: |
|
(NSURL *_Nullable) |
url |
|
◆ mailto:()
- (void) mailto: |
|
(NSURL *_Nullable) |
url |
|
◆ mailWithAttachmentByParameters:controller:delegate:shouldAutorotate:()
- (void) mailWithAttachmentByParameters: |
|
(NSDictionary *_Nonnull) |
parameters |
controller: |
|
(UIViewController *_Nonnull) |
controller |
delegate: |
|
(id< MFMailComposeViewControllerDelegate > _Nullable) |
delegate |
shouldAutorotate: |
|
(BOOL) |
shouldAutorotate |
|
|
| |
Send mail with attachment data
- Parameters
-
parameters | are used to create the MFMailComposeViewController: Key "attachment" is a NSData instance containing the contents of the attachment, it must not be nil.
Key @"mimeType" is a NSString specifying the MIME type for the attachment, as specified by the IANA. It must not be nil.
Key @"fileName" is a NSString specifying the intended filename for the attachment which is displayed below the attachment's icon if the attachment is not decoded when displayed. Must not be nil.
Key @"subject" is a NSString specifying the message's Subject header.
Key @"body" is a NSString containing the body contents of the email message.
Key @"isHTML" is a NSString indicating if the body argument is to be interpreted as HTML content, @"true" for YES. |
controller | is the UIViewController where the MFMailComposeViewController would be displayed on. |
delegate | is the mailComposeDelegate for the MFMailComposeViewController. |
shouldAutorotate | is a Boolean that controls whether the MFMailComposeViewController can be autorotated. |
◆ newPersistentStoreCoordinatorWithManagedObjectModel:()
- (NSPersistentStoreCoordinator* _Nullable) newPersistentStoreCoordinatorWithManagedObjectModel: |
|
(NSManagedObjectModel *_Nullable) |
objectModel |
|
Returns the persistent store coordinator based on the current Security Frameowrk. This API is the wrapper on the API initWithManagedObjectModel: defined in the class NSPersistentStoreCoordinator
- Parameters
-
objectModel | the objectModel |
- Returns
- persistent store coordinator
◆ openWithExternalApp:()
- (void) openWithExternalApp: |
|
(NSString *_Nullable) |
url |
|
◆ requiresAuthorizationOnApplicationOfNewURL()
- (BOOL) requiresAuthorizationOnApplicationOfNewURL |
|
|
|
◆ securityFramework()
Returns the current SecurityFramework enum which is defined in Enums.h
- Returns
- the securityFramework
◆ securityHandler()
Returns the singleton secuirty handler for the current security framework
- Returns
- the security handle
◆ securityPolicyManager()
- (id<SecurityPolicyManager> _Nullable) securityPolicyManager |
|
|
|
◆ sendFileWithData:name:()
- (void) sendFileWithData: |
|
(NSData *_Nonnull) |
fileData |
name: |
|
(NSString *_Nullable) |
fileName |
|
|
| |
◆ setAuthorizationInProgress:()
- (void) setAuthorizationInProgress: |
|
(BOOL) |
authorizationInProgress |
|
◆ setDelegate:()
- (void) setDelegate: |
|
(id< SecurityHandlerDelegate > _Nullable) |
delegate |
|
◆ setLoadBakedInConfig:()
- (void) setLoadBakedInConfig: |
|
(BOOL) |
loadBakedInConfig |
|
◆ setSupportLandscapeOnly:()
- (void) setSupportLandscapeOnly: |
|
(BOOL) |
value |
|
◆ shouldHideCoverScreen()
- (BOOL) shouldHideCoverScreen |
|
|
|
◆ shouldHideScreenContentsOnBackground()
- (BOOL) shouldHideScreenContentsOnBackground |
|
|
|
Return whether the contents of the application should be covered when the application goes in background so that the contents are not shown when user launches the application again until the user authorizes
- Returns
- whether the contents needs to be covered
◆ shouldLoadBakedInConfig()
- (BOOL) shouldLoadBakedInConfig |
|
|
|
◆ shouldThrowExceptionIfAccessedBeforeAuhtorization()
- (BOOL) shouldThrowExceptionIfAccessedBeforeAuhtorization |
|
|
|
◆ titleForEmail:()
- (NSString * _Nullable) titleForEmail: |
|
(NSString *_Nullable) |
originalString |
|
Convert the original title to the correct title.
- Parameters
-
originalString | the original title |
- Returns
- the correct title
◆ unAuthorizeOnBackground()
- (void) unAuthorizeOnBackground |
|
|
|
Implement the method in case the framework needs to unauthorize the application when tha application goes in the background
◆ updateSecurityPolicy:()
- (void) updateSecurityPolicy: |
|
(SecurityPolicy *_Nullable) |
securityPolicy |
|
◆ webViewShouldLoadDataUsingURL()
- (BOOL) webViewShouldLoadDataUsingURL |
|
|
|
◆ window()
- (UIWindow* _Nullable) window |
|
|
|
Returns the current UIWindow for the application based on the Security Framework of the application
- Parameters
-