From ef6daebf15f004ab9f80be986fe046ba5c8fb988 Mon Sep 17 00:00:00 2001 From: Justin Weiss Date: Sun, 4 Dec 2016 16:22:59 -0800 Subject: [PATCH] Fixed some more warnings. --- Classes/DGSPhoneAppDelegate.m | 2 +- Classes/Table Cells/BooleanCell.m | 1 + Classes/Table Cells/SelectCell.m | 1 + Classes/Views/MessageView.m | 11 +++- DGS.entitlements | 8 +++ DGSPhone-Info.plist | 2 +- DGSPhone.xcodeproj/project.pbxproj | 80 ++++++++++++++++++++++++++++-- 7 files changed, 96 insertions(+), 9 deletions(-) create mode 100644 DGS.entitlements diff --git a/Classes/DGSPhoneAppDelegate.m b/Classes/DGSPhoneAppDelegate.m index 6e061408..19b6e28d 100644 --- a/Classes/DGSPhoneAppDelegate.m +++ b/Classes/DGSPhoneAppDelegate.m @@ -26,7 +26,7 @@ @interface DGSPhoneAppDelegate () // backgrounded, but I don't need to check if I already got push notifications. // Unfortunately, there's no good activation hook method I can check to only // check for outstanding notifications if we didn't receive a push notification. -@property (nonatomic) BOOL *receivedRemoteNotification; +@property (nonatomic) BOOL receivedRemoteNotification; @end @implementation DGSPhoneAppDelegate diff --git a/Classes/Table Cells/BooleanCell.m b/Classes/Table Cells/BooleanCell.m index 96d04762..a1149d8a 100644 --- a/Classes/Table Cells/BooleanCell.m +++ b/Classes/Table Cells/BooleanCell.m @@ -12,6 +12,7 @@ - (id)init { } - (void)awakeFromNib { + [super awakeFromNib]; UISwitch *theSwitch = [[UISwitch alloc] initWithFrame:CGRectZero]; self.toggleSwitch = theSwitch; self.accessoryView = theSwitch; diff --git a/Classes/Table Cells/SelectCell.m b/Classes/Table Cells/SelectCell.m index 70f97050..ac6b5971 100644 --- a/Classes/Table Cells/SelectCell.m +++ b/Classes/Table Cells/SelectCell.m @@ -25,6 +25,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus } - (void)awakeFromNib { + [super awakeFromNib]; self.picker = nil; } diff --git a/Classes/Views/MessageView.m b/Classes/Views/MessageView.m index 3800360b..6e82dfe6 100644 --- a/Classes/Views/MessageView.m +++ b/Classes/Views/MessageView.m @@ -18,6 +18,7 @@ - (id)initWithFrame:(CGRect)frame { } - (void)awakeFromNib { + [super awakeFromNib]; self.showInputView = YES; } @@ -25,8 +26,11 @@ - (void)keyboardWillBeShown:(NSNotification *)aNotification { CGSize kbSize = [[aNotification userInfo][UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; NSTimeInterval duration = [[aNotification userInfo][UIKeyboardAnimationDurationUserInfoKey] floatValue]; UIViewAnimationCurve curve = [[aNotification userInfo][UIKeyboardAnimationCurveUserInfoKey] intValue]; + + // see the discussion here: http://stackoverflow.com/questions/7327249/ios-how-to-convert-uiviewanimationcurve-to-uiviewanimationoptions#7327374 + UIViewAnimationOptions options = curve << 16; - [UIView animateWithDuration:duration delay:0 options:curve animations:^(void) { + [UIView animateWithDuration:duration delay:0 options:options animations:^(void) { self.messageInputView.frame = CGRectOffset(self.messageInputView.frame, 0, -kbSize.height); } completion:nil]; } @@ -35,8 +39,11 @@ - (void)keyboardWillBeHidden:(NSNotification *)aNotification { CGSize kbSize = [[aNotification userInfo][UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; NSTimeInterval duration = [[aNotification userInfo][UIKeyboardAnimationDurationUserInfoKey] floatValue]; UIViewAnimationCurve curve = [[aNotification userInfo][UIKeyboardAnimationCurveUserInfoKey] intValue]; + + // see the discussion here: http://stackoverflow.com/questions/7327249/ios-how-to-convert-uiviewanimationcurve-to-uiviewanimationoptions#7327374 + UIViewAnimationOptions options = curve << 16; - [UIView animateWithDuration:duration delay:0 options:curve animations:^(void) { + [UIView animateWithDuration:duration delay:0 options:options animations:^(void) { self.messageInputView.frame = CGRectOffset(self.messageInputView.frame, 0, kbSize.height); } completion:nil]; } diff --git a/DGS.entitlements b/DGS.entitlements new file mode 100644 index 00000000..903def2a --- /dev/null +++ b/DGS.entitlements @@ -0,0 +1,8 @@ + + + + + aps-environment + development + + diff --git a/DGSPhone-Info.plist b/DGSPhone-Info.plist index 6c391109..a3c44027 100644 --- a/DGSPhone-Info.plist +++ b/DGSPhone-Info.plist @@ -25,7 +25,7 @@ CFBundleSignature ???? CFBundleVersion - 116 + 124 ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/DGSPhone.xcodeproj/project.pbxproj b/DGSPhone.xcodeproj/project.pbxproj index a92d8c80..4d10c539 100755 --- a/DGSPhone.xcodeproj/project.pbxproj +++ b/DGSPhone.xcodeproj/project.pbxproj @@ -141,6 +141,7 @@ DA419A6011BA0C0600B3050E /* FuegoBoard.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FuegoBoard.mm; sourceTree = ""; }; DA419D4311BB2DA400B3050E /* CurrentGamesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurrentGamesController.h; sourceTree = ""; }; DA419D4411BB2DA400B3050E /* CurrentGamesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CurrentGamesController.m; sourceTree = ""; }; + DA427CF71DA0816F001E4304 /* DGS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DGS.entitlements; sourceTree = ""; }; DA476A5214DA109F00AAF7E0 /* SenTestingKit.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; DA4BC703179517C900C74040 /* ExpandingLabelCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExpandingLabelCell.h; sourceTree = ""; }; DA4BC704179517C900C74040 /* ExpandingLabelCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExpandingLabelCell.m; sourceTree = ""; }; @@ -300,6 +301,7 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + DA427CF71DA0816F001E4304 /* DGS.entitlements */, DAEE341C15884ECA00300B29 /* Podfile */, DADD1CE111FD3C43005922A3 /* FAQ.md */, DADD1CDD11FD3C0B005922A3 /* Readme.md */, @@ -612,8 +614,19 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0720; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "Justin Weiss"; + TargetAttributes = { + 1D6058900D05DD3D006BFB54 = { + DevelopmentTeam = SB3AKTYGF8; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Push = { + enabled = 1; + }; + }; + }; + }; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DGSPhone" */; compatibilityVersion = "Xcode 3.2"; @@ -796,7 +809,11 @@ ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_ENTITLEMENTS = DGS.entitlements; + CODE_SIGN_IDENTITY = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + DEVELOPMENT_TEAM = SB3AKTYGF8; GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -822,6 +839,10 @@ ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_ENTITLEMENTS = DGS.entitlements; + CODE_SIGN_IDENTITY = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = SB3AKTYGF8; GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = DGSPhone_Prefix.pch; @@ -842,16 +863,31 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = FUEGO_NDEBUG; GCC_THUMB_SUPPORT = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; }; name = Debug; @@ -859,7 +895,19 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Distribution: Justin Weiss (SB3AKTYGF8)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Distribution"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", NS_BLOCK_ASSERTIONS, @@ -867,11 +915,14 @@ FUEGO_NDEBUG, ); GCC_THUMB_SUPPORT = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PROVISIONING_PROFILE = "05b1e2ad-1db4-4a77-a4b3-30fbc01e7e9d"; SDKROOT = iphoneos; }; name = Release; @@ -879,13 +930,28 @@ DA667DC0125AE40300CA9A13 /* Adhoc */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Distribution"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; }; name = Adhoc; @@ -897,7 +963,11 @@ ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_ENTITLEMENTS = DGS.entitlements; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + DEVELOPMENT_TEAM = SB3AKTYGF8; GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = DGSPhone_Prefix.pch;