Skip to content

Symbol not found at runtime #469

@sjudd

Description

@sjudd

Platform

Apple

Installed

Swift Package Manager

Version

0.18.0 and 0.19.0

Steps to Reproduce

I followed the instructions here to add the gradle plugin: https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/. I set the version in swift package manager for the sentry to 8.55.1 when using sentry-kotlin-multiplatform 0.19.0, then when that had the runtime error below, I switched to 0.18.0 and 8.53.2, but I see the same issue.

The sentry gradle plugin is in the plugins list in the build.gradle.kts file in the shared module.

My sentry setup code is in commonMain and is pretty simple:

package com.withandy.mobile

import io.sentry.kotlin.multiplatform.Sentry

fun initializeSentry(dsn: String, environment: String) {
    Sentry.init { options ->
        options.dsn = dsn
        options.environment = environment
    }
}

I get this runtime error when I run the iOS app on the simulator (I haven't tried a real device):

dyld[98376]: Symbol not found: _OBJC_CLASS_$_PrivateSentrySDKOnly
  Referenced from: <1815E9D7-C028-3BDF-960C-0EEEDAC6B7B1> /Users/samueljudd/projects/oasis/android/mobile/build/xcode-frameworks/Debug/iphonesimulator18.2/andyMobileKit.framework/andyMobileKit
  Expected in:     <BC577ED8-A8DE-3D33-B514-B2EE3D6727A1> /Users/samueljudd/Library/Developer/CoreSimulator/Devices/ADFE8CFF-D60B-4231-9D10-75A5CDAB02A6/data/Containers/Bundle/Application/D5923DB2-B38D-4FD4-BDC6-5048DF03B49F/VisitRecorder.app/Frameworks/Sentry.framework/Sentry

Expected Result

I'd like it to not crash at runtime

Actual Result

It crashes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions