This project is a mirror of the iOS-ntp project hosted on Google code by Gavin Eadie
The structure of this project may need some cleaning up and modernisation but it is ARC compatible and runs fine on Xcode 4.6.2.
It probably neeeds to be worked around a newer version of Cocoa Async Socket https://github.com/mattsoftware/CocoaAsyncSocket
git clone git://github.com/jessedc/iOS-ntp.git ios-ntp
cd ios-ntp
git submodule sync
git submodule update --init
open ntpA.xcodeproj
An application testbed and a network time protocol client for iOS. This is a work in progress.
The clock on an iPhone, iPod Touch and iPad is not closely synchronized to the correct time. In the case of a device with access to the telephone system, there is a setting to enable synchronizing to the phone company time but that time has been known to be over a minute different from UTC.
This project contains code to provide time obtained from standard time servers using the network time protocol (NTP: RFCs 4330 and 5905). The implementation is not a rigorous as described in those RFCs since my goal was to improve time accuracy to within a second, not to fractions of milliseconds.
The original project is available here: http://code.google.com/p/ios-ntp
The MIT License (MIT) Copyright (c) 2012, Ramsay Consulting
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.