fluttercommunity / fluttercommunity/flutter_webview_plugin

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

Open
#409 8 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
1.5k
Forks
938
PR merge metrics
No merged PRs in 30d

Description

` /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)
`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in ios/Classes/FlutterWebviewPlugin.m at the warnings around lines 83, 252, and 318. Build the iOS example or plugin to reproduce the compiler diagnostics, then verify that the three incompatible conversion, pointer comparison, and format warnings are resolved without introducing new warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter, objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.