forked from zinwalin/flutter-sotrage-permission-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Baseflow#170 from phranck/develop
Adds support for StoragePermissionStrategy on iOS
- Loading branch information
Showing
5 changed files
with
64 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// StoragePermissionStrategy.h | ||
// permission_handler | ||
// | ||
// Created by Frank Gregor on 06.11.19. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "PermissionStrategy.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface StoragePermissionStrategy : NSObject <PermissionStrategy> | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// StoragePermissionStrategy.m | ||
// permission_handler | ||
// | ||
// Created by Frank Gregor on 06.11.19. | ||
// | ||
|
||
#import "StoragePermissionStrategy.h" | ||
|
||
@implementation StoragePermissionStrategy | ||
|
||
- (PermissionStatus)checkPermissionStatus:(PermissionGroup)permission { | ||
return [StoragePermissionStrategy permissionStatus]; | ||
} | ||
|
||
- (ServiceStatus)checkServiceStatus:(PermissionGroup)permission { | ||
return ServiceStatusNotApplicable; | ||
} | ||
|
||
- (void)requestPermission:(PermissionGroup)permission completionHandler:(PermissionStatusHandler)completionHandler { | ||
completionHandler([StoragePermissionStrategy permissionStatus]); | ||
} | ||
|
||
+ (PermissionStatus)permissionStatus { | ||
return PermissionStatusGranted; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters