Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 29f6f70

Browse files
committed
replace c str with NSString
1 parent 30c851a commit 29f6f70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
NSDictionary<NSString*, id>* args = [call arguments];
130130

131131
long viewId = [args[@"id"] longValue];
132+
NSString* viewTypeString = args[@"viewType"];
132133
std::string viewType([args[@"viewType"] UTF8String]);
133134

134135
if (views_.count(viewId) != 0) {
@@ -142,8 +143,8 @@
142143
result([FlutterError
143144
errorWithCode:@"unregistered_view_type"
144145
message:[NSString stringWithFormat:@"A UIKitView widget is trying to create a "
145-
@"PlatformView with an unregistered type: < %s >",
146-
viewType.c_str()]
146+
@"PlatformView with an unregistered type: < %@ >",
147+
viewTypeString]
147148
details:@"If you are the author of the PlatformView, make sure `registerViewFactory`"
148149
@"is invoked.\n"
149150
@"See: "

0 commit comments

Comments
 (0)