Latest 1.0.1
Homepage https://github.com/ncvitak/NTPKit
License BSD
Platforms ios 8.0, requires ARC
Authors

A simple NTP (Network Time Protocol) framework for iOS

Quick Start

Default Server

Swift
import NTPKit
// ...
let server = NTPServer.default
let date = try? server.date()
print(date)
Objective-C
#import <NTPKit/NTPKit.h>
// ...
NTPServer *server = [NTPServer defaultServer];
NSDate *date = [server dateWithError:nil];
NSLog(@"%@", date);

Custom Server

Swift
import NTPKit
// ...
let server = NTPServer(hostname:"pool.ntp.org", port:123)
let date = try? server.date()
print(date)
Objective-C
#import <NTPKit/NTPKit.h>
// ...
NTPServer *server = [[NTPServer alloc] initWithHostname:@"pool.ntp.org" port:123];
NSDate *date = [server dateWithError:nil];
NSLog(@"%@", date);

Latest podspec

{
    "name": "NTPKit",
    "version": "1.0.1",
    "summary": "A Simple NTP framework for iOS",
    "homepage": "https://github.com/ncvitak/NTPKit",
    "license": {
        "type": "BSD",
        "file": "LICENSE"
    },
    "source": {
        "git": "https://github.com/ncvitak/NTPKit.git",
        "tag": "1.0.1"
    },
    "authors": {
        "Nicholas Cvitak": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "NTPKit/*.{c,h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This