Ivan
11/09/2022, 2:47 PMbuild.gradle
cocoapods
block, we added pods("FirebaseAnalytics")
.
Adding the pod work fine and Analytics is working, but now Xcode has lost all reference to my shared project, none of the autocomplete works and it's full of errors about none of my shared
classes are in the scope.
From my investigation, after gradle runs its magic, it's supposed to generates a framework of my shared
module at path build/cocoapods/framework
. Inside the framework, there's supposed to be a shared.framework/Headers/shared.h
where all the shared
module's headers are. But the issue is that after I add the pod()
function inside the cocoapods
block, the framework only contains a placeholder.h
file inside the Headers folder which is only contains this single line
// Autogenerated placeholder header. Do not edit manually.
The strange thing is while Xcode is filled with errors, I can actually build and run the app perfectly fine. Also if I remove the pods("FirebaseAnalytics")
, everything is back to normal, shared.h
is back in the Headers folder instead of placeholder.h
. Any ideas how to resolve this issue?Landry Norris
11/09/2022, 2:49 PM./gradlew syncFramework -Pkotlin.native.cocoapods.platform=iphonesimulator -Pkotlin.native.cocoapods.archs=x86_64 -Pkotlin.native.cocoapods.configuration=Debug
Landry Norris
11/09/2022, 2:50 PMIvan
11/09/2022, 2:59 PMIvan
11/09/2022, 3:06 PM:shared:generateDummyFramework
should be what is creating the placeholder.h
, and if I build on Android Studio, I can see the last task gradle tries to do is :shared:syncFramework
, which it seems Xcode hasn't ran this task.
If Xcode runs that command in the background when it builds, then shouldn't building the app cause shared.h
to be created and all Xcode errors should disappear?Landry Norris
11/09/2022, 3:08 PM