mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-18 23:07:27 +02:00
* fix(deep-link): filter out web links instead of app links in deep link domains
This fixes a bug where on ios, deeplinks just don't work because the final Info.plist file doesn't have them.
And also used a better id for CFBundleURLName
Fixes regression from 2804803949
* feat(deep-link): add `webcredentials:` for iOS entitlements file
* chore: added changelog for deep-link patch
* add tests
* remove webcredentials
* -js
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
32 lines
882 B
JavaScript
32 lines
882 B
JavaScript
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import http from 'http'
|
|
import fs from 'fs'
|
|
import path from 'path'
|
|
import * as url from 'url'
|
|
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
|
|
|
|
const port = 8125
|
|
|
|
http
|
|
.createServer(function (request, response) {
|
|
if (request.url === '/.well-known/apple-app-site-association') {
|
|
// eslint-disable-next-line
|
|
fs.readFile(
|
|
path.resolve(__dirname, 'apple-app-site-association'),
|
|
function (_error, content) {
|
|
response.writeHead(200, { 'Content-Type': 'application/json' })
|
|
response.end(content, 'utf-8')
|
|
}
|
|
)
|
|
} else {
|
|
response.writeHead(404)
|
|
response.end()
|
|
}
|
|
})
|
|
.listen(port)
|
|
|
|
console.log(`Server running at http://127.0.0.1:${port}/`)
|