Skip to content

[FSSDK-13263] chore!: remove CocoaPods support, require iOS 15 and Flutter 3.44 - #119

Merged
muzahidul-opti merged 9 commits into
masterfrom
feature/remove-cocoapods-ios15
Oct 14, 2026
Merged

muzahidul-opti merged 9 commits into
masterfrom
feature/remove-cocoapods-ios15

Conversation

@muzahidul-opti

@muzahidul-opti muzahidul-opti commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

OptimizelySwiftSDK 6.0.0 dropped CocoaPods, so the plugin's iOS integration becomes SPM-only. Swift SDK stays at 5.5.0 (from 3.8.0, #120) here; the 6.0.0 bump is a separate PR. Rebased on master after the 3.8.0 release. Ships in 4.0.0 only, so don't release this on its own.

 pubspec.yaml
-  flutter: ">=2.5.0"
+  flutter: ">=3.44.0"
 ios/
-  optimizely_flutter_sdk.podspec
   optimizely_flutter_sdk/
     Package.swift
-      platforms: [.iOS("10.0")], exclude: [ObjC shim]
+      platforms: [.iOS("15.0")]
-    Sources/.../OptimizelyFlutterSdkPlugin.m, include/   # CocoaPods-only
 example/ios/   Podfile, Pods refs, target 10.0  ->  SPM only, target 15.0
 macos/
-  optimizely_flutter_sdk.podspec, Classes/
+  optimizely_flutter_sdk/Package.swift (.macOS("10.15")), Sources/   # same stub, SPM layout
 example/macos/ Podfile, [CP] phases, target 10.11  ->  SPM only, target 10.15
 .github/
-  scripts/check-version-drift.sh   + version_drift_check job   # one manifest left
 README.md        iOS 15 / Flutter 3.44 / SPM only + "Migrating from CocoaPods"
 CLAUDE.md, copilot-instructions.md, constitution v1.2.0 (Principle VIII, platform table)
 .gitignore files  obsolete Pods/ and Flutter.podspec entries removed
 .pubignore       + specs/, build/   (keeps spec files and test cache out of the pub.dev package)
 specs/003-remove-cocoapods-ios15/spec.md

iOS plugin registration is unchanged (pluginClass: SwiftOptimizelyFlutterSdkPlugin). No Dart API changes.

Evidence

  • Before: two iOS manifests (podspec + SPM) kept in sync by a CI check; iOS 10 minimum.
    After (local):
    flutter analyze                      No issues found!
    flutter test                         +140: All tests passed!
    example: flutter build ios --simulator
      ✓ Built Runner.app                 (no Podfile, no Pods/)
    example with target 14.0:
      "Updating minimum iOS deployment target to 15.0." -> ✓ Built
    
  • The test app (optimizely/optimizely-flutter-testapp#46) builds through SPM, and all 104 iOS integration tests pass.

Merge Danger

Door: one-way once released (4.0.0 drops CocoaPods and iOS <15 for consumers). Until release it's a two-way door: revert the commit.
Blast Radius:

  • Consumers on CocoaPods-only setups, Flutter <3.44, or SPM disabled can't upgrade.
  • Apps below iOS 15 get their target auto-raised by Flutter.
  • integration_ios_tests builds testapp master, so merge optimizely/optimizely-flutter-testapp#46 first.
  • Known issue that predates this PR: building example/ from a checkout folder named optimizely-flutter-sdk (hyphens) fails SPM identity resolution, and master fails the same way. CI doesn't build the example.
  • macOS (experimental template stub) moves to SPM as well; minimum macOS 10.11 -> 10.15 (Flutter 3.44's floor). No behaviour change, since it only answers getPlatformVersion.

🤖 Generated with Claude Code

muzahidul-opti and others added 7 commits October 13, 2026 22:59
… to 15.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OptimizelySwiftSDK 6.0.0 dropped CocoaPods distribution, so the plugin's
iOS integration moves to Swift Package Manager only. The podspec, the
CocoaPods-only Objective-C shim, and the podspec/SPM version-parity CI
check are removed. The example app is migrated off CocoaPods.

BREAKING CHANGE: iOS apps must target iOS 15.0 or later, use Flutter
3.44 or later, and integrate the plugin via Swift Package Manager.
CocoaPods is no longer supported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@muzahidul-opti
muzahidul-opti force-pushed the feature/remove-cocoapods-ios15 branch from 244b6a9 to 1d3124a Compare October 13, 2026 17:00
@muzahidul-opti
muzahidul-opti marked this pull request as ready for review October 13, 2026 17:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@muzahidul-opti muzahidul-opti changed the title chore!: remove CocoaPods support, require iOS 15 and Flutter 3.44 [FSSDK-13263] chore!: remove CocoaPods support, require iOS 15 and Flutter 3.44 Oct 14, 2026
pvcraven
pvcraven previously approved these changes Oct 14, 2026

@pvcraven pvcraven 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.

This looks good to merge. As noted, really important to only get released as 4.0.0 or else we'll break stuff.

Claude notes:

Needs changing, by priority:

  1. P1: Release only as 4.0.0. Dropping CocoaPods and raising the minimums to iOS 15 and Flutter 3.44 breaks some customers. Flutter 3.44+ users who turned Swift Package Manager (SPM) off would get this on a normal pub upgrade if it shipped as 3.x. Once this merges, master can't produce a 3.x release.
  2. P1: Check the optimizely-flutter-testapp repo before merging. The iOS integration job builds that repo's master. If it still uses a Podfile or targets iOS below 15, the job either fails or passes without testing SPM. A green check alone doesn't prove the iOS SPM path ran.
  3. P2: The iOS CI job never builds iOS. build_test_ios only runs the Dart unit tests. With the version-parity check removed, nothing in this repo compiles either Package.swift. I'd add flutter build ios --no-codesign --simulator on the example app.
  4. P2: The example app can't install its dependencies on Flutter 3.44. example/pubspec.yaml still caps Dart below 3.0, and Flutter 3.44 ships Dart 3. That cap was already there, but this PR makes Flutter 3.44 the minimum, so no supported Flutter can run the example now.
  5. P3: The macOS move to SPM isn't verified. Nothing in CI or the spec checks it, and the spec doesn't mention it. The macOS plugin is an experimental stub, so impact is low.
  6. P3: Some docs are out of date:
    • .github/copilot-instructions.md lists native SDK versions 5.2.1 / 5.1.1; the pinned versions are 5.5.0 / 5.4.0.
    • The README says Android compile SDK 32; the project uses 35.
    • The README migration steps should cover apps that explicitly turned SPM off, since those are the ones that break.
  7. P4: Nits. The Dart lower bound of 2.16.2 is misleading now that Flutter 3.44 is required. The CHANGELOG entry needs migration steps when 4.0.0 is cut.

…pt-out migration step

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@muzahidul-opti

muzahidul-opti commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

@pvcraven Thanks for the review. I went through each point:

  1. Release only as 4.0.0. Agreed. This PR doesn't bump the version, and the next release from master will be 4.0.0. Critical 3.x fixes go to the 3.x branch (cut from v3.8.0).
  2. Testapp before merging. Done. optimizely-flutter-testapp#46 is merged: no Podfile, iOS 15, SPM, Flutter 3.44. The testapp iOS run for this PR checked out this branch (SDK_BRANCH: feature/remove-cocoapods-ios15) and its log has no CocoaPods step. With no podspec in the SDK and no Podfile in the testapp, SPM is the only way that build can succeed, so a green check here does prove the SPM path.
  3. build_test_ios doesn't build iOS. True, but not adding it. The required optimizely-flutter-testapp (ios) check already builds this PR's branch through SPM, so a broken Package.swift or Swift file blocks the merge. A second build here would only duplicate that.
  4. Example Dart <3.0.0 cap. This one doesn't hold. Dart 3 treats >=2.12 <3.0.0 as <4.0.0, so >=2.16.2 <3.0.0 resolves fine. The example builds on Dart 3 (verified with flutter build ios and flutter build macos).
  5. macOS not verified. The spec does cover it (Assumptions, "macOS plugin platform"), and I built it locally. Since macOS is an experimental stub, I'm not adding CI for it.
  6. Docs. Fixed in 026895f:
    • copilot-instructions.md: native SDKs 5.5.0 / 5.4.0
    • README: Android compile SDK 35
    • README migration step 1: if the app's pubspec.yaml sets enable-swift-package-manager: false, remove it
  7. Nits. I'm leaving the Dart lower bound as is: raising it to 3.0 changes the language version, which can introduce new errors, and that's beyond this cleanup. The CHANGELOG migration steps will go in the 4.0.0 release PR.

🤖 Generated with Claude Code

@muzahidul-opti
muzahidul-opti merged commit 613c4e2 into master Oct 14, 2026
7 of 9 checks passed
@muzahidul-opti
muzahidul-opti deleted the feature/remove-cocoapods-ios15 branch October 14, 2026 15:24
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