Skip to content

Commit ea3bf20

Browse files
author
Sergey Moskvin
committed
Improve the documentation
1 parent 5bfd0a5 commit ea3bf20

2 files changed

Lines changed: 28 additions & 28 deletions

File tree

PermissionWizard.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22

33
spec.name = 'PermissionWizard'
4-
spec.version = '1.0.0'
4+
spec.version = '1.0'
55

66
spec.summary = '🔮 An ultimate tool for system permissions management'
77

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
[![CocoaPods](https://img.shields.io/badge/CocoaPods-supported-success)](https://cocoapods.org/pods/PermissionWizard)
44
![Carthage](https://img.shields.io/badge/Carthage-supported-success)
55

6-
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. 😄
77

88
## Advantages
99

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**
1111
<br/>
1212
🖥 Works great with **Mac Catalyst**
1313

1414
✋ Supports **all existing permission types**
1515
<br/>
1616
🛡 Provides crash free by **validating your plist** keys
1717
<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
1919
<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)
2121

2222
🚀 Completely written in **Swift**
2323
<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
2525
<br/>
2626
🖼 Includes **native icons** and **string constants** for your UI (optional)
2727
<br/>
28-
🍕 Modular, add to your project **only what you need**
28+
🍕 Modular, add to your project **what you need only**
2929
<br/>
3030
🪁 Does not contain anything redundant
3131

@@ -43,18 +43,18 @@ It is an ultimate tool for system permissions management. You no longer have to
4343

4444
### [CocoaPods](https://cocoapods.org)
4545

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`:
4747

4848
```ruby
4949
pod 'PermissionWizard'
5050
```
5151

52-
By default the library is installed fully.
52+
By default, the library will be installed fully.
5353

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. ⚠️
5555

5656
```ruby
57-
pod 'PermissionWizard/Icons' # Native permission type icons
57+
pod 'PermissionWizard/Icons' # Permission type icons
5858
pod 'PermissionWizard/Bluetooth'
5959
pod 'PermissionWizard/Calendars'
6060
pod 'PermissionWizard/Camera'
@@ -73,28 +73,28 @@ pod 'PermissionWizard/Reminders'
7373
pod 'PermissionWizard/SpeechRecognition'
7474
```
7575

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.
7777

7878
### [Carthage](https://github.com/Carthage/Carthage)
7979

80-
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`:
8181

8282
```ogdl
8383
github "debug45/PermissionWizard"
8484
```
8585

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.
8787

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. ⚠️
8989

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:
9191

9292
```
9393
ENABLED_FEATURES = ICONS BLUETOOTH CALENDARS CAMERA CONTACTS FACE_ID HEALTH HOME LOCAL_NETWORK LOCATION MICROPHONE MOTION MUSIC NOTIFICATIONS PHOTOS REMINDERS SPEECH_RECOGNITION
9494
SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) $(ENABLED_FEATURES) CUSTOM_SETTINGS
9595
```
9696

97-
Please edit the first line of the template removing unnecessary component names.
97+
Customize the first line of the template removing unnecessary component names.
9898

9999
## How to Use
100100

@@ -118,19 +118,19 @@ Permission.camera.checkStatus(withMicrophone: true) { status in
118118
}
119119
```
120120

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:
122122

123123
```swift
124124
Permission.location.requestTemporaryPreciseAccess(purposePlistKey: "Default") { result in
125125
result // true
126126
}
127127
```
128128

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.
130130

131131
### Info.plist
132132

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:
134134

135135
```swift
136136
Permission.faceID.usageDescriptionPlistKey // NSFaceIDUsageDescription
@@ -139,19 +139,19 @@ Permission.health.readingUsageDescriptionPlistKey // NSHealthUpdateUsageDescript
139139
Permission.health.writingUsageDescriptionPlistKey // NSHealthShareUsageDescription
140140
```
141141

142-
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.
143143

144144
### Thread Management
145145

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:
147147

148148
```swift
149149
Permission.preferredQueue = .main // Default setting
150150
```
151151

152152
### UI Assets
153153

154-
If your UI needs permission type icons or string names you can easily get it using **PermissionWizard**:
154+
If your UI needs permission type icons or string names, you can easily get it using **PermissionWizard**:
155155

156156
```swift
157157
let permission = Permission.speechRecognition.self
@@ -161,9 +161,9 @@ titleLabel.text = permission.titleName // Speech Recognition
161161
descriptionLabel.text = "Please allow access to your \(permission.contextName)" // speech recognition
162162
```
163163

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).
165165

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:
167167

168168
```swift
169169
imageView.layer.cornerRadius = 7
@@ -182,15 +182,15 @@ if #available(iOS 11, *), permission.shouldBorderIcon {
182182
- Microphone permission always returns `.granted` on simulators with iOS 10 or 11
183183
- Music permission does not work on simulators with iOS 12
184184

185-
## Library Roadmap
185+
## Roadmap
186186

187187
- NFC permission support
188188
- Swift Package Manager compatibility
189189

190190
## Conclusion
191191

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.
193193

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.
195195

196196
If **PermissionWizard** is useful for you please star this repository. Thank you! 👍

0 commit comments

Comments
 (0)