Thanks Jens and Quinn. I'll think about whether I should be providing my server with either and if so what.
On Tue, Apr 21, 2015 at 1:42 AM, Quinn "The Eskimo!" <[email protected]> wrote: > > On 20 Apr 2015, at 19:37, Nick Beadman <[email protected]> > wrote: > > > Does any one have any idea how I would write code to get the CFNetwork > and Darwin versions? > > @import Foundation; > > static NSString * CFNetworkVersion(void) { > return [NSBundle bundleWithIdentifier:@ > "com.apple.CFNetwork"].infoDictionary[@"CFBundleShortVersionString"]; > } > > #include <sys/utsname.h> > > static NSString * DarwinVersion(void) { > struct utsname u; > (void) uname(&u); > return [NSString stringWithUTF8String:u.release]; > } > > However, I'm with Jens here: if you're going to set a customised user > name, just use the OS name and version. The only reason to be sending this > goo is if you're server varies its behaviour base on the user agent string, > which is a bad idea in general and pretty rare for a download server (as > opposed to a server that's vending web pages, where it happens all the > time). > > Share and Enjoy > -- > Quinn "The Eskimo!" <http://www.apple.com/developer/> > Apple Developer Relations, Developer Technical Support, Core OS/Hardware > > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Macnetworkprog mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > > https://lists.apple.com/mailman/options/macnetworkprog/nick.beadman.lists%40gmail.com > > This email sent to [email protected] >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com This email sent to [email protected]
