From b973007e425aed10757a5f2ca4309b18cd378b1f Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Thu, 28 Jun 2018 22:11:45 +0200 Subject: [PATCH] Add apple association site --- public/javascripts/app.js | 4 ++-- resources/apple-app-site-association.json | 13 +++++++++++++ routes/index.js | 5 +++++ tests/run.sh | 5 +++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 resources/apple-app-site-association.json diff --git a/public/javascripts/app.js b/public/javascripts/app.js index 3344123..220e98c 100644 --- a/public/javascripts/app.js +++ b/public/javascripts/app.js @@ -5,10 +5,10 @@ } function buildItunesUrl() { - var iosId = $('meta[property="al:ios:app_store_id"]').attr("content"); - return "https://itunes.apple.com/app/id" + iosId; + return "https://itunes.apple.com/app/status-ethereum-anywhere/id" + iosId; } + function isAndroid(userAgent) { return userAgent.toLowerCase().indexOf("android") > -1; } diff --git a/resources/apple-app-site-association.json b/resources/apple-app-site-association.json new file mode 100644 index 0000000..29be625 --- /dev/null +++ b/resources/apple-app-site-association.json @@ -0,0 +1,13 @@ +{ + "applinks": { + "apps": [], + "details": [ + { + "appID": "DTX7Z4U3YA.im.status.ethereum", + "paths": [ + "*" + ] + } + ] + } +} diff --git a/routes/index.js b/routes/index.js index 0af1fc9..05015a1 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,6 +1,7 @@ var express = require('express'); var router = express.Router(); var assetLinks = require('../resources/assetlinks.json'); +var appleSiteAssociation = require('../resources/apple-app-site-association.json'); router.get('/health', function(req, res) { res.send('OK'); @@ -10,6 +11,10 @@ router.get('/.well-known/assetlinks.json', function(req, res) { res.json(assetLinks); }); +router.get('/.well-known/apple-app-site-association', function(req, res) { + res.json(appleSiteAssociation); +}); + router.get('/chat/:chatType/:chatId', function(req, res, next) { res.render('index', { title: 'Status.im join ' + req.params.chatId + ' chat', diff --git a/tests/run.sh b/tests/run.sh index 5ea4fce..09b7645 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -6,6 +6,11 @@ shakedown GET /.well-known/assetlinks.json content_type 'application/json' contains 'sha256_cert_fingerprints' +shakedown GET /.well-known/apple-app-site-association + status 200 + content_type 'application/json' + contains 'im.status.ethereum' + shakedown GET /chat/public/abc status 200