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.
Adds support for StoragePermissionStrategy
- Loading branch information
Frank Gregor
committed
Nov 6, 2019
1 parent
f24a2aa
commit 4a1d3a4
Showing
4 changed files
with
62 additions
and
17 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 |