This is a swift package that exposes libwebsockets.xcframework built from the libwebsockets github repository. This simplifies the process of importing the prebuilt libwebsockets.xcframework into your project, eliminating the need for manual building.
To use libwebsockets
in your own project, you can use:
// swift-tools-version:5.6
import PackageDescription
let package = Package(
name: "MyPackage",
dependencies: [
.package(
url: "https://github.com/abaltatech/libwebsockets-ios.git",
.upToNextMajor(from: "3.2.1") // or `.upToNextMinor
)
],
targets: [
.target(
name: "MyTarget",
dependencies: [
.product(name: "Libwebsockets", package: "libwebsockets-ios")
]
)
]
)
Add https://github.com/abaltatech/libwebsockets-ios.git to your package dependencies
You can view the api reference docs at https://libwebsockets.org/lws-api-doc-main/html/index.html
For more information you can visit the libwebsockets repository
This package uses the same license as the official libwebsockets library. The license can be found in the LICENSE.md
file.
Include the c++ headers
#include <libwebsockets/libwebsockets.h>