diff --git a/Libraries/ART/RCTConvert+ART.m b/Libraries/ART/RCTConvert+ART.m index 704f12697..6135dc4f4 100644 --- a/Libraries/ART/RCTConvert+ART.m +++ b/Libraries/ART/RCTConvert+ART.m @@ -51,7 +51,7 @@ CGPathAddArc(path, NULL, NEXT_VALUE, NEXT_VALUE, NEXT_VALUE, NEXT_VALUE, NEXT_VALUE, NEXT_VALUE == 0); break; default: - RCTLogError(@"Invalid CGPath type %zd at element %zd of %@", type, i, arr); + RCTLogError(@"Invalid CGPath type %llu at element %llu of %@", (unsigned long long)type, (unsigned long long)i, arr); CGPathRelease(path); return NULL; } @@ -158,7 +158,7 @@ RCT_ENUM_CONVERTER(CTTextAlignment, (@{ case 3: // pattern return [[ARTPattern alloc] initWithArray:arr]; default: - RCTLogError(@"Unknown brush type: %zd", type); + RCTLogError(@"Unknown brush type: %llu", (unsigned long long)type); return nil; } } @@ -167,7 +167,7 @@ RCT_ENUM_CONVERTER(CTTextAlignment, (@{ { NSArray *arr = [self NSArray:json]; if (arr.count < offset + 2) { - RCTLogError(@"Too few elements in array (expected at least %zd): %@", 2 + offset, arr); + RCTLogError(@"Too few elements in array (expected at least %llu): %@", (unsigned long long)(2 + offset), arr); return CGPointZero; } return (CGPoint){ @@ -180,7 +180,7 @@ RCT_ENUM_CONVERTER(CTTextAlignment, (@{ { NSArray *arr = [self NSArray:json]; if (arr.count < offset + 4) { - RCTLogError(@"Too few elements in array (expected at least %zd): %@", 4 + offset, arr); + RCTLogError(@"Too few elements in array (expected at least %llu): %@", (unsigned long long)(4 + offset), arr); return CGRectZero; } return (CGRect){ @@ -193,7 +193,7 @@ RCT_ENUM_CONVERTER(CTTextAlignment, (@{ { NSArray *arr = [self NSArray:json]; if (arr.count < offset + 4) { - RCTLogError(@"Too few elements in array (expected at least %zd): %@", 4 + offset, arr); + RCTLogError(@"Too few elements in array (expected at least %llu): %@", (unsigned long long)(4 + offset), arr); return NULL; } return [self CGColor:[arr subarrayWithRange:(NSRange){offset, 4}]]; @@ -203,7 +203,7 @@ RCT_ENUM_CONVERTER(CTTextAlignment, (@{ { NSArray *arr = [self NSArray:json]; if (arr.count < offset) { - RCTLogError(@"Too few elements in array (expected at least %zd): %@", offset, arr); + RCTLogError(@"Too few elements in array (expected at least %llu): %@", (unsigned long long)offset, arr); return NULL; } arr = [arr subarrayWithRange:(NSRange){offset, arr.count - offset}]; diff --git a/Libraries/Text/RCTTextField.m b/Libraries/Text/RCTTextField.m index fa548c480..567ab31a9 100644 --- a/Libraries/Text/RCTTextField.m +++ b/Libraries/Text/RCTTextField.m @@ -90,7 +90,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder) notifyDelegate:YES]; } } else if (eventLag > RCTTextUpdateLagWarningThreshold) { - RCTLogWarn(@"Native TextInput(%@) is %zd events ahead of JS - try to make your JS faster.", _backedTextInput.text, eventLag); + RCTLogWarn(@"Native TextInput(%@) is %lld events ahead of JS - try to make your JS faster.", _backedTextInput.text, (long long)eventLag); } } diff --git a/Libraries/Text/RCTTextInput.m b/Libraries/Text/RCTTextInput.m index 4c63c2ef4..ed7bade62 100644 --- a/Libraries/Text/RCTTextInput.m +++ b/Libraries/Text/RCTTextInput.m @@ -87,7 +87,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame) if (eventLag == 0 && ![previousSelectedTextRange isEqual:selectedTextRange]) { [backedTextInput setSelectedTextRange:selectedTextRange notifyDelegate:NO]; } else if (eventLag > RCTTextUpdateLagWarningThreshold) { - RCTLogWarn(@"Native TextInput(%@) is %zd events ahead of JS - try to make your JS faster.", backedTextInput.text, eventLag); + RCTLogWarn(@"Native TextInput(%@) is %lld events ahead of JS - try to make your JS faster.", backedTextInput.text, (long long)eventLag); } } diff --git a/Libraries/Text/RCTTextView.m b/Libraries/Text/RCTTextView.m index 310691db4..3342e445e 100644 --- a/Libraries/Text/RCTTextView.m +++ b/Libraries/Text/RCTTextView.m @@ -235,7 +235,7 @@ static NSAttributedString *removeReactTagFromString(NSAttributedString *string) [self invalidateContentSize]; } else if (eventLag > RCTTextUpdateLagWarningThreshold) { - RCTLogWarn(@"Native TextInput(%@) is %zd events ahead of JS - try to make your JS faster.", self.text, eventLag); + RCTLogWarn(@"Native TextInput(%@) is %lld events ahead of JS - try to make your JS faster.", self.text, (long long)eventLag); } } diff --git a/Libraries/WebSocket/RCTWebSocketExecutor.m b/Libraries/WebSocket/RCTWebSocketExecutor.m index ecb0b260c..520337178 100644 --- a/Libraries/WebSocket/RCTWebSocketExecutor.m +++ b/Libraries/WebSocket/RCTWebSocketExecutor.m @@ -56,7 +56,7 @@ RCT_EXPORT_MODULE() if (!_url) { NSInteger port = [[[_bridge bundleURL] port] integerValue] ?: 8081; NSString *host = [[_bridge bundleURL] host] ?: @"localhost"; - NSString *URLString = [NSString stringWithFormat:@"http://%@:%zd/debugger-proxy?role=client", host, port]; + NSString *URLString = [NSString stringWithFormat:@"http://%@:%lld/debugger-proxy?role=client", host, (long long)port]; _url = [RCTConvert NSURL:URLString]; } diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index f7d054adc..759c577c7 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -68,7 +68,7 @@ RCT_CUSTOM_CONVERTER(NSData *, NSData, [json dataUsingEncoding:NSUTF8StringEncod for (NSNumber *number in json) { NSInteger index = number.integerValue; if (RCT_DEBUG && index < 0) { - RCTLogError(@"Invalid index value %zd. Indices must be positive.", index); + RCTLogError(@"Invalid index value %lld. Indices must be positive.", (long long)index); } [indexSet addIndex:index]; } @@ -403,7 +403,7 @@ static void convertCGStruct(const char *type, NSArray *fields, CGFloat *result, NSUInteger count = fields.count; if ([json isKindOfClass:[NSArray class]]) { if (RCT_DEBUG && [json count] != count) { - RCTLogError(@"Expected array with count %zd, but count is %zd: %@", count, [json count], json); + RCTLogError(@"Expected array with count %llu, but count is %llu: %@", (unsigned long long)count, (unsigned long long)[json count], json); } else { for (NSUInteger i = 0; i < count; i++) { result[i] = [RCTConvert CGFloat:RCTNilIfNull(json[i])]; diff --git a/React/Base/RCTKeyCommands.m b/React/Base/RCTKeyCommands.m index 93c21d08f..29ceb84f9 100644 --- a/React/Base/RCTKeyCommands.m +++ b/React/Base/RCTKeyCommands.m @@ -68,8 +68,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) - (NSString *)description { - return [NSString stringWithFormat:@"<%@:%p input=\"%@\" flags=%zd hasBlock=%@>", - [self class], self, _keyCommand.input, _keyCommand.modifierFlags, + return [NSString stringWithFormat:@"<%@:%p input=\"%@\" flags=%lld hasBlock=%@>", + [self class], self, _keyCommand.input, (long long)_keyCommand.modifierFlags, _block ? @"YES" : @"NO"]; } diff --git a/React/Base/RCTModuleMethod.mm b/React/Base/RCTModuleMethod.mm index 15ddf7065..c26ef1c28 100644 --- a/React/Base/RCTModuleMethod.mm +++ b/React/Base/RCTModuleMethod.mm @@ -493,12 +493,12 @@ RCT_EXTERN_C_END expectedCount -= 2; } - RCTLogError(@"%@.%s was called with %zd arguments but expects %zd arguments. " + RCTLogError(@"%@.%s was called with %lld arguments but expects %lld arguments. " @"If you haven\'t changed this method yourself, this usually means that " @"your versions of the native code and JavaScript code are out of sync. " @"Updating both should make this error go away.", RCTBridgeModuleNameForClass(_moduleClass), self.JSMethodName, - actualCount, expectedCount); + (long long)actualCount, (long long)expectedCount); return nil; } #endif diff --git a/React/Modules/RCTLayoutAnimation.m b/React/Modules/RCTLayoutAnimation.m index 3d3bf3b5c..4d5bf29c4 100644 --- a/React/Modules/RCTLayoutAnimation.m +++ b/React/Modules/RCTLayoutAnimation.m @@ -30,7 +30,7 @@ static UIViewAnimationOptions UIViewAnimationOptionsFromRCTAnimationType(RCTAnim // http://stackoverflow.com/questions/18870447/how-to-use-the-default-ios7-uianimation-curve return (UIViewAnimationOptions)(_currentKeyboardAnimationCurve << 16); default: - RCTLogError(@"Unsupported animation type %zd", type); + RCTLogError(@"Unsupported animation type %lld", (long long)type); return UIViewAnimationOptionCurveEaseInOut; } } diff --git a/React/Modules/RCTRedBox.m b/React/Modules/RCTRedBox.m index dbcea6513..7eeb19bb0 100644 --- a/React/Modules/RCTRedBox.m +++ b/React/Modules/RCTRedBox.m @@ -186,12 +186,12 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder) - (NSString *)formatFrameSource:(RCTJSStackFrame *)stackFrame { NSString *fileName = RCTNilIfNull(stackFrame.file) ? [stackFrame.file lastPathComponent] : @""; - NSString *lineInfo = [NSString stringWithFormat:@"%@:%zd", + NSString *lineInfo = [NSString stringWithFormat:@"%@:%lld", fileName, - stackFrame.lineNumber]; + (long long)stackFrame.lineNumber]; if (stackFrame.column != 0) { - lineInfo = [lineInfo stringByAppendingFormat:@":%zd", stackFrame.column]; + lineInfo = [lineInfo stringByAppendingFormat:@":%lld", (long long)stackFrame.column]; } return lineInfo; } diff --git a/React/Views/RCTView.m b/React/Views/RCTView.m index c434a0290..dfa5f4534 100644 --- a/React/Views/RCTView.m +++ b/React/Views/RCTView.m @@ -197,7 +197,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:unused) case RCTPointerEventsBoxNone: return hitSubview; default: - RCTLogError(@"Invalid pointer-events specified %zd on %@", _pointerEvents, self); + RCTLogError(@"Invalid pointer-events specified %lld on %@", (long long)_pointerEvents, self); return hitSubview ?: hitView; } } diff --git a/React/Views/RCTWebViewManager.m b/React/Views/RCTWebViewManager.m index ddc66e2b8..ec6192ef5 100644 --- a/React/Views/RCTWebViewManager.m +++ b/React/Views/RCTWebViewManager.m @@ -153,7 +153,7 @@ RCT_EXPORT_METHOD(startLoadWithResult:(BOOL)result lockIdentifier:(NSInteger)loc [_shouldStartLoadLock unlockWithCondition:0]; } else { RCTLogWarn(@"startLoadWithResult invoked with invalid lockIdentifier: " - "got %zd, expected %zd", lockIdentifier, _shouldStartLoadLock.condition); + "got %lld, expected %lld", (long long)lockIdentifier, (long long)_shouldStartLoadLock.condition); } }