diff --git a/shell/platform/darwin/ios/framework/Source/FlutterChannelKeyResponder.mm b/shell/platform/darwin/ios/framework/Source/FlutterChannelKeyResponder.mm index e1579024a715c..4e9131711bc31 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterChannelKeyResponder.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterChannelKeyResponder.mm @@ -132,7 +132,7 @@ - (void)handlePress:(nonnull FlutterUIPressProxy*)press NSString* characters = getEventCharacters(press.key.characters, press.key.keyCode); NSString* charactersIgnoringModifiers = getEventCharacters(press.key.charactersIgnoringModifiers, press.key.keyCode); - NSMutableDictionary* keyMessage = [@{ + NSMutableDictionary* keyMessage = [[@{ @"keymap" : @"ios", @"type" : type, @"keyCode" : @(press.key.keyCode), @@ -141,7 +141,7 @@ - (void)handlePress:(nonnull FlutterUIPressProxy*)press @"charactersIgnoringModifiers" : charactersIgnoringModifiers == nil ? @"" : charactersIgnoringModifiers, - } mutableCopy]; + } mutableCopy] autorelease]; [self.channel sendMessage:keyMessage reply:^(id reply) { bool handled = reply ? [[reply valueForKey:@"handled"] boolValue] : true;