Skip to content

Commit

Permalink
disable 'Add to Home Screen' for iOS 16+
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Oct 25, 2023
1 parent d8d1953 commit 4d3bb03
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions deltachat-ios/Controller/WebxdcViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,13 @@ class WebxdcViewController: WebViewViewController {
let alert = UIAlertController(title: webxdcName + "" + String.localized("webxdc_app"),
message: nil,
preferredStyle: .safeActionSheet)
let addToHomescreenAction = UIAlertAction(title: String.localized("add_to_home_screen"), style: .default, handler: addToHomeScreen(_:))
alert.addAction(addToHomescreenAction)
if #available(iOS 16, *) {
dcContext.logger?.info("cannot add shortcut as passing data: urls to local server was disabled by apple on on iOS 16")
} else {
let addToHomescreenAction = UIAlertAction(title: String.localized("add_to_home_screen"), style: .default, handler: addToHomeScreen(_:))
alert.addAction(addToHomescreenAction)
}

if sourceCodeUrl != nil {
let sourceCodeAction = UIAlertAction(title: String.localized("source_code"), style: .default, handler: openUrl(_:))
alert.addAction(sourceCodeAction)
Expand Down

0 comments on commit 4d3bb03

Please sign in to comment.