From cc1e43bd2d4b88218337b2318fab0c0b67d66c78 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 28 Oct 2018 18:06:09 +0000 Subject: IOS: Disable code using safeAreaInsets when compiling with iOS SDK 10 or below --- backends/platform/ios7/ios7_video.mm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm index 955f54a082..8e3edb3d84 100644 --- a/backends/platform/ios7/ios7_video.mm +++ b/backends/platform/ios7/ios7_video.mm @@ -801,6 +801,12 @@ uint getSizeNextPOT(uint size) { #endif -(void)adjustViewFrameForSafeArea { + // The code below does not quite compile with SDKs older than 11.0. + // warning: instance method '-safeAreaInsets' not found (return type defaults to 'id') + // error: no viable conversion from 'id' to 'UIEdgeInsets' + // So for now disable this code when compiled with an older SDK, which means it is only + // available when running on iOS 11+ if it has been compiled on iOS 11+ +#ifdef __IPHONE_11_0 #if __has_builtin(__builtin_available) if ( @available(iOS 11,*) ) { #else @@ -819,6 +825,7 @@ uint getSizeNextPOT(uint size) { } self.frame = newFrame; } +#endif } - (void)setViewTransformation { -- cgit v1.2.3