A simple NTP (Network Time Protocol) framework for iOS
import NTPKit
// ...
let server = NTPServer.default
let date = try? server.date()
print(date)
#import <NTPKit/NTPKit.h>
// ...
NTPServer *server = [NTPServer defaultServer];
NSDate *date = [server dateWithError:nil];
NSLog(@"%@", date);
import NTPKit
// ...
let server = NTPServer(hostname:"pool.ntp.org", port:123)
let date = try? server.date()
print(date)
#import <NTPKit/NTPKit.h>
// ...
NTPServer *server = [[NTPServer alloc] initWithHostname:@"pool.ntp.org" port:123];
NSDate *date = [server dateWithError:nil];
NSLog(@"%@", date);