From 68c24abca17a1d37484a85259b785cdfb62858c3 Mon Sep 17 00:00:00 2001 From: Alexander Simson Date: Wed, 25 Mar 2020 18:37:32 +0100 Subject: [PATCH 1/3] Add missing imports and files causing Carthage integration to fail. --- Castle.xcodeproj/project.pbxproj | 28 ++++++++++++++++++++++++++-- Castle/Classes/CASContext.m | 3 ++- Castle/Classes/Client/CASAPIClient.m | 1 - Castle/Classes/Util/CASUtils.m | 3 ++- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Castle.xcodeproj/project.pbxproj b/Castle.xcodeproj/project.pbxproj index 9162aa4..9b3b5fa 100644 --- a/Castle.xcodeproj/project.pbxproj +++ b/Castle.xcodeproj/project.pbxproj @@ -7,7 +7,10 @@ objects = { /* Begin PBXBuildFile section */ - B6B355E81ED71F9D00C2B817 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B6B355E71ED71F9D00C2B817 /* Info.plist */; }; + B63E94BE242BCCD1001993B7 /* CASContext.h in Headers */ = {isa = PBXBuildFile; fileRef = B63E94BC242BCCD1001993B7 /* CASContext.h */; }; + B63E94BF242BCCD1001993B7 /* CASContext.m in Sources */ = {isa = PBXBuildFile; fileRef = B63E94BD242BCCD1001993B7 /* CASContext.m */; }; + B63E94C3242BCCE6001993B7 /* CASReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = B63E94C1242BCCE6001993B7 /* CASReachability.h */; }; + B63E94C4242BCCE6001993B7 /* CASReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = B63E94C2242BCCE6001993B7 /* CASReachability.m */; }; B6B356061ED71FAD00C2B817 /* CASBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B355E91ED71FAD00C2B817 /* CASBatch.h */; }; B6B356071ED71FAD00C2B817 /* CASBatch.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B355EA1ED71FAD00C2B817 /* CASBatch.m */; }; B6B356081ED71FAD00C2B817 /* CASDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B355EB1ED71FAD00C2B817 /* CASDevice.h */; }; @@ -37,6 +40,10 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + B63E94BC242BCCD1001993B7 /* CASContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CASContext.h; path = Classes/CASContext.h; sourceTree = ""; }; + B63E94BD242BCCD1001993B7 /* CASContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CASContext.m; path = Classes/CASContext.m; sourceTree = ""; }; + B63E94C1242BCCE6001993B7 /* CASReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASReachability.h; sourceTree = ""; }; + B63E94C2242BCCE6001993B7 /* CASReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CASReachability.m; sourceTree = ""; }; B6B355DC1ED71D9700C2B817 /* Castle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Castle.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B6B355E71ED71F9D00C2B817 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B6B355E91ED71FAD00C2B817 /* CASBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CASBatch.h; path = Classes/CASBatch.h; sourceTree = ""; }; @@ -78,6 +85,16 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + B63E94C0242BCCE6001993B7 /* Reachability */ = { + isa = PBXGroup; + children = ( + B63E94C1242BCCE6001993B7 /* CASReachability.h */, + B63E94C2242BCCE6001993B7 /* CASReachability.m */, + ); + name = Reachability; + path = Classes/Reachability; + sourceTree = ""; + }; B6B355D21ED71D9600C2B817 = { isa = PBXGroup; children = ( @@ -111,11 +128,14 @@ B6B355F41ED71FAD00C2B817 /* CASRequestInterceptor.m */, B6B355F51ED71FAD00C2B817 /* CASScreen.h */, B6B355F61ED71FAD00C2B817 /* CASScreen.m */, + B63E94BC242BCCD1001993B7 /* CASContext.h */, + B63E94BD242BCCD1001993B7 /* CASContext.m */, B6B355F71ED71FAD00C2B817 /* Client */, B6B355FC1ED71FAD00C2B817 /* Public */, B6B356011ED71FAD00C2B817 /* UIViewController+CASScreen.h */, B6B356021ED71FAD00C2B817 /* UIViewController+CASScreen.m */, B6B356031ED71FAD00C2B817 /* Util */, + B63E94C0242BCCE6001993B7 /* Reachability */, B6B355E71ED71F9D00C2B817 /* Info.plist */, ); path = Castle; @@ -168,10 +188,12 @@ B6B356141ED71FAD00C2B817 /* CASAPIClient.h in Headers */, B6B356101ED71FAD00C2B817 /* CASRequestInterceptor.h in Headers */, B6B3560E1ED71FAD00C2B817 /* CASModel.h in Headers */, + B63E94C3242BCCE6001993B7 /* CASReachability.h in Headers */, B6B356161ED71FAD00C2B817 /* CASEvent.h in Headers */, B6B3560C1ED71FAD00C2B817 /* CASIdentity.h in Headers */, B6B356081ED71FAD00C2B817 /* CASDevice.h in Headers */, B6B356121ED71FAD00C2B817 /* CASScreen.h in Headers */, + B63E94BE242BCCD1001993B7 /* CASContext.h in Headers */, B6B3561C1ED71FAD00C2B817 /* UIViewController+CASScreen.h in Headers */, B6B356061ED71FAD00C2B817 /* CASBatch.h in Headers */, B6B3560A1ED71FAD00C2B817 /* CASEventStorage.h in Headers */, @@ -219,6 +241,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = B6B355D21ED71D9600C2B817; @@ -236,7 +259,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - B6B355E81ED71F9D00C2B817 /* Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -253,6 +275,7 @@ B6B356171ED71FAD00C2B817 /* CASEvent.m in Sources */, B6B3561F1ED71FAD00C2B817 /* CASUtils.m in Sources */, B6B3560D1ED71FAD00C2B817 /* CASIdentity.m in Sources */, + B63E94C4242BCCE6001993B7 /* CASReachability.m in Sources */, B6B356071ED71FAD00C2B817 /* CASBatch.m in Sources */, B6B3561D1ED71FAD00C2B817 /* UIViewController+CASScreen.m in Sources */, B6B356151ED71FAD00C2B817 /* CASAPIClient.m in Sources */, @@ -260,6 +283,7 @@ B6B3561B1ED71FAD00C2B817 /* CastleConfiguration.m in Sources */, B6B356131ED71FAD00C2B817 /* CASScreen.m in Sources */, B6B356091ED71FAD00C2B817 /* CASDevice.m in Sources */, + B63E94BF242BCCD1001993B7 /* CASContext.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Castle/Classes/CASContext.m b/Castle/Classes/CASContext.m index 552c345..369882d 100644 --- a/Castle/Classes/CASContext.m +++ b/Castle/Classes/CASContext.m @@ -5,8 +5,9 @@ // Created by Alexander Simson on 2018-02-12. // -#import "CASContext.h" +#import +#import "CASContext.h" #import "CASReachability.h" #import "Castle+Util.h" diff --git a/Castle/Classes/Client/CASAPIClient.m b/Castle/Classes/Client/CASAPIClient.m index ca423b1..aa814b8 100644 --- a/Castle/Classes/Client/CASAPIClient.m +++ b/Castle/Classes/Client/CASAPIClient.m @@ -10,7 +10,6 @@ #import #import "Castle.h" -#import "Castle+Util.h" #import "CastleConfiguration.h" #import "CASUtils.h" #import "CASEvent.h" diff --git a/Castle/Classes/Util/CASUtils.m b/Castle/Classes/Util/CASUtils.m index fb1ab5d..951dadc 100644 --- a/Castle/Classes/Util/CASUtils.m +++ b/Castle/Classes/Util/CASUtils.m @@ -5,8 +5,9 @@ // Copyright © 2017 Castle. All rights reserved. // -#import "CASUtils.h" +#import +#import "CASUtils.h" #import "Castle.h" static BOOL CastleDebugLoggingEnabled = NO; From 772d5a2810e3da9ad05b3f2e69927b33bbe50401 Mon Sep 17 00:00:00 2001 From: Alexander Simson Date: Wed, 25 Mar 2020 18:40:09 +0100 Subject: [PATCH 2/3] Update project. --- Castle.xcodeproj/project.pbxproj | 26 +++++++++++++++---- .../xcshareddata/xcschemes/Castle.xcscheme | 6 +---- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Castle.xcodeproj/project.pbxproj b/Castle.xcodeproj/project.pbxproj index 9b3b5fa..ab61fd9 100644 --- a/Castle.xcodeproj/project.pbxproj +++ b/Castle.xcodeproj/project.pbxproj @@ -227,7 +227,7 @@ B6B355D31ED71D9600C2B817 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0830; + LastUpgradeCheck = 1140; ORGANIZATIONNAME = Castle; TargetAttributes = { B6B355DB1ED71D9700C2B817 = { @@ -238,11 +238,11 @@ }; buildConfigurationList = B6B355D61ED71D9600C2B817 /* Build configuration list for PBXProject "Castle" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, en, + Base, ); mainGroup = B6B355D21ED71D9600C2B817; productRefGroup = B6B355DD1ED71D9700C2B817 /* Products */; @@ -300,15 +300,23 @@ 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_DOCUMENTATION_COMMENTS = YES; 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; @@ -332,7 +340,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -352,15 +360,23 @@ 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_DOCUMENTATION_COMMENTS = YES; 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; @@ -378,7 +394,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/Castle.xcodeproj/xcshareddata/xcschemes/Castle.xcscheme b/Castle.xcodeproj/xcshareddata/xcschemes/Castle.xcscheme index 73ba243..117bded 100644 --- a/Castle.xcodeproj/xcshareddata/xcschemes/Castle.xcscheme +++ b/Castle.xcodeproj/xcshareddata/xcschemes/Castle.xcscheme @@ -1,6 +1,6 @@ - - - - Date: Wed, 25 Mar 2020 18:45:33 +0100 Subject: [PATCH 3/3] Add CoreTelephony framework. --- Castle.xcodeproj/project.pbxproj | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Castle.xcodeproj/project.pbxproj b/Castle.xcodeproj/project.pbxproj index ab61fd9..dcae468 100644 --- a/Castle.xcodeproj/project.pbxproj +++ b/Castle.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + B612D061242BD012005B41B7 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B612D060242BD012005B41B7 /* CoreTelephony.framework */; }; B63E94BE242BCCD1001993B7 /* CASContext.h in Headers */ = {isa = PBXBuildFile; fileRef = B63E94BC242BCCD1001993B7 /* CASContext.h */; }; B63E94BF242BCCD1001993B7 /* CASContext.m in Sources */ = {isa = PBXBuildFile; fileRef = B63E94BD242BCCD1001993B7 /* CASContext.m */; }; B63E94C3242BCCE6001993B7 /* CASReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = B63E94C1242BCCE6001993B7 /* CASReachability.h */; }; @@ -40,6 +41,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + B612D060242BD012005B41B7 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreTelephony.framework; sourceTree = DEVELOPER_DIR; }; B63E94BC242BCCD1001993B7 /* CASContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CASContext.h; path = Classes/CASContext.h; sourceTree = ""; }; B63E94BD242BCCD1001993B7 /* CASContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CASContext.m; path = Classes/CASContext.m; sourceTree = ""; }; B63E94C1242BCCE6001993B7 /* CASReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASReachability.h; sourceTree = ""; }; @@ -79,12 +81,21 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + B612D061242BD012005B41B7 /* CoreTelephony.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + B612D05F242BD012005B41B7 /* Frameworks */ = { + isa = PBXGroup; + children = ( + B612D060242BD012005B41B7 /* CoreTelephony.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; B63E94C0242BCCE6001993B7 /* Reachability */ = { isa = PBXGroup; children = ( @@ -100,6 +111,7 @@ children = ( B6B355DE1ED71D9700C2B817 /* Castle */, B6B355DD1ED71D9700C2B817 /* Products */, + B612D05F242BD012005B41B7 /* Frameworks */, ); sourceTree = ""; };