Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
58b8a57d
Commit
58b8a57d
authored
Mar 12, 2021
by
Rene Floor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement macro for bluetooth
parent
43df33ca
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
1 deletions
+31
-1
README.md
+4
-0
permission_handler/ios/Classes/PermissionHandlerEnums.h
+7
-0
permission_handler/ios/Classes/strategies/BluetoothPermissionStrategy.h
+12
-1
permission_handler/ios/Classes/strategies/BluetoothPermissionStrategy.m
+8
-0
No files found.
README.md
View file @
58b8a57d
...
@@ -101,6 +101,9 @@ You can remove permissions you don't use:
...
@@ -101,6 +101,9 @@ You can remove permissions you don't use:
## dart: PermissionGroup.sensors
## dart: PermissionGroup.sensors
# 'PERMISSION_SENSORS=0'
# 'PERMISSION_SENSORS=0'
## dart: PermissionGroup.bluetooth
# 'PERMISSION_BLUETOOTH=0'
]
]
end
end
...
@@ -128,6 +131,7 @@ You can remove permissions you don't use:
...
@@ -128,6 +131,7 @@ You can remove permissions you don't use:
| PermissionGroup.notification | PermissionGroupNotification | PERMISSION_NOTIFICATIONS |
| PermissionGroup.notification | PermissionGroupNotification | PERMISSION_NOTIFICATIONS |
| PermissionGroup.mediaLibrary | NSAppleMusicUsageDescription, kTCCServiceMediaLibrary | PERMISSION_MEDIA_LIBRARY |
| PermissionGroup.mediaLibrary | NSAppleMusicUsageDescription, kTCCServiceMediaLibrary | PERMISSION_MEDIA_LIBRARY |
| PermissionGroup.sensors | NSMotionUsageDescription | PERMISSION_SENSORS |
| PermissionGroup.sensors | NSMotionUsageDescription | PERMISSION_SENSORS |
| PermissionGroup.bluetooth | NSBluetoothAlwaysUsageDescription, NSBluetoothPeripheralUsageDescription | PERMISSION_BLUETOOTH |
4. Clean & Rebuild
4. Clean & Rebuild
</details>
</details>
...
...
permission_handler/ios/Classes/PermissionHandlerEnums.h
View file @
58b8a57d
...
@@ -88,6 +88,13 @@
...
@@ -88,6 +88,13 @@
#define PERMISSION_SENSORS 1
#define PERMISSION_SENSORS 1
#endif
#endif
// ios: PermissionGroupBluetooth
// Info.plist: [NSBluetoothAlwaysUsageDescription, NSBluetoothPeripheralUsageDescription]
// dart: PermissionGroup.bluetooth
#ifndef PERMISSION_BLUETOOTH
#define PERMISSION_BLUETOOTH 1
#endif
typedef
NS_ENUM
(
int
,
PermissionGroup
)
{
typedef
NS_ENUM
(
int
,
PermissionGroup
)
{
PermissionGroupCalendar
=
0
,
PermissionGroupCalendar
=
0
,
PermissionGroupCamera
,
PermissionGroupCamera
,
...
...
permission_handler/ios/Classes/strategies/BluetoothPermissionStrategy.h
View file @
58b8a57d
...
@@ -6,9 +6,20 @@
...
@@ -6,9 +6,20 @@
//
//
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import "PermissionStrategy.h"
#import "PermissionStrategy.h"
#if PERMISSION_BLUETOOTH
#import <CoreBluetooth/CoreBluetooth.h>
@interface
BluetoothPermissionStrategy
:
NSObject
<
PermissionStrategy
>
@interface
BluetoothPermissionStrategy
:
NSObject
<
PermissionStrategy
>
@end
@end
#else
#import "UnknownPermissionStrategy.h"
@interface
BluetoothPermissionStrategy
:
UnknownPermissionStrategy
@end
#endif
permission_handler/ios/Classes/strategies/BluetoothPermissionStrategy.m
View file @
58b8a57d
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#import "BluetoothPermissionStrategy.h"
#import "BluetoothPermissionStrategy.h"
#if PERMISSION_BLUETOOTH
@implementation
BluetoothPermissionStrategy
@implementation
BluetoothPermissionStrategy
...
@@ -48,3 +49,10 @@
...
@@ -48,3 +49,10 @@
}
}
}
}
@end
@end
#else
@implementation
BluetoothPermissionStrategy
@end
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment