Skip to content

[3/4] chore(samples): Remove CocoaPods sample and podspec tooling, making SPM the sole Apple sample path#560

Open
buenaflor wants to merge 6 commits into
feat/spm4kmp-phase1-migrationfrom
feat/spm4kmp-phase2-samples
Open

[3/4] chore(samples): Remove CocoaPods sample and podspec tooling, making SPM the sole Apple sample path#560
buenaflor wants to merge 6 commits into
feat/spm4kmp-phase1-migrationfrom
feat/spm4kmp-phase2-samples

Conversation

@buenaflor

@buenaflor buenaflor commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Phase 3 of the stacked spm4Kmp migration (stacked on #557). Now that the SDK's internal Apple build no longer uses the Kotlin CocoaPods plugin, this PR removes the dead CocoaPods sample and internal build tooling and makes the SPM sample the sole Apple sample validation path.

Why: keeping the CocoaPods sample and SDK podspec around after the spm4Kmp switch is pure dead weight — the SDK module no longer applies the native.cocoapods plugin, so generateDummyFramework/syncFramework and sentry_kotlin_multiplatform.podspec are unused. Consolidating on the SPM sample keeps a single, representative consumer build in CI.

What changed:

  • Makefile buildAppleSamples now xcodebuilds the SPM sample (kmp-app-spm/iosApp.xcodeproj, scheme iosApp, Debug/iphonesimulator/arm64) and drops podInstall/pod update. kotlin-multiplatform.yml inherits this via make buildAppleSamples; test-samples is unaffected.
  • Removed the kmp-app-cocoapods sample entirely (its settings.gradle.kts includes and .run/*-cocoapods.run.xml), and repointed kmp-app-spm:desktopApp to the SPM shared module (it had a stray dependency on the cocoapods shared module).
  • Deleted the SDK sentry_kotlin_multiplatform.podspec and the unused native.cocoapods plugin classpath entry (root build.gradle.kts + Config.cocoapods).
  • Rewrote scripts/update-cocoa.sh to bump Config.kt, the plugin gradle.properties, and the SPM sample's SwiftPM pin in project.pbxproj, then refresh Package.resolved via xcodebuild -resolvePackageDependencies (dropped the podspec/generateDummyFramework/pod update steps).
  • Pointed scripts/bump-version.sh at Config.kt for the Cocoa compatibility-table version (podspec is gone) and narrowed the sample prepare scripts to kmp-app-spm.

Consumer-facing Gradle plugin CocoaPods support (installSentryForCocoapods, CocoapodsAutoInstallExtension, CocoaFrameworkLinker) is intentionally untouched.

Verification: SPM sample iOS xcodebuild BUILD SUCCEEDED (Xcode 26.1.1), ./gradlew build -p sentry-samples, and spotlessApply/detekt/apiCheck all green; update-cocoa.sh get-version resolves correctly.

Note: the watchosArm32 re-enable is still tracked in the earlier stack PR and is out of scope here.

Made with Cursor

Note

Recreated from #558, which GitHub auto-resolved as "merged" during a stack rebase mishap (the head branch briefly pointed at its base). Content is identical.

#skip-changelog

Copilot AI review requested due to automatic review settings June 10, 2026 11:20
@buenaflor buenaflor requested a review from romtsn as a code owner June 10, 2026 11:20
@buenaflor buenaflor marked this pull request as draft June 10, 2026 11:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d61ecb5. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is part of the spm4Kmp migration stack and removes the now-dead internal CocoaPods sample + podspec tooling, consolidating Apple sample validation on the SwiftPM (SPM) sample path.

Changes:

  • Switch CI/local buildAppleSamples to build the SPM iOS sample via xcodebuild, dropping CocoaPods install/update steps.
  • Remove the kmp-app-cocoapods sample (Gradle modules, iOS/Android/Desktop sample code, podspec/Podfile/workspace files, IDE run configs).
  • Remove the SDK podspec + Kotlin native.cocoapods plugin classpath entry, and update scripts to bump/resolve Cocoa versions via Config.kt + SwiftPM pins.

Reviewed changes

Copilot reviewed 45 out of 51 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
SPM4KMP_MIGRATION.md Marks Phase 2 (samples/CI/cleanup) as complete and documents the SPM-only decision.
settings.gradle.kts Removes kmp-app-cocoapods includes so the sample is no longer part of the build.
sentry-samples/scripts/prepare-apple-build.sh Narrows Apple sample preparation to SPM sample only.
sentry-samples/scripts/prepare-android-build.sh Narrows Android sample preparation to SPM sample only.
sentry-samples/kmp-app-spm/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme Updates the SPM iOS scheme (but currently includes an absolute local working directory path).
sentry-samples/kmp-app-spm/desktopApp/build.gradle.kts Fixes desktop sample to depend on SPM sample :shared module.
sentry-samples/kmp-app-cocoapods/shared/src/jvmMain/kotlin/sample/kmp/app/SentrySetup.jvm.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/jvmMain/kotlin/sample/kmp/app/Platform.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/iosMain/kotlin/sample.kmp.app/SentrySetup.ios.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/iosMain/kotlin/sample.kmp.app/Platform.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/iosMain/kotlin/sample.kmp.app/HttpClient.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/commonTest/kotlin/CompilationTest.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/commonMain/kotlin/sample.kmp.app/SentrySetup.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/commonMain/kotlin/sample.kmp.app/Platform.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/commonMain/kotlin/sample.kmp.app/LoginImpl.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/androidMain/kotlin/sample/kmp/app/SentrySetup.android.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/androidMain/kotlin/sample/kmp/app/Platform.kt Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/src/androidMain/AndroidManifest.xml Removed as part of deleting the CocoaPods sample.
sentry-samples/kmp-app-cocoapods/shared/shared.podspec Removed (CocoaPods tooling for sample no longer needed).
sentry-samples/kmp-app-cocoapods/shared/build.gradle.kts Removed (CocoaPods-based KMP shared module build removed).
sentry-samples/kmp-app-cocoapods/iosApp/Podfile.lock Removed (CocoaPods sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/Podfile Removed (CocoaPods sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp/iOSApp.swift Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp/Info.plist Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp/ContentView.swift Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp/Assets.xcassets/Contents.json Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp.xcworkspace/contents.xcworkspacedata Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/iosApp/iosApp.xcodeproj/project.pbxproj Removed (CocoaPods iOS sample removed).
sentry-samples/kmp-app-cocoapods/desktopApp/src/jvmMain/kotlin/sample.kmp.app.desktop/Main.kt Removed (CocoaPods desktop sample removed).
sentry-samples/kmp-app-cocoapods/desktopApp/build.gradle.kts Removed (CocoaPods desktop sample removed).
sentry-samples/kmp-app-cocoapods/androidApp/src/main/res/values/styles.xml Removed (CocoaPods Android sample removed).
sentry-samples/kmp-app-cocoapods/androidApp/src/main/res/values/colors.xml Removed (CocoaPods Android sample removed).
sentry-samples/kmp-app-cocoapods/androidApp/src/main/res/layout/activity_main.xml Removed (CocoaPods Android sample removed).
sentry-samples/kmp-app-cocoapods/androidApp/src/main/java/sample/kmp/app/android/MainActivity.kt Removed (CocoaPods Android sample removed).
sentry-samples/kmp-app-cocoapods/androidApp/src/main/AndroidManifest.xml Removed (CocoaPods Android sample removed).
sentry-samples/kmp-app-cocoapods/androidApp/build.gradle.kts Removed (CocoaPods Android sample removed).
sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec Removed (internal podspec tooling no longer used after spm4Kmp migration).
scripts/update-cocoa.sh Updates Cocoa version bumping to edit Config.kt, plugin properties, and SwiftPM pins + resolve packages (no podspec/pod update).
scripts/bump-version.sh Reads Cocoa version from Config.kt for README compatibility table updates (podspec removed).
Makefile Builds only the SPM iOS sample in buildAppleSamples (drops CocoaPods steps).
buildSrc/src/main/java/Config.kt Removes native.cocoapods plugin id constant (no longer used internally).
build.gradle.kts Drops Kotlin native.cocoapods plugin classpath entry from root build.
.run/iosApp-cocoapods.run.xml Removed IDE run config for CocoaPods sample.
.run/androidApp-cocoapods.run.xml Removed IDE run config for CocoaPods sample.
Files not reviewed (1)
  • sentry-samples/kmp-app-cocoapods/iosApp/iosApp.xcworkspace/contents.xcworkspacedata: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/update-cocoa.sh
Phase 2 of the spm4Kmp migration. The SDK no longer uses the Kotlin
CocoaPods plugin, so the CocoaPods sample and the internal CocoaPods build
tooling are now dead and the SPM sample becomes the sole Apple sample.

- Makefile buildAppleSamples now xcodebuilds the SPM sample
  (kmp-app-spm/iosApp.xcodeproj) and drops podInstall/pod update; CI
  inherits this via `make buildAppleSamples`
- Remove the kmp-app-cocoapods sample (settings include, .run configs) and
  repoint kmp-app-spm:desktopApp to the SPM shared module
- Delete the SDK sentry_kotlin_multiplatform.podspec and the now-unused
  native.cocoapods plugin entry (root build.gradle.kts + Config.cocoapods)
- Rewrite scripts/update-cocoa.sh to bump Config.kt, the plugin
  gradle.properties, and the SPM sample SwiftPM pin (project.pbxproj), then
  refresh Package.resolved via xcodebuild -resolvePackageDependencies
- Point scripts/bump-version.sh at Config.kt for the Cocoa compat version
  (podspec is gone) and narrow the sample prepare scripts to kmp-app-spm

Consumer-facing Gradle plugin CocoaPods support (installSentryForCocoapods,
CocoapodsAutoInstallExtension, CocoaFrameworkLinker) is untouched.

Verified: SPM sample iOS xcodebuild BUILD SUCCEEDED, ./gradlew build
-p sentry-samples, spotless/detekt/apiCheck green, update-cocoa.sh get-version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@buenaflor buenaflor force-pushed the feat/spm4kmp-phase1-migration branch from 517d333 to f7815e2 Compare June 10, 2026 11:27
@buenaflor buenaflor force-pushed the feat/spm4kmp-phase2-samples branch from d61ecb5 to 7e84b40 Compare June 10, 2026 11:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…-samples

# Conflicts:
#	sentry-samples/kmp-app-cocoapods/desktopApp/src/jvmMain/kotlin/sample.kmp.app.desktop/Main.kt
#	sentry-samples/kmp-app-cocoapods/shared/src/androidMain/kotlin/sample/kmp/app/SentrySetup.android.kt
#	sentry-samples/kmp-app-cocoapods/shared/src/commonMain/kotlin/sample.kmp.app/LoginImpl.kt
#	sentry-samples/kmp-app-cocoapods/shared/src/commonMain/kotlin/sample.kmp.app/SentrySetup.kt
#	sentry-samples/kmp-app-cocoapods/shared/src/iosMain/kotlin/sample.kmp.app/HttpClient.kt
#	sentry-samples/kmp-app-cocoapods/shared/src/iosMain/kotlin/sample.kmp.app/SentrySetup.ios.kt
#	sentry-samples/kmp-app-cocoapods/shared/src/jvmMain/kotlin/sample/kmp/app/SentrySetup.jvm.kt
@buenaflor buenaflor marked this pull request as ready for review June 10, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants