Skip to content

Commit 3a9f81e

Browse files
committed
Update README & Bump version
1 parent 8b86829 commit 3a9f81e

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

README.md

+12-18
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Wrapper for Apple `CoreLocation` framework with new Concurency Model. No more `d
1111
##### SPM
1212
```swift
1313
dependencies: [
14-
.package(url: "https://github.com/AsyncSwift/AsyncLocationKit.git", .upToNextMinor(from: "1.6.3"))
14+
.package(url: "https://github.com/AsyncSwift/AsyncLocationKit.git", .upToNextMinor(from: "1.6.4"))
1515
]
1616
```
1717

1818
#### Cocoapods
1919
```
20-
pod 'AsyncLocationKit', :git => 'https://github.com/AsyncSwift/AsyncLocationKit.git', :tag => '1.6.3'
20+
pod 'AsyncLocationKit', :git => 'https://github.com/AsyncSwift/AsyncLocationKit.git', :tag => '1.6.4'
2121
```
2222

2323

@@ -28,32 +28,26 @@ import AsyncLocationKit
2828

2929
let asyncLocationManager = AsyncLocationManager(desiredAccuracy: .bestAccuracy)
3030

31-
Task {
32-
let permission = await self.asyncLocationManager.requestAuthorizationWhenInUse() //returns CLAuthorizationStatus
33-
}
31+
let permission = await self.asyncLocationManager.requestAuthorizationWhenInUse() //returns CLAuthorizationStatus
3432
```
3533

3634
You can use all methods from Apple `CLLocationManager`.
3735

3836
```swift
39-
Task {
40-
let coordinate = try await asyncLocationManager.requestLocation() //Request user location once
41-
}
37+
let coordinate = try await asyncLocationManager.requestLocation() //Request user location once
4238
```
4339

4440
Start monitoring update of user location with `AsyncStream`.
4541

4642
```swift
47-
Task {
48-
for await locationUpdateEvent in await asyncLocationManager.startUpdatingLocation() {
49-
switch locationUpdateEvent {
50-
case .didUpdateLocations(let locations):
51-
// do something
52-
case .didFailWith(let error):
53-
// do something
54-
case .didPaused, .didResume:
55-
break
56-
}
43+
for await locationUpdateEvent in await asyncLocationManager.startUpdatingLocation() {
44+
switch locationUpdateEvent {
45+
case .didUpdateLocations(let locations):
46+
// do something
47+
case .didFailWith(let error):
48+
// do something
49+
case .didPaused, .didResume:
50+
break
5751
}
5852
}
5953
```

0 commit comments

Comments
 (0)