Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

iOS compilation errors #4

Open
jaumard opened this issue May 30, 2019 · 3 comments
Open

iOS compilation errors #4

jaumard opened this issue May 30, 2019 · 3 comments

Comments

@jaumard
Copy link

jaumard commented May 30, 2019

I installed the plugin and not problem on Android it works, but iOS is not compiling anymore

I get

11:57:37.852 7 info flutter.tools Failed to build iOS app
11:57:37.852 8 info flutter.tools Error output from Xcode build:
11:57:37.852 9 info flutter.tools ↳
11:57:37.852 10 info flutter.tools     ** BUILD FAILED **
11:57:37.852 11 info flutter.tools 
11:57:37.852 12 info flutter.tools 
11:57:37.852 13 info flutter.tools Xcode's output:
11:57:37.852 14 info flutter.tools ↳
11:57:37.852 15 info flutter.tools     === BUILD TARGET connectivity OF PROJECT Pods WITH CONFIGURATION Debug ===
11:57:37.852 16 info flutter.tools     /Users/jaumard/.pub-cache/hosted/pub.dartlang.org/multicast_lock-0.0.5/ios/Classes/MulticastLockPlugin.m:13:12: error: implicit conversion of 'int' to 'id _Nullable' is disallowed with ARC
11:57:37.852 17 info flutter.tools         result(true);
11:57:37.852 18 info flutter.tools                ^~~~
11:57:37.852 19 info flutter.tools     In module 'Darwin' imported from /Users/jaumard/IdeaProjects/lisa_flutter/packages/app/ios/Pods/Headers/Public/Flutter/Flutter/FlutterViewController.h:9:
11:57:37.852 20 info flutter.tools     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include/stdbool.h:32:14: note: expanded from macro 'true'
11:57:37.852 21 info flutter.tools     #define true 1
11:57:37.852 22 info flutter.tools                  ^
11:57:37.852 23 info flutter.tools     /Users/jaumard/.pub-cache/hosted/pub.dartlang.org/multicast_lock-0.0.5/ios/Classes/MulticastLockPlugin.m:13:12: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'id  _Nullable __strong' [-Wint-conversion]
11:57:37.852 24 info flutter.tools         result(true);
11:57:37.852 25 info flutter.tools                ^~~~
11:57:37.852 26 info flutter.tools     In module 'Darwin' imported from /Users/jaumard/IdeaProjects/lisa_flutter/packages/app/ios/Pods/Headers/Public/Flutter/Flutter/FlutterViewController.h:9:
11:57:37.852 27 info flutter.tools     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include/stdbool.h:32:14: note: expanded from macro 'true'
11:57:37.852 28 info flutter.tools     #define true 1
@psporysz
Copy link

psporysz commented Jan 21, 2020

I've fixed it by using @true instead of true:

- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
    result(@true);
}

@benkuper
Copy link

benkuper commented May 5, 2020

i confirm the fix is working, using MacOS Catalina VM and flutter 1.12.13
Is it possible to fix it in the package ?

@phranck
Copy link

phranck commented May 11, 2020

I've fixed it by using @true instead of true:

- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
    result(@true);
}

Correctly, it should be @YES, not @true. 🙃

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

No branches or pull requests

4 participants