You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is an ultimate tool for system permissions management. You no longer have to understand system API of each new permission or search it on the Stack Overflow. 😄
6
+
It is an ultimate tool for system permissions management. No longer you have to understand system API of each new permission type or search it on the Stack Overflow. 😄
7
7
8
8
## Advantages
9
9
10
-
📱 Supports newest features of **iOS 14** and **macOS 11 Big Sur**
10
+
📱 Supports the newest features of **iOS 14** and **macOS 11 Big Sur**
11
11
<br/>
12
12
🖥 Works great with **Mac Catalyst**
13
13
14
14
✋ Supports **all existing permission types**
15
15
<br/>
16
16
🛡 Provides crash free by **validating your plist** keys
17
17
<br/>
18
-
📬 Use **completion blocks** even where it is not provided by system API
18
+
📬 Use **completion blocks** even where it is not provided by default system API
19
19
<br/>
20
-
🛣 Forget about **thread management** by using only convenient dispatch queue (optional)
20
+
🛣 Forget about **thread management** by using any preferred dispatch queue only (optional)
21
21
22
22
🚀 Completely written in **Swift**
23
23
<br/>
24
-
🍭 Unifies your code,**regardless of permission types** you are working with
24
+
🍭 Unifies your code **regardless of permission types** you are working with
25
25
<br/>
26
26
🖼 Includes **native icons** and **string constants** for your UI (optional)
27
27
<br/>
28
-
🍕 Modular, add to your project **only what you need**
28
+
🍕 Modular, add to your project **what you need only**
29
29
<br/>
30
30
🪁 Does not contain anything redundant
31
31
@@ -43,18 +43,18 @@ It is an ultimate tool for system permissions management. You no longer have to
43
43
44
44
### [CocoaPods](https://cocoapods.org)
45
45
46
-
To integrate **PermissionWizard** into your Xcode project add it to your `Podfile`:
46
+
To integrate **PermissionWizard** into your Xcode project, add it to your `Podfile`:
47
47
48
48
```ruby
49
49
pod 'PermissionWizard'
50
50
```
51
51
52
-
By default the library is installed fully.
52
+
By default, the library will be installed fully.
53
53
54
-
Due to Apple’s policy regarding system permissions your app may be rejected due to mention of API that it does not actually use. It is recommended to install only components that you need. In this case you will not have any troubles. ⚠️
54
+
Due to Apple’s policy regarding system permissions, your app may be rejected due to mention of API that is not actually used. It is recommended to install only components that you need. In this case you will not have any troubles. ⚠️
55
55
56
56
```ruby
57
-
pod 'PermissionWizard/Icons'#Native permission type icons
57
+
pod 'PermissionWizard/Icons'#Permission type icons
58
58
pod 'PermissionWizard/Bluetooth'
59
59
pod 'PermissionWizard/Calendars'
60
60
pod 'PermissionWizard/Camera'
@@ -73,28 +73,28 @@ pod 'PermissionWizard/Reminders'
73
73
pod 'PermissionWizard/SpeechRecognition'
74
74
```
75
75
76
-
If you install separate components you should do not specify `pod 'PermissionWizard'`anymore.
76
+
Do not specify `pod 'PermissionWizard'`if you install separate components.
To integrate **PermissionWizard** into your Xcode project add it to your `Cartfile`:
80
+
To integrate **PermissionWizard** into your Xcode project, add it to your `Cartfile`:
81
81
82
82
```ogdl
83
83
github "debug45/PermissionWizard"
84
84
```
85
85
86
-
By default when you build your project the library is compiled fully.
86
+
By default, the library is compiled fully when you build the project.
87
87
88
-
Due to Apple’s policy regarding system permissions, your app may be rejected due to mention of API that it does not actually use. It is recommended to enable only components that you use. In this case you will not have any troubles. ⚠️
88
+
Due to Apple’s policy regarding system permissions, your app may be rejected due to mention of API that is not actually used. It is recommended to enable only components that you need. In this case you will not have any troubles. ⚠️
89
89
90
-
To enable only components that you need create the `PermissionWizard.xcconfig` file in the root directory of your project and put there appropriate settings using the following template:
90
+
To enable only components that you need, create the `PermissionWizard.xcconfig` file in the root directory of your project. Put appropriate settings into the file according to the following template:
91
91
92
92
```
93
93
ENABLED_FEATURES = ICONS BLUETOOTH CALENDARS CAMERA CONTACTS FACE_ID HEALTH HOME LOCAL_NETWORK LOCATION MICROPHONE MOTION MUSIC NOTIFICATIONS PHOTOS REMINDERS SPEECH_RECOGNITION
Please edit the first line of the template removing unnecessary component names.
97
+
Customize the first line of the template removing unnecessary component names.
98
98
99
99
## How to Use
100
100
@@ -118,19 +118,19 @@ Permission.camera.checkStatus(withMicrophone: true) { status in
118
118
}
119
119
```
120
120
121
-
Some permission types support additional features. For example if on iOS 14 a user allows access to his location with reduced accuracy only you can request temporary access to full accuracy:
121
+
Some permission types support additional features. For example, if an iOS 14 user allows access to his location with reduced accuracy only, you can request temporary access to full accuracy:
122
122
123
123
```swift
124
124
Permission.location.requestTemporaryPreciseAccess(purposePlistKey: "Default") { result in
125
125
result // true
126
126
}
127
127
```
128
128
129
-
Unfortunately the ability to work with certain permission types is limited by system API. For example you can check the current status of a local network permission by requesting it only.
129
+
Unfortunately, the ability to work with certain permission types is limited by default system API. For example, you can check the current status of a local network permission by requesting it only.
130
130
131
131
### Info.plist
132
132
133
-
Please keep in mind that to work with each permission Apple requires you to add corresponding string to your `Info.plist` that describes purpose for which you are requesting access. **PermissionWizard** can help you to find the name of a necessary key:
133
+
For each permission type you are using, Apple requires to add the corresponding string to your `Info.plist` that describes a purpose of your access requests. **PermissionWizard** can help you to find the name of a necessary plist key:
If you request access to some permission using plain system API but forget to edit your `Info.plist` the app will crash. However with **PermissionWizard** the crash will not occur — you will just see an informative warning in the debugger log.
142
+
If you request access to some permission using default system API but forget to edit your `Info.plist`, the app will crash. However with **PermissionWizard** the crash will not occur — you will just see an informative warning in the debugger log.
143
143
144
144
### Thread Management
145
145
146
-
In some cases the plain system permissions API may return results in a different dispatch queues than the one you requested from. Instead of risking a crash and using `DispatchQueue.main.async` you can ask **PermissionWizard** to always invoke completion blocks in a convenient queue:
146
+
In some cases default system API may return a result in a different dispatch queue. Instead of risking a crash and using `DispatchQueue.main.async`, you can ask **PermissionWizard** to always invoke completion blocks in a preferred queue:
descriptionLabel.text="Please allow access to your \(permission.contextName)"// speech recognition
162
162
```
163
163
164
-
Please do not forget that icons are available only if the `Icons` component of **PermissionWizard** is installed (CocoaPods) or enabled (Carthage).
164
+
Keep in mind that icons are available only if the `Icons` component of **PermissionWizard** is installed (CocoaPods) or enabled (Carthage).
165
165
166
-
**PermissionWizard** provides icons without rounding and borders. If you want to get the design like in iOS system preferences use the following code:
166
+
**PermissionWizard** provides icons without rounding and borders. If you want to get the design like in iOS system preferences, use the following code:
167
167
168
168
```swift
169
169
imageView.layer.cornerRadius=7
@@ -182,15 +182,15 @@ if #available(iOS 11, *), permission.shouldBorderIcon {
182
182
- Microphone permission always returns `.granted` on simulators with iOS 10 or 11
183
183
- Music permission does not work on simulators with iOS 12
184
184
185
-
## Library Roadmap
185
+
## Roadmap
186
186
187
187
- NFC permission support
188
188
- Swift Package Manager compatibility
189
189
190
190
## Conclusion
191
191
192
-
You can contact me on [Telegram](https://t.me/debug45) and [LinkedIn](https://linkedin.com/in/debug45). If you find an issue please [tell](https://github.com/debug45/PermissionWizard/issues/new) about it.
192
+
You can contact me on [Telegram](https://t.me/debug45) and [LinkedIn](https://linkedin.com/in/debug45). If you find an issue, please [tell](https://github.com/debug45/PermissionWizard/issues/new) about it.
193
193
194
-
Library is released under the MIT license. The icons of permission types belong to Apple, their use is regulated by the company rules.
194
+
Library is released under the MIT license. The permission type icons belong to Apple, their use is regulated by the company rules.
195
195
196
196
If **PermissionWizard** is useful for you please star this repository. Thank you! 👍
0 commit comments