https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

Jack Darlington

01/19/2021, 8:24 PM
Hello, I have dependencies on Firebase to use in iOS. I add them to my cocoapods section in gradle, and the first time it builds it is really slow(almost 30 mins) and makes my computer heat up. Anyway of speeding this up? Particularily happens on podBuildFirebaseIphoneos task. my cocoapods section
Copy code
ios()
cocoapods {
    ...
    pod("Firebase/Auth", moduleName = "FirebaseAuth")
    pod("Firebase/Firestore", moduleName = "FirebaseFirestore")
    pod("FirebaseMessaging", moduleName = "FirebaseMessaging")
    ...
}
Is this normal?
t

Thomas Myrden

01/19/2021, 8:25 PM
If I had to guess, your local xcode version and therefore swift version is out of step with whatever Firebase's distributed binary is currently built for. This is causing Firebase to build from source so it's built for your version of swift.
But yea, it's likely normal.
j

Jack Darlington

01/19/2021, 9:32 PM
Ok cool thanks. Might look up the binaries see if there is one for for my xcode version, something ti look into anyway, thanks
So quick update on this. It only seems to happen when i build from within my android main project, it is fine when i build through AppCode (would assume XCode too). So my solution was to add a property "platform" to gradle.properties and I wrap the ios(), cocoapods_() & iosSourceSets i_n an if statement