diff --git a/app/sagas/deepLinking.js b/app/sagas/deepLinking.js index 59b3e7d2f34bb40e6fd08dbff75a501aae9fff91..9cd2d57f517b7787ea29a6fa24ae144ee98b33b2 100644 --- a/app/sagas/deepLinking.js +++ b/app/sagas/deepLinking.js @@ -31,8 +31,18 @@ const handleOpen = function* handleOpen({ params }) { yield take(types.APP.READY); } + if (!params.host) { + return; + } + const host = `https://${ params.host }`; + try { + yield RocketChat.testServer(host); + } catch (error) { + return; + } + // TODO: needs better test // if deep link is from same server if (server === host) { diff --git a/ios/RocketChatRN/Info.plist b/ios/RocketChatRN/Info.plist index accf9760b3a885032d108f12d372815ff3c1a082..9f7b252646358bfc4918e95f8c74c606f596fa3c 100644 --- a/ios/RocketChatRN/Info.plist +++ b/ios/RocketChatRN/Info.plist @@ -30,7 +30,6 @@ <key>CFBundleURLSchemes</key> <array> <string>rocketchat</string> - <string>https://go.rocket.chat</string> </array> </dict> </array> diff --git a/ios/RocketChatRN/RocketChatRN.entitlements b/ios/RocketChatRN/RocketChatRN.entitlements index 903def2af53062463744294d5ad4c4ef8d9a4381..1484e4f68b960ca709ab9c0f69119abe3a42cec6 100644 --- a/ios/RocketChatRN/RocketChatRN.entitlements +++ b/ios/RocketChatRN/RocketChatRN.entitlements @@ -4,5 +4,9 @@ <dict> <key>aps-environment</key> <string>development</string> + <key>com.apple.developer.associated-domains</key> + <array> + <string>applinks:go.rocket.chat</string> + </array> </dict> </plist>