This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +30
-5
lines changed Expand file tree Collapse file tree 7 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -68,3 +68,11 @@ if (is_fuchsia) {
6868if ((is_ios || is_mac ) && defined (enable_bitcode )) {
6969 flutter_enable_bitcode = enable_bitcode
7070}
71+
72+ if (is_ios || is_mac ) {
73+ flutter_cflags_objc = [
74+ " -Werror=overriding-method-mismatch" ,
75+ " -Werror=undeclared-selector" ,
76+ ]
77+ flutter_cflags_objcc = flutter_cflags_objc
78+ }
Original file line number Diff line number Diff line change @@ -120,6 +120,9 @@ source_set("fml") {
120120 }
121121
122122 if (is_ios || is_mac ) {
123+ cflags_objc = flutter_cflags_objc
124+ cflags_objcc = flutter_cflags_objcc
125+
123126 sources += [
124127 " platform/darwin/cf_utils.cc" ,
125128 " platform/darwin/cf_utils.h" ,
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ group("darwin") {
2020}
2121
2222source_set (" flutter_channels" ) {
23+ cflags_objc = flutter_cflags_objc
24+ cflags_objcc = flutter_cflags_objcc
25+
2326 sources = [
2427 " common/buffer_conversions.h" ,
2528 " common/buffer_conversions.mm" ,
Original file line number Diff line number Diff line change 22# Use of this source code is governed by a BSD-style license that can be
33# found in the LICENSE file.
44
5+ import (" //flutter/common/config.gni" )
56import (" framework_shared.gni" )
67
78source_set (" common" ) {
9+ cflags_objc = flutter_cflags_objc
10+ cflags_objcc = flutter_cflags_objcc
11+
812 sources = [
913 " buffer_conversions.h" ,
1014 " buffer_conversions.mm" ,
@@ -34,6 +38,9 @@ config("framework_relative_headers") {
3438
3539# Framework code shared between iOS and macOS.
3640source_set (" framework_shared" ) {
41+ cflags_objc = flutter_cflags_objc
42+ cflags_objcc = flutter_cflags_objcc
43+
3744 sources = [
3845 " framework/Source/FlutterChannels.mm" ,
3946 " framework/Source/FlutterCodecs.mm" ,
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ + (instancetype)sharedInstance {
1313 return _sharedInstance;
1414}
1515
16- - (NSData *)encode : (NSData *)message {
16+ - (NSData *)encode : (id )message {
17+ NSAssert ([message isKindOfClass: [NSData class ]], @" " );
1718 return message;
1819}
1920
@@ -31,10 +32,12 @@ + (instancetype)sharedInstance {
3132 return _sharedInstance;
3233}
3334
34- - (NSData *)encode : (NSString *)message {
35+ - (NSData *)encode : (id )message {
36+ NSAssert ([message isKindOfClass: [NSString class ]], @" " );
37+ NSString * stringMessage = message;
3538 if (message == nil )
3639 return nil ;
37- const char * utf8 = message .UTF8String ;
40+ const char * utf8 = stringMessage .UTF8String ;
3841 return [NSData dataWithBytes: utf8 length: strlen (utf8)];
3942}
4043
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ shared_library("create_flutter_framework_dylib") {
4646
4747 public = _flutter_framework_headers
4848
49+ cflags_objc = flutter_cflags_objc
50+ cflags_objcc = flutter_cflags_objcc
51+
4952 sources = [
5053 " framework/Source/FlutterAppDelegate.mm" ,
5154 " framework/Source/FlutterBinaryMessengerRelay.mm" ,
Original file line number Diff line number Diff line change 88#include " flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h"
99#include " flutter/shell/platform/darwin/ios/framework/Source/FlutterPluginAppLifeCycleDelegate_internal.h"
1010
11- #pragma GCC diagnostic error "-Woverriding-method-mismatch"
12-
1311static NSString * kUIBackgroundMode = @" UIBackgroundModes" ;
1412static NSString * kRemoteNotificationCapabitiliy = @" remote-notification" ;
1513static NSString * kBackgroundFetchCapatibility = @" fetch" ;
You can’t perform that action at this time.
0 commit comments