PingSDK sends log to the server
Sends a log to the server from the client iOS app with the following
- User location
- Timestamp
- Comment
PingSDK can be installed through swift package manager.
Note - The app should ask permission for user location before using SDK. The steps are explained here . This has to be done before calling the log
function.
In order to be able to log data you have to create an instance first.
let pingLogger = PingTracker()
You can either pass around this instance, or add an extension to the PingTracker
class and add a shared instance property.
extension PingTracker {
static let shared: PingTracker = PingTracker()
}
log()
function takes an optional parameter of PingEvent
object. Add explicit timestamp or comment to this event object
let event = PingEvent(timestamp: Double?, comment: String?)
then call the function
PingTracker.shared.log(event)
When no parameter is passed the current timestamp is send to server.
- Add Cocoapods and carthage support
- Add more tests and run in CI