SwiftEventShotter is focused on transmitting errors that occur on the client-side via platforms such as Discord or Slack. SDK detect the client's network status, store events in local storage if they cannot be sent. And transmit the events once the client regains network connectivity. The features are designed for personal apps or applications with a small user base in the early stages. It offers a simple way to design and view platform-specific logging objects or messages. Currently, Discord and Slack are supported.
To send Slack message, you must know Slack webhookURL. Then, SDK send the event to Slack.
let slackSDK = SwiftEventShooterSDK(type:.slack(.init(slackWebHookURL: "SlackURL")))
slackSDK.sendMessage(event: TestEventObject(message: "Hello slack"))
slackSDK.sendMessage(event: "Hello world")
To send Discord message, you must know Discord webhookURL. Then, SDK send the event to Discord.
let discordSDK = SwiftEventShooterSDK(type: .discord(.init(discordNetworkURL: "DiscordWebHookURL")))
discordSDK.sendMessage(event: TestEventObject(message: "Hello Discord"))
discordSDK.sendMessage(event: "Hello world")
If you want to save the failed network or failed to transmit event, call configure
method.
let sdk = SwiftEventShotter(...)
sdk.configure()
dependencies: [
.package(url: "https://github.com/MaraMincho/SwiftEventShooter", .upToNextMajor(from: "1.0.0"))
]