初始化

This commit is contained in:
2025-04-09 18:55:14 +08:00
commit 6e1ae24845
2315 changed files with 256628 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
{
"deploymentTarget": "12.0"
}

View File

@@ -0,0 +1,20 @@
import { OpenSchema, CanOpenURL } from '../interface.uts'
export const openSchema : OpenSchema = function (url : string) : void {
if (canOpenURL(url)) {
let uri = new URL(string = url)
UIApplication.shared.open(uri!, options = new Map<UIApplication.OpenExternalURLOptionsKey, any>(), completionHandler = null)
} else {
console.error('url param Error: ', url)
}
}
export const canOpenURL : CanOpenURL = function (url : string) : boolean {
if (typeof url == 'string' && url.length > 0) {
let uri = new URL(string = url)
if (uri != null && UIApplication.shared.canOpenURL(uri!)) {
return true
}
}
return false
}