Add user-agent for tv-os
This commit is contained in:
parent
c77310bb5d
commit
36cd96acce
|
@ -96,7 +96,7 @@
|
|||
_URLOperations = [NSMutableDictionary new];
|
||||
SDHTTPHeadersMutableDictionary *headerDictionary = [SDHTTPHeadersMutableDictionary dictionary];
|
||||
NSString *userAgent = nil;
|
||||
#if SD_IOS
|
||||
#if SD_UIKIT
|
||||
// User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
|
||||
userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];
|
||||
#elif SD_WATCH
|
||||
|
|
Loading…
Reference in New Issue