maxhumber / GeoPoster

A Simple SDK Example/Template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🌎 GeoPoster

Just a simple iOS SDK Example/Template for iOS 13.0+

Quickstart

Initialize GeoPosterService with an API key:

import GeoPoster

let service = GeoPosterService("123")

And post a location from a CoreLocation manager to the server with the log method:

import CoreLocation

do { 
    let location = CLLocationCoordinate2D(latitude: 0, longitude: 0)
    let response = try await service.log(location, time: .now, extra: "A note")
    print(response)
} catch { 
    print(error)
}

If successful, service.log will return a GeoPosterResponse object.

Tests

To execute package tests use: ⌘ + U.

Swift Package Manager

Add GeoPoster to your project with:

dependencies: [
    .package(url: "https://github.com/maxhumber/GeoPoster.git", .upToNextMajor(from: "1.0"))
]

About

A Simple SDK Example/Template

License:BSD 2-Clause "Simplified" License


Languages

Language:Swift 100.0%