Closed WarpRulez closed 5 years ago
Mea culpa .. iOS-ntp has not had much love for quite a long time. I respond to issues but have not actually tried to compile the code recently. I have been asked to not delete the repo, so it continues in a somewhat unsupported state .. such is the nature of open source, I'm sorry.
CocoaAsyncSocket is easy to find; it's the first hit if you Google for that term. The two necessary files used to be included in this project but were removed when CocoaAsyncSocket went through a period of changes, but iOS-ntp's dependency on CocoaAsyncSocket is clearly present in the Podspec, and is referenced in the most recent change note: "removed asyncsocket files from network-lib".
I have added the CocoaAsyncSocket URL to the README file, and will review the rest of it for inconsistencies that might be confusing, but it's always good to remember that free software is often worth all the money you spend on it. I wrote this this library a long time ago, when iPhones got their time from the phone company and it could off by minutes (!), in order to get an accurate time for my app, and others have used it to check that the system clock time hasn't been fiddled with to avoid registration. In the intervening years iOS has adopted the reference NTP implementation making system time accurate, and eliminating my need for it.
Given that it only requires GCDAsyncUpdSocket.h and GCDAsyncUpdSocket.m, and nothing else from that project, it would be easy enough to just add those two files into the project...
It used to be like that but freezing them in this project meant they went out of date and gave people trouble. The CocoaPods mechanism refers to the CocoaAsyncSocket repo, so "pod install" gets the latest version. Just to be sure, I pulled a fresh copy of the iOS-ntp repo yesterday, did a pod install, and built and run the sample app. There were a few Xcode complaints but, otherwise, success.
When the source files of ios-ntp are added to a project, trying to compile gives an error from NetAssociation.h because of importing a non-existent <CocoaAsyncSocket/GCDAsyncUpdScoket.h>
From what I can gather, this is not a Cocoa system library, but apparently some random third-party library from somewhere. This doesn't seem to be included in the ios-ntp git project, nor can I find a single mention of it anywhere in its documentation, apart from an obscure "the files from CocoaAsyncSocket have been replaced with the most recent versions" (which quite clearly is untrue, as no such files are found anywhere in the ios-ntp git project.)