gpt4 book ai didi

bluetooth - 如何在 iOS 10 中以编程方式打开蓝牙设置

转载 作者:行者123 更新时间:2023-12-02 19:05:18 24 4
gpt4 key购买 nike

我正在尝试使用 swift 通过我的应用程序访问蓝牙设置。如何访问蓝牙设置?

Xcode 版本 - 8.0迅速 - 2.3iOS - 10

最佳答案

func openBluetooth(){
let url = URL(string: "App-Prefs:root=Bluetooth") //for bluetooth setting
let app = UIApplication.shared
app.openURL(url!)
}

Swift 3.0:适用于 iOS 10

注意:此 URL 是“私有(private) API”。如果使用该应用程序,将会被 App Store 审核者拒绝。

关于bluetooth - 如何在 iOS 10 中以编程方式打开蓝牙设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39750725/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com