From 055d9e625d47d56e707d9624c9a14a37736516bb Mon Sep 17 00:00:00 2001 From: max-mironov Date: Wed, 22 Mar 2017 22:37:44 -0700 Subject: [PATCH] Fix Xcode warnings on building (#235) * Modified Issue_Template to be more descriptive * Some minor changes to decription field * Improved messages to make intention of creating different apps for different platforms more clear Due to multiple requests in discord chanel, https://github.com/Microsoft/react-native-code-push/issues/723, https://github.com/Microsoft/react-native-code-push/issues/717 * FIxed spelling for Readme * Supress XCode warnings on build See https://github.com/Microsoft/cordova-plugin-code-push/issues/218 for details --- src/ios/CodePushReportingManager.m | 2 ++ src/ios/InstallOptions.m | 2 +- src/ios/UpdateHashUtils.m | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ios/CodePushReportingManager.m b/src/ios/CodePushReportingManager.m index 3af38eb5..cfabb053 100644 --- a/src/ios/CodePushReportingManager.m +++ b/src/ios/CodePushReportingManager.m @@ -1,6 +1,8 @@ #import "CodePushReportingManager.h" #import "StatusReport.h" +#pragma GCC diagnostic ignored "-Wundeclared-selector" + @implementation CodePushReportingManager int HasFailedReport = -1; // -1 = unset, 0 = false, 1 = true diff --git a/src/ios/InstallOptions.m b/src/ios/InstallOptions.m index 552ab3bb..fcd0e6f0 100644 --- a/src/ios/InstallOptions.m +++ b/src/ios/InstallOptions.m @@ -12,7 +12,7 @@ -(void)encodeWithCoder:(NSCoder*)encoder { -(id)initWithCoder:(NSCoder*)decoder { self.installMode = [decoder decodeIntegerForKey:InstallModeKey]; - self.minimumBackgroundDuration = [decoder decodeIntegerForKey:MinimumBackgroundDurationKey]; + self.minimumBackgroundDuration = (int)[decoder decodeIntegerForKey:MinimumBackgroundDurationKey]; return self; } diff --git a/src/ios/UpdateHashUtils.m b/src/ios/UpdateHashUtils.m index 6e1ae436..39bb0938 100644 --- a/src/ios/UpdateHashUtils.m +++ b/src/ios/UpdateHashUtils.m @@ -63,7 +63,7 @@ + (NSString*)computeFinalHashFromManifestEntries:(NSMutableArray*)manifest + (NSString*)computeHashForData:(NSData*)inputData { uint8_t digest[CC_SHA256_DIGEST_LENGTH]; - CC_SHA256(inputData.bytes, inputData.length, digest); + CC_SHA256(inputData.bytes, (CC_LONG)inputData.length, digest); NSMutableString* inputHash = [NSMutableString stringWithCapacity:CC_SHA256_DIGEST_LENGTH * 2]; for (int i = 0; i < CC_SHA256_DIGEST_LENGTH; i++) { [inputHash appendFormat:@"%02x", digest[i]];