Open sof9816 opened 2 weeks ago
Hello @sof9816, thanks for reaching out. I couldn't reproduce this issue.
Does this also happen to you when you start a new project and add Sentry? If so, can you send us the test project?
I manage to reproduce this twice:
1- New Xcode 16 project, adding https://github.com/getsentry/sentry-cocoa.git as dependency and all its 3 modules: (regular, dynamic, and swiftui).
2- With your Kotlin Multiplatform dependency (https://github.com/getsentry/sentry-kotlin-multiplatform). Again, with Xcode 16, and importing it as the docs say through Cocoapods Gradle plugin.
Thank you very much for your response, I believe the problem is because you added all the targets.
If I got it right you're using SPM for method number 1. Sentry and Sentry-Dynamic cannot be used together. They are the same SDK with different linking.
Can you try adding just one of this two.
That works surely. However, that's not what's blocking me from using Xcode 16, as I mentioned merely as an example. My main issue is the example #2, with Kotlin Multiplatform. I am not sure if that would mean two different fixes -- if so, I'm happy to create a new issue on its repo.
I'm happy to create a new issue on its repo.
No need to, we can keep track of it in here.
@buenaflor Had you tried Xcode 16 already? Can you help us with this issue?
I haven't tried xcode 16 yet, I'll have a look
I'll try to get to this issue asap, I'm out for droidcon new york and the hotel internet is painfully slow for updating my mac and xcode..
This seems related: https://github.com/getsentry/sentry-react-native/issues/4095#issuecomment-2357747042
@sof9816 @leandrofavarin can you verify if adding this fixes the issue for you?
target.build_configurations.each do |config|
if target.name != "Sentry"
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
end
end
@kahest, after applying the changes in the Podfile
, still getting the Use of undeclared identifier 'SentryLog'
error
@carloscuba thanks for testing and reporting back 🙏
which Kotlin version are you using for KMP?
https://youtrack.jetbrains.com/issue/KT-71287 this may be related
especially Most usually the issues are related to Kotlin/Native vendored and user-specified cinterops
and We support for Xcode 16 in 2.1.0
just quickly going through different threads, this issue might not necessarily be tied to Kotlin 2.1.0
(which is not out yet btw)
@sof9816 @leandrofavarin can you verify if adding this fixes the issue for you?
Sadly it didn't change the result, and it seems like I got another error from this change:
Cannot find protocol declaration for 'SentryMXManagerDelegate'
• In file included from /~/MyPro/Pods/Sentry/Sources/Sentry/SentryMetricKitIntegration.m:1:
which Kotlin version are you using for KMP?
The latest 2.0.20, haven't tried the upcoming 2.0.21-RC with the fix yet.
@leandrofavarin could you try 2.1.0-Beta1
@leandrofavarin could you try
2.1.0-Beta1
EDIT: I still get the same error (Use of undeclared identifier 'SentryLog'
)
For testing, in Kotlin 2.0.20
can you compile your app with only using
cocopoads {
// add sentry-cocoa
}
without the KMP dependency implementation("io.sentry...")
I want to find out if it is the KMP dependency that's breaking things or the cinterop through the cocoapods plugin
It still fails without the KMP dependency. To try that, I basically reverted to not using KMP and split the configuration from being on commonMain
, to only on iosMain
.
Kotlin v2.1.0-Beta1, Sentry 8.36.0 with extraOpts = listOf("-compiler-option", "-fmodules")
Platform
iOS
Environment
Develop
Installed
CocoaPods
Version
8.36.0
Xcode Version
16.0
Did it work on previous versions?
Yes
Steps to Reproduce
Expected Result
Actual Result
Are you willing to submit a PR?
No,