spm support

This commit is contained in:
KonstantinHub
2024-09-09 18:31:31 +03:00
parent ee17e08843
commit e03858df19
2 changed files with 27 additions and 1 deletions

View File

@@ -463,7 +463,9 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
}
open func onLinkPressed(url: URL) {
UIApplication.shared.openURL(url)
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url)
}
}
open func playSound(_ systemSoundId: SystemSoundID) {

24
Package.swift Normal file
View File

@@ -0,0 +1,24 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "OnlineChatSdk",
platforms: [.iOS(.v12)],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "OnlineChatSdk",
targets: ["OnlineChatSdk"]),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "OnlineChatSdk",
path: "OnlineChatSdk",
sources: ["Classes"]
)
]
)