Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build ios warning: incompatible pointer to integer conversion assigning to 'BOOL' (aka 'signed char') from 'id _Nullable' #409

Open
sm9i opened this issue May 7, 2019 · 8 comments

Comments

@sm9i
Copy link

sm9i commented May 7, 2019

/Users/furun/.pub-cache/hosted/pub.flutter-io.cn/flutter_webview_plugin-0.3.4/ios/Classes/FlutterWebviewPlugin.m:83:22: warning: incompatible pointer to integer conversion assigning to 'BOOL' (aka 'signed char') from 'id _Nullable' [-Wint-conversion] _enableAppScheme = call.arguments[@"enableAppScheme"]; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/furun/.pub-cache/hosted/pub.flutter-io.cn/flutter_webview_plugin-0.3.4/ios/Classes/FlutterWebviewPlugin.m:252:24: warning: comparison of distinct pointer types ('NSString *' and 'NSNull * _Nonnull') [-Wcompare-distinct-pointer-types] if (_invalidUrlRegex != [NSNull null] && urlString != nil) { ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ /Users/furun/.pub-cache/hosted/pub.flutter-io.cn/flutter_webview_plugin-0.3.4/ios/Classes/FlutterWebviewPlugin.m:318:94: warning: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat] [channel invokeMethod:@"onError" arguments:@{@"code": [NSString stringWithFormat:@"%ld", error.code], @"error": error.localizedDescription}]; ~~~ ^~~~~~~~~~ %ld (long)

@sm9i
Copy link
Author

sm9i commented May 7, 2019

sorry,Somewhat chaotic

@anysunflower
Copy link

meet the issue too,already set info.plist

@anysunflower
Copy link

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.12.13+hotfix.6, on Mac OS X 10.15.2 19C57, locale zh-Hans-CN)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.


[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
[!] Android Studio (not installed)
[✓] Connected device (1 available)

info.plist already set

Xcode target: iOS 10

my build report

Xcode's output:
↳
    /Users/Geek/work/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.10+1/ios/Classes/FlutterWebviewPlugin.m:92:22: warning: incompatible pointer to integer conversion assigning to
    'BOOL' (aka 'signed char') from 'id _Nullable' [-Wint-conversion]
        _enableAppScheme = call.arguments[@"enableAppScheme"];
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/Geek/work/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.10+1/ios/Classes/FlutterWebviewPlugin.m:434:98: warning: values of type 'NSInteger' should not be used as format
    arguments; add an explicit cast to 'long' instead [-Wformat]
        [channel invokeMethod:@"onHttpError" arguments:@{@"code": [NSString stringWithFormat:@"%ld", error.code], @"url": url}];
                                                                                               ~~~   ^~~~~~~~~~
                                                                                               %ld   (long)
    /Users/Geek/work/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.10+1/ios/Classes/FlutterWebviewPlugin.m:442:98: warning: values of type 'NSInteger' should not be used as format
    arguments; add an explicit cast to 'long' instead [-Wformat]
        [channel invokeMethod:@"onHttpError" arguments:@{@"code": [NSString stringWithFormat:@"%ld", error.code], @"error": error.localizedDescription}];
                                                                                               ~~~   ^~~~~~~~~~
                                                                                               %ld   (long)
    /Users/Geek/work/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.10+1/ios/Classes/FlutterWebviewPlugin.m:450:106: warning: values of type 'NSInteger' should not be used as format
    arguments; add an explicit cast to 'long' instead [-Wformat]
                [channel invokeMethod:@"onHttpError" arguments:@{@"code": [NSString stringWithFormat:@"%ld", response.statusCode], @"url": webView.URL.absoluteString}];
                                                                                                       ~~~   ^~~~~~~~~~~~~~~~~~~
                                                                                                       %ld   (long)

@rfitz123
Copy link

Same issue, but with FLTFirebaseAuthPlugin. Any fixes?

@anysunflower
Copy link

Same issue, but with FLTFirebaseAuthPlugin. Any fixes?

I fixed all the error by following steps,you can have a try

reference

@awhitford
Copy link

I am using flutter_webview_plugin 0.3.11 with Flutter 1.17 and still see 4 warnings generated:

    /Users/anthony/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.11/ios/Classes/FlutterWebviewPlugin.m:92:22:
    warning: incompatible pointer to integer conversion assigning to 'BOOL' (aka 'signed char') from 'id _Nullable' [-Wint-conversion]
        _enableAppScheme = call.arguments[@"enableAppScheme"];
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/anthony/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.11/ios/Classes/FlutterWebviewPlugin.m:434:98:
    warning: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat]
        [channel invokeMethod:@"onHttpError" arguments:@{@"code": [NSString stringWithFormat:@"%ld", error.code], @"url": url}];
                                                                                               ~~~   ^~~~~~~~~~
                                                                                               %ld   (long)
    /Users/anthony/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.11/ios/Classes/FlutterWebviewPlugin.m:442:98:
    warning: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat]
        [channel invokeMethod:@"onHttpError" arguments:@{@"code": [NSString stringWithFormat:@"%ld", error.code], @"error":
        error.localizedDescription}];
                                                                                               ~~~   ^~~~~~~~~~
                                                                                               %ld   (long)
    /Users/anthony/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.11/ios/Classes/FlutterWebviewPlugin.m:450:106:
    warning: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat]
                [channel invokeMethod:@"onHttpError" arguments:@{@"code": [NSString stringWithFormat:@"%ld", response.statusCode], @"url":
                webView.URL.absoluteString}];
                                                                                                       ~~~   ^~~~~~~~~~~~~~~~~~~
                                                                                                       %ld   (long)
    4 warnings generated.

@demsey2
Copy link

demsey2 commented Jul 21, 2020

any update on this one will be appreciated

@gururaja-kambala
Copy link

same issue here, any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants