Browse Source

Fix NCTalk.app integration

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 years ago
parent
commit
7656360ab4
2 changed files with 7 additions and 3 deletions
  1. 4 0
      iOSClient/Brand/iOSClient.plist
  2. 3 3
      iOSClient/Menu/UIViewController+Menu.swift

+ 4 - 0
iOSClient/Brand/iOSClient.plist

@@ -46,6 +46,10 @@
 	<true/>
 	<true/>
 	<key>ITSEncryptionExportComplianceCode</key>
 	<key>ITSEncryptionExportComplianceCode</key>
 	<string>3b2bb0b1-fa12-43cb-a78f-0f7e1afd33df</string>
 	<string>3b2bb0b1-fa12-43cb-a78f-0f7e1afd33df</string>
+	<key>LSApplicationQueriesSchemes</key>
+	<array>
+		<string>nextcloudtalk</string>
+	</array>
 	<key>LSRequiresIPhoneOS</key>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<true/>
 	<key>LSSupportsOpeningDocumentsInPlace</key>
 	<key>LSSupportsOpeningDocumentsInPlace</key>

+ 3 - 3
iOSClient/Menu/UIViewController+Menu.swift

@@ -39,11 +39,11 @@ extension UIViewController {
             sendEmail(to: components.path)
             sendEmail(to: components.path)
         case "spreed":
         case "spreed":
             let appDelegate = UIApplication.shared.delegate as! AppDelegate
             let appDelegate = UIApplication.shared.delegate as! AppDelegate
-            if let talkUrl = URL(string: "nextcloudtalk://open-conversation?server=\(appDelegate.urlBase)&user=\(userId)&withUser=\(appDelegate.userId)"),
+            if let talkUrl = URL(string: "nextcloudtalk://open-conversation?server=\(appDelegate.urlBase)&user=\(appDelegate.userId)&withUser=\(userId)"),
                UIApplication.shared.canOpenURL(talkUrl) {
                UIApplication.shared.canOpenURL(talkUrl) {
-                UIApplication.shared.open(talkUrl, options: [.universalLinksOnly: true])
+                UIApplication.shared.open(talkUrl)
             } else if let url = action.hyperlinkUrl {
             } else if let url = action.hyperlinkUrl {
-                UIApplication.shared.open(url, options: [:])
+                UIApplication.shared.open(url)
             }
             }
         default:
         default:
             guard let url = action.hyperlinkUrl, UIApplication.shared.canOpenURL(url) else {
             guard let url = action.hyperlinkUrl, UIApplication.shared.canOpenURL(url) else {