Commit abdd201a by Matias de Andrea Committed by GitHub

docs: Fix readme markdown syntax (#767)

parent 2e4e84d4
......@@ -23,19 +23,24 @@ Since version 4.4.0 this plugin is implemented using the Flutter 1.12 Android pl
As of version 3.1.0 the <kbd>permission_handler</kbd> plugin switched to the AndroidX version of the Android Support Libraries. This means you need to make sure your Android project is also upgraded to support AndroidX. Detailed instructions can be found [here](https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility).
The TL;DR version is:
1. Add the following to your "gradle.properties" file:
```
```properties
android.useAndroidX=true
android.enableJetifier=true
```
2. Make sure you set the `compileSdkVersion` in your "android/app/build.gradle" file to 31:
```
1. Make sure you set the `compileSdkVersion` in your "android/app/build.gradle" file to 31:
```gradle
android {
compileSdkVersion 31
...
}
```
3. Make sure you replace all the `android.` dependencies to their AndroidX counterparts (a full list can be found here: https://developer.android.com/jetpack/androidx/migrate ).
1. Make sure you replace all the `android.` dependencies to their AndroidX counterparts (a full list can be found [here](https://developer.android.com/jetpack/androidx/migrate)).
Add permissions to your `AndroidManifest.xml` file.
There's a `debug`, `main` and `profile` version which are chosen depending on how you start your app.
......@@ -57,6 +62,7 @@ The <kbd>permission_handler</kbd> plugin use [macros](https://github.com/Baseflo
You must list permission you want to use in your application :
1. Add the following to your `Podfile` file:
```ruby
post_install do |installer|
installer.pods_project.targets.each do |target|
......@@ -120,14 +126,18 @@ You must list permission you want to use in your application :
end
end
```
2. Remove the `#` character in front of the permission you do want to use. For example if you need access to the calendar make sure the code looks like this:
```ruby
## dart: PermissionGroup.calendar
'PERMISSION_EVENTS=1',
```
3. Delete the corresponding permission description in `Info.plist`
e.g. when you don't need camera permission, just delete 'NSCameraUsageDescription'
The following lists the relationship between `Permission` and `The key of Info.plist`:
| Permission | Info.plist | Macro |
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| PermissionGroup.calendar | NSCalendarsUsageDescription | PERMISSION_EVENTS |
......@@ -148,8 +158,6 @@ You must list permission you want to use in your application :
</details>
## How to use
There are a number of [`Permission`](https://pub.dev/documentation/permission_handler_platform_interface/latest/permission_handler_platform_interface/Permission-class.html#constants)s.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment