diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 8df862e4e3d0a..2612c1320893d 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -193,14 +193,14 @@ static bool ClipRRectContainsPlatformViewBoundingRect(const SkRRect& clip_rrect, void FlutterPlatformViewsController::OnCreate(FlutterMethodCall* call, FlutterResult& result) { NSDictionary* args = [call arguments]; - long viewId = [args[@"id"] longValue]; + int64_t viewId = [args[@"id"] longLongValue]; NSString* viewTypeString = args[@"viewType"]; std::string viewType(viewTypeString.UTF8String); if (views_.count(viewId) != 0) { result([FlutterError errorWithCode:@"recreating_view" message:@"trying to create an already created view" - details:[NSString stringWithFormat:@"view id: '%ld'", viewId]]); + details:[NSString stringWithFormat:@"view id: '%lld'", viewId]]); } NSObject* factory = factories_[viewType].get(); @@ -234,7 +234,8 @@ static bool ClipRRectContainsPlatformViewBoundingRect(const SkRRect& clip_rrect, arguments:params]; UIView* platform_view = [embedded_view view]; // Set a unique view identifier, so the platform view can be identified in unit tests. - platform_view.accessibilityIdentifier = [NSString stringWithFormat:@"platform_view[%ld]", viewId]; + platform_view.accessibilityIdentifier = + [NSString stringWithFormat:@"platform_view[%lld]", viewId]; views_[viewId] = fml::scoped_nsobject>([embedded_view retain]); FlutterTouchInterceptingView* touch_interceptor = [[[FlutterTouchInterceptingView alloc] diff --git a/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm b/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm index ac01ef57bc1cf..ba2399ab9f88c 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.mm @@ -90,7 +90,7 @@ - (void)handleMethodCall:(nonnull FlutterMethodCall*)call result:(nonnull Flutte if ([[call method] isEqualToString:@"create"]) { NSMutableDictionary* args = [call arguments]; if ([args objectForKey:@"id"]) { - int64_t viewId = [args[@"id"] longValue]; + int64_t viewId = [args[@"id"] longLongValue]; NSString* viewType = [NSString stringWithUTF8String:([args[@"viewType"] UTF8String])]; [self onCreateWithViewID:viewId viewType:viewType result:result]; } else { @@ -100,7 +100,7 @@ - (void)handleMethodCall:(nonnull FlutterMethodCall*)call result:(nonnull Flutte } } else if ([[call method] isEqualToString:@"dispose"]) { NSNumber* arg = [call arguments]; - int64_t viewId = [arg longValue]; + int64_t viewId = [arg longLongValue]; [self onDisposeWithViewID:viewId result:result]; } else { result(FlutterMethodNotImplemented);