티스토리 뷰
우선 info.plist에 위치정보 권한을 추가합니다.
사용하는 조건에 따라 몇 가지가 있는데 필요에 따라 맞추어 추가하면 됩니다.

지난번 작성했던 geohash 에 위치정보 가져오는 코드를 작성하여 이어 붙이면
나의 위치는 37.785...,-122.406... 로 나오고 geohash는 9q8yywdq7 로 나옵니다.

내 위치가 어디 인지 찾아보면 나는 샌프란 시스코에 있습니다.

내가 찾은 위도가 맞나 검색 해보니 스텍오버플로우에 simulator는 default 가 san fran 이고 설정에서 변경 가능하다고 하다.
참고
지오헤시 검색을 제공하는 사이트
https://www.movable-type.co.uk/scripts/geohash.html
Geohash encoding/decoding
Movable Type Scripts Geohashes A geohash is a convenient way of expressing a location (anywhere in the world) using a short alphanumeric string, with greater precision obtained with longer strings. A geohash actually identifies a rectangular cell: at each
www.movable-type.co.uk
검색해보았던 스텍오버플로우
ios코드 참고
2022.01.17 - [iOS] - Geohash-1
Geohash-1
위치정보를 표시할 때, 보통 위도, 경도를 표시하는데, 이것을 해시해서 일련의 문자열로 바꾼 게 geohash이다. 재밌는 것은 글자 길이가 분해능 (얼마나 자세히 표시하는지)이고, 앞의 해시 글자
iosdevhistory.tistory.com
'iOS' 카테고리의 다른 글
| MVVM-1 (0) | 2022.03.18 |
|---|---|
| GCD (Grand Central Dispacher) - 1 (0) | 2022.03.17 |
| Geohash-1 (0) | 2022.01.17 |
| ActiveLabel (0) | 2022.01.12 |
| Tuist (0) | 2021.12.31 |
- Total
- Today
- Yesterday
- jenkins
- GPT4
- MQTT
- 무료는 아니지만
- 프로그래머스
- GCD
- swift
- RxSwift
- IF (KAKAO) DEV 2022
- 같이쓰기
- async
- xcode whitespace trim option
- Fastlane
- XCTestExpectation
- AWS IoT
- ios
- bitrise
- AppThinning
- Default Rules
- ATS failed system trust
- 빌드자동화
- CI/CD
- swiftLint
- 모듏화
- geohash
- chatgpt 4o
- ChatGPT
- firebase
- Moya
- 코테
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |