diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index 0633a78211..52e6af116b 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -678,7 +678,7 @@ static constexpr int kNumProfilerSamplesPerSec = 5; // TODO(gaaclarke): Find way to eliminate this data copy. NSData* data = [NSData dataWithBytes:screenshot.data->writable_data() length:screenshot.data->size()]; - NSString* format = [NSString stringWithCString:screenshot.format.c_str()]; + NSString* format = [NSString stringWithUTF8String:screenshot.format.c_str()]; NSNumber* width = @(screenshot.frame_size.fWidth); NSNumber* height = @(screenshot.frame_size.fHeight); return result(@[ width, height, format, data ]); @@ -821,8 +821,7 @@ static void SetEntryPoint(flutter::Settings* settings, NSString* entrypoint, NSS if (initialRoute != nil) { self.initialRoute = initialRoute; } else if (settings.route.empty() == false) { - self.initialRoute = [NSString stringWithCString:settings.route.c_str() - encoding:NSUTF8StringEncoding]; + self.initialRoute = [NSString stringWithUTF8String:settings.route.c_str()]; } FlutterView.forceSoftwareRendering = settings.enable_software_rendering; diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index c88366b669..67c7211b3e 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -342,7 +342,7 @@ typedef struct MouseState { [center addObserver:self selector:@selector(onAccessibilityStatusChanged:) - name:UIAccessibilityVoiceOverStatusChanged + name:UIAccessibilityVoiceOverStatusDidChangeNotification object:nil]; [center addObserver:self diff --git a/engine/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.m b/engine/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.m index 3a0d429b86..698207aa68 100644 --- a/engine/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.m +++ b/engine/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenImage.m @@ -114,7 +114,7 @@ NS_INLINE NSString* _platformName() { char* answer = malloc(size); sysctlbyname("hw.model", answer, &size, NULL, 0); - NSString* results = [NSString stringWithCString:answer encoding:NSUTF8StringEncoding]; + NSString* results = [NSString stringWithUTF8String:answer]; free(answer); return results; }