Contents

william-weng/wwlocationmanager

- Find location-related settings on your phone. (Region / Language / SIM / GPS)

[Introduction - 簡介](https://swiftpackageindex.com/William-Weng)

[Achievements display - 成果展示](https://www.hkweb.com.hk/blog/ui設計基礎知識:引導頁對ui設計到底有什麼作用/)

[WWLocationManager]

[Installation with Swift Package Manager - 安裝方式](https://medium.com/彼得潘的-swift-ios-app-開發問題解答集/使用-spm-安裝第三方套件-xcode-11-新功能-2c4ffcf85b4b)

dependencies: [
    .package(url: "https://github.com/William-Weng/WWLocationManager.git", .upToNextMajor(from: "1.1.0"))
]

Function - 可用函式

|函式|功能| |-|-| |countryCode(isAlways:result:)|取得有關所在位置的資訊 (Info.plist => NSLocationWhenInUseUsageDescription)| |countryCode()|取得有關所在位置的資訊 (單次 / 持續)| |locationCountryCode()|取得該裝置的國家地域碼 (不包含GPS定位)| |preferredLanguageInfomation(_:)|把完整的語系編碼分類 (zh-Hant-TW => [語系-分支-地區])| |close()|關閉定位|

Example - 程式範例

import UIKit
import WWLocationManager

final class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        Task {
            let code = await WWLocationManager.shared.countryCode()
            print(code)
        }
    }
}

Package Metadata

Repository: william-weng/wwlocationmanager

Default branch: main

README: README.md