美文网首页
iOS APP内跳转到 设置

iOS APP内跳转到 设置

作者: Khazan | 来源:发表于2023-11-20 12:55 被阅读0次

    跳转到 设置 - APP

    if let settingsUrl = URL(string: UIApplication.openSettingsURLString) {
      UIApplication.shared.open(settingsUrl)
    }
    

    其它方式

    1. 使用 "prefs:root="

    https://stackoverflow.com/questions/5655674/opening-the-settings-app-from-another-app/61383270#61383270

    iOS11后被禁用

    https://developer.apple.com/forums/thread/115981?answerId=358016022#358016022

    1. 使用 "App-Prefs:root"
    if let settingsUrl = URL(string: "App-Prefs:root") {
      UIApplication.shared.open(settingsUrl)
    }
    

    Apple将其视为私有API,Apple审核会拒绝

    https://developer.apple.com/forums/thread/691712?answerId=690943022#690943022

    相关文章

      网友评论

          本文标题:iOS APP内跳转到 设置

          本文链接:https://www.haomeiwen.com/subject/twlvwdtx.html