- File > Swift Packages > Add Package Dependency
- Add
https://github.com/Camji55/logsnag-swift.git
- Select "Up to Next Major" with "1.0.0"
import LogSnag
let logsnag = LogSnagClient(
project: "my-sass",
token: "7f568d735724351757637b1dbf108e5"
)
let success = try await logsnag.asyncPublish(
options: PublishOptions(
channel: "waitlist",
event: "User Joined",
icon: "🎉",
notify: true
)
)
logsnag.publish(
options: PublishOptions(
channel: "waitlist",
event: "User Joined",
icon: "🎉",
notify: true
)
)
.sink(
receiveCompletion: { _ in },
receiveValue: { _ in }
)
.store(in: &cancellables)