80% chance :thinking:
Using FirebasUI dependencies in kotlin-native with cocoapods support throws error during compilation.
Not sure if valid fix, but if I replace module imports in FirebaseUI code then our project compiles successfully.
@import UIKit; => #import <UIKit/UIKit.h>@import Foundation => #import <Foundation/Foundation.h>edit:
Enable modules (C and Object-c) is true for project. use_frameworks! :linkage => :static'FirebaseUI/Google dependency to to kotlin-native projectgradle podspec cmdpod installUse of '@import' when modules are disabled
error is thrown in 3 places:
Successful compilation
Hi. I am having the same issue building FirebaseUI for iOS, mixing C++ and ObjectiveC. No idea how to fix this. Any help?
Edit: I managed to fix it following @Audkar suggestion. I am not sure about further implications of replacing @import by #import. Anyways, It would be handy if the FirebaseUI team replaces the source with these modifications to make the framework compatible with Objective-C++ code.
@morganchen12 would you accept PR which replaces these imports?
Yes, PRs are very welcome.
https://answers.unity.com/questions/1679641/use-of.html
need c++ flag setup
Using -fmodules and -fcxx-modules flags fixes this as long as the file extension is .m
(but not supported by .mm or rather Objective-C++ yet, year 2021).
Note that I tested with both
g++andclang++compilers (as I really wanted to make this work).
Most helpful comment
https://answers.unity.com/questions/1679641/use-of.html
need c++ flag setup