Hey guys - I'm working with Compose Multiplatform ...
# multiplatform
c
Hey guys - I'm working with Compose Multiplatform for the first time (coming from Android dev and KMP), and I'm struggling to integrate GoogleSignIn with Cocoapods, looking for some help. TL;DR I have the
composeApp
integrated to the iOS app as a pod, which works great. I also have Sentry added as a pod, which also works and is accessible from the iOS code. However when I try to follow this tutorial, adding
GoogleSignIn
to the gradle cocoapods doesn't make it accessible in iosMain the way that it is with Sentry. Anybody have any idea why that might be? More details in thread.
build.gradle:
Copy code
cocoapods {
    version = "1.0"
    podfile = project.file("../iosApp/Podfile")
    name = "ComposeApp"
    homepage = "<http://www.lunareadingtracker.com|www.lunareadingtracker.com>"
    summary = "Luna shared layer"
    ios.deploymentTarget = "17.0"
    pod("Sentry") {
        version = "8.36.0"
        linkOnly = true
        extraOpts += listOf("-compiler-option", "-fmodules")
    }
    pod("GoogleSignIn") {
        version = "7.0.0"
        linkOnly = true
        extraOpts += listOf("-compiler-option", "-fmodules")
    }
    framework {
        baseName = "composeApp"
        isStatic = true
    }
}
Podfile.lock:
Copy code
PODS:
  - AppAuth (1.7.5):
    - AppAuth/Core (= 1.7.5)
    - AppAuth/ExternalUserAgent (= 1.7.5)
  - AppAuth/Core (1.7.5)
  - AppAuth/ExternalUserAgent (1.7.5):
    - AppAuth/Core
  - ComposeApp (1.0):
    - GoogleSignIn (= 7.0.0)
    - Sentry (= 8.36.0)
  - GoogleSignIn (7.0.0):
    - AppAuth (~> 1.5)
    - GTMAppAuth (< 3.0, >= 1.3)
    - GTMSessionFetcher/Core (< 4.0, >= 1.1)
  - GTMAppAuth (2.0.0):
    - AppAuth/Core (~> 1.6)
    - GTMSessionFetcher/Core (< 4.0, >= 1.5)
  - GTMSessionFetcher/Core (3.5.0)
  - Sentry (8.36.0):
    - Sentry/Core (= 8.36.0)
  - Sentry/Core (8.36.0)

DEPENDENCIES:
  - ComposeApp (from `../composeApp`)
  - GoogleSignIn

SPEC REPOS:
  trunk:
    - AppAuth
    - GoogleSignIn
    - GTMAppAuth
    - GTMSessionFetcher
    - Sentry

EXTERNAL SOURCES:
  ComposeApp:
    :path: "../composeApp"

SPEC CHECKSUMS:
  AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
  ComposeApp: 49e886fad0a620c4b21b87924050ca0e8f1c84cc
  GoogleSignIn: b232380cf495a429b8095d3178a8d5855b42e842
  GTMAppAuth: 99fb010047ba3973b7026e45393f51f27ab965ae
  GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
  Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57

PODFILE CHECKSUM: e6e265982d7a82c3894f983210570171101ea793

COCOAPODS: 1.15.2
file in iosMain - you can see that Sentry is available, but GoogleSignIn is not
v
I have done this one but even I was unable to setup using cocoapods so I have done it with the help of Swift Package Manager on the Xcode
c
Did you combine the two or just use SPM for everything? And how did you publish your shared code so that it could be consumed by SPM?
v
I had used SPM only and to combine i used the firebase gitlive libary