Thread
#multiplatform
    kgonyon

    kgonyon

    3 years ago
    Hello, I am currently trying to make a multiplatform library for our android and ios applications. I have everything except I want to pull in the Firebase SDK for ios using cinterop. I have everything hooked in and working except when I build the linker gives me the following error.
    Undefined symbols for architecture arm64:
      "___isOSVersionAtLeast", referenced from:
          +[GULAppEnvironmentUtil isAppStoreReceiptSandbox] in GoogleUtilities(GULAppEnvironmentUtil.o)
      "_utf8_nextCharSafeBody", referenced from:
          -[FSRWebSocket _innerPumpScanner] in FirebaseDatabase(FSRWebSocket.o)
    ld: symbol(s) not found for architecture arm64
    cinterops {
                        firebase {
    
                            includeDirs {
                                allHeaders "${carthageDir}/FirebaseCore.framework/Headers",
                                        "${carthageDir}/FirebaseDatabase.framework/Headers",
                                        "${carthageDir}/FirebaseAnalytics.framework/Headers"
                            }
    
                            compilerOpts "-F${carthageDir}"
                        }
                    }
                    linkerOpts "-F${carthageDir}"
    language = Objective-C
    headers = FirebaseDatabase.h FirebaseCore.h
    compilerOpts = -framework FirebaseDatabase -framework Firebase -framework FirebaseCore -framework leveldb-library -framework GoogleUtilities -framework GoogleAppMeasurement -framework FIRAnalyticsConnector -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework nanopb -framework FirebaseAnalytics
    linkerOpts = -framework FirebaseDatabase -framework Firebase -framework FirebaseCore -framework leveldb-library -framework GoogleUtilities -framework GoogleAppMeasurement -framework FIRAnalyticsConnector -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework nanopb -framework FirebaseAnalytics
    olonho

    olonho

    3 years ago
    there are explanations in https://jonnyzzz.com/blog/2018/06/13/link-error-3/, essentially this is a linker problem we will try to fix in upcoming releases
    s

    svyatoslav.scherbina

    3 years ago
    This link covers the first undefined symbol,
    ___isOSVersionAtLeast
    .
    _utf8_nextCharSafeBody
    issue is likely to disappear after adding
    -licucore
    to
    linkerOpts
    .
    kgonyon

    kgonyon

    3 years ago
    Thanks! Glad to hear a fix is coming and I'll try these workarounds for now.