From c87c60d2bb54bdbb43455b5dbedcf2af53c9aaed Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Thu, 4 Oct 2018 15:06:42 -1000 Subject: Specify arches to compile via variable and clear up iOS11 availability warning --- CyteKit/ViewController.mm | 4 +++- CyteKit/WebViewController.mm | 3 ++- iPhonePrivate.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm index 2e5d5a1..7f2a53f 100644 --- a/CyteKit/ViewController.mm +++ b/CyteKit/ViewController.mm @@ -84,8 +84,10 @@ // Load on first appearance. We don't need to set the loaded flag here // because it is set for us the first time -reloadData is called. - if (kCFCoreFoundationVersionNumber >= 1443.00) +#ifdef __arm64__ + if (@available(iOS 11, *)) self.navigationController.navigationBar.prefersLargeTitles = YES; +#endif if (![self hasLoaded]) [self reloadData]; } diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 329d568..0394834 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -213,7 +213,8 @@ static _H Diversions_; + (void) _initialize { [WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]; - [WebPreferences setWebKitLinkTimeVersion:PACKED_VERSION(3453,0,0)]; + if ([WebPreferences respondsToSelector:@selector(setWebKitLinkTimeVersion:)]) + [WebPreferences setWebKitLinkTimeVersion:PACKED_VERSION(3453,0,0)]; void *js(NULL); if (js == NULL) diff --git a/iPhonePrivate.h b/iPhonePrivate.h index e8748a4..9852bbe 100644 --- a/iPhonePrivate.h +++ b/iPhonePrivate.h @@ -281,6 +281,7 @@ enum { // }}} // @interface Web* {{{ @interface WebPreferences : NSObject ++ (void) setWebKitLinkTimeVersion:(NSInteger)version; - (void) setCacheModel:(WebCacheModel)value; - (void) setJavaScriptCanOpenWindowsAutomatically:(BOOL)value; @end -- cgit v1.2.3