Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a9f81e

Browse files
committed
Update README & Bump version
1 parent8b86829 commit3a9f81e

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

‎README.md‎

Lines changed: 12 additions & 18 deletions
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=awaitself.asyncLocationManager.requestAuthorizationWhenInUse()//returns CLAuthorizationStatus
33-
}
31+
let permission=awaitself.asyncLocationManager.requestAuthorizationWhenInUse()//returns CLAuthorizationStatus
3432
```
3533

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

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

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

4642
```swift
47-
Task {
48-
forawait locationUpdateEventinawait 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+
forawait locationUpdateEventinawait 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)

[8]ページ先頭

©2009-2025 Movatter.jp