From 2c3e8ea74f9bbb879f8f76bdf7c2ab5af16da810 Mon Sep 17 00:00:00 2001 From: Boris Yankov Date: Thu, 4 Oct 2018 20:00:37 +0300 Subject: [PATCH] Fix Xcode project settings warnings Pulled these changes from the RN upstream commit: https://github.com/facebook/react-native/commit/c298e0ae0643391de4228068bc00cb8827a05209#diff-065bc63a1a0283f31962d4ab2316087b We already have enabled some of the settings thus producing less changes than in RN's commit. Warnings fixed: https://user-images.githubusercontent.com/5353594/41173274-1a4fbb3e-6b0b-11e8-973b-8290794a4f8b.png Enabled for both 'Debug' and 'Release' builds. Upgraded Project settings to be compatible with Xcode 9.4 This change introduced in the Starting project template here: https://github.com/facebook/react-native/commit/c298e0ae0643391de4228068bc00cb8827a05209#diff-065bc63a1a0283f31962d4ab2316087b --- ios/ZulipMobile.xcodeproj/project.pbxproj | 18 +++++++++++++++++- .../xcschemes/ZulipMobile.xcscheme | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ios/ZulipMobile.xcodeproj/project.pbxproj b/ios/ZulipMobile.xcodeproj/project.pbxproj index e35b7875eb6..bf1ea894f4f 100644 --- a/ios/ZulipMobile.xcodeproj/project.pbxproj +++ b/ios/ZulipMobile.xcodeproj/project.pbxproj @@ -1017,7 +1017,7 @@ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 810; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = Facebook; TargetAttributes = { 00E356ED1AD99517003FC87E = { @@ -1880,14 +1880,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -1933,14 +1941,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; diff --git a/ios/ZulipMobile.xcodeproj/xcshareddata/xcschemes/ZulipMobile.xcscheme b/ios/ZulipMobile.xcodeproj/xcshareddata/xcschemes/ZulipMobile.xcscheme index 7031695b72d..08845b45c05 100644 --- a/ios/ZulipMobile.xcodeproj/xcshareddata/xcschemes/ZulipMobile.xcscheme +++ b/ios/ZulipMobile.xcodeproj/xcshareddata/xcschemes/ZulipMobile.xcscheme @@ -1,6 +1,6 @@