-
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.
- Loading branch information
1 parent
e862674
commit bdcd937
Showing
11 changed files
with
154 additions
and
4 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
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,68 @@ | ||
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
flutter_additional_ios_build_settings(target) | ||
|
||
target.build_configurations.each do |config| | ||
# You can remove unused permissions here | ||
# for more information: https://github.com/BaseflowIT/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h | ||
# e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0' | ||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ | ||
'$(inherited)', | ||
|
||
## dart: PermissionGroup.calendar | ||
'PERMISSION_EVENTS=1', | ||
|
||
## dart: PermissionGroup.calendarFullAccess | ||
'PERMISSION_EVENTS_FULL_ACCESS=1', | ||
|
||
## dart: PermissionGroup.reminders | ||
#'PERMISSION_REMINDERS=1', | ||
|
||
## dart: PermissionGroup.contacts | ||
#'PERMISSION_CONTACTS=1', | ||
|
||
## dart: PermissionGroup.camera | ||
#'PERMISSION_CAMERA=1', | ||
|
||
## dart: PermissionGroup.microphone | ||
#'PERMISSION_MICROPHONE=1', | ||
|
||
## dart: PermissionGroup.speech | ||
#'PERMISSION_SPEECH_RECOGNIZER=1', | ||
|
||
## dart: PermissionGroup.photos | ||
'PERMISSION_PHOTOS=1', | ||
|
||
## The 'PERMISSION_LOCATION' macro enables the `locationWhenInUse` and `locationAlways` permission. If | ||
## the application only requires `locationWhenInUse`, only specify the `PERMISSION_LOCATION_WHENINUSE` | ||
## macro. | ||
## | ||
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse] | ||
#'PERMISSION_LOCATION=1', | ||
#'PERMISSION_LOCATION_WHENINUSE=0', | ||
|
||
## dart: PermissionGroup.notification | ||
'PERMISSION_NOTIFICATIONS=1', | ||
|
||
## dart: PermissionGroup.mediaLibrary | ||
'PERMISSION_MEDIA_LIBRARY=1', | ||
|
||
## dart: PermissionGroup.sensors | ||
#'PERMISSION_SENSORS=1', | ||
|
||
## dart: PermissionGroup.bluetooth | ||
#'PERMISSION_BLUETOOTH=1', | ||
|
||
## dart: PermissionGroup.appTrackingTransparency | ||
#'PERMISSION_APP_TRACKING_TRANSPARENCY=1', | ||
|
||
## dart: PermissionGroup.criticalAlerts | ||
#'PERMISSION_CRITICAL_ALERTS=1', | ||
|
||
## dart: PermissionGroup.criticalAlerts | ||
#'PERMISSION_ASSISTANT=1', | ||
] | ||
|
||
end | ||
end | ||
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
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,10 @@ | ||
import 'package:permission_handler/permission_handler.dart' show Permission, PermissionActions; | ||
|
||
/// 权限 | ||
class Power { | ||
/// 请求权限 | ||
static Future<void> request() async { | ||
await Permission.storage.request(); | ||
await Permission.manageExternalStorage.request(); | ||
} | ||
} |
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
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