hello user,
I am new to unity and I am building my first project in iOS.
There is a googleadmob plugins in my project.
When I build the project in unity the project successfully build there is no problem.
But in Xcode it gives me an error in GADUObjectCache.h that use of @import when modules are disabled
I tried everything on google but nothing works…
Need help plz
I figured it out! In Xcode right under where you click “Build Settings” it says “All” and “Basic”. Mine had basic selected, and even when you search from “modules”, nothing shows up! But when I clicked “All” instead, I could see the modules setting.
I found answer myselft just
In Xcode set Enable Modules (C and Objective-C) to Yes in Build Settings.
To resolve this in Unity Cloud build, use the Xcode Manipulation API to set modules to “YES”. Details in this post: https://forum.unity3d.com/threads/ios-cloud-build-error-use-of-import-when-modules-are-disabled.330706/
The key line is:
proj.AddBuildProperty(target, “CLANG_ENABLE_MODULES”, “YES”);