Skip to content

Commit 613c4e2

Browse files
[FSSDK-13263] chore!: remove CocoaPods support, require iOS 15 and Flutter 3.44 (#119)
* docs: add spec for removing CocoaPods support and raising minimum iOS to 15.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: amend constitution to v1.2.0 (SPM-only iOS, iOS 15 minimum) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore!: remove CocoaPods support, require iOS 15 and Flutter 3.44 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> * chore: keep only spec.md for 003-remove-cocoapods-ios15 in git Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: move macOS plugin to SPM and remove its podspec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: drop obsolete CocoaPods gitignore entries Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: exclude specs and build output from published package Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: update spec to the Swift SDK version pinned since 3.8.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: address review: native SDK versions, Android compile SDK, SPM opt-out migration step Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a59792a commit 613c4e2

33 files changed

Lines changed: 256 additions & 397 deletions

File tree

‎.github/copilot-instructions.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ All code changes MUST comply with the project constitution at `.specify/memory/c
99
This is a **Flutter SDK** wrapping native Optimizely SDKs for iOS and Android.
1010

1111
**Technology Stack:**
12-
- **Dart/Flutter**: Cross-platform API layer (>=2.16.2, Flutter >=2.5.0)
13-
- **Swift**: iOS native bridge (Swift 5.0, iOS 10.0+)
12+
- **Dart/Flutter**: Cross-platform API layer (>=2.16.2, Flutter >=3.44.0)
13+
- **Swift**: iOS native bridge (Swift 5.0, iOS 15.0+)
1414
- **Kotlin/Java**: Android native bridge (Kotlin 2.1.0, Android 5.0+)
15-
- **Native SDKs**: OptimizelySwiftSDK 5.2.1 (iOS), android-sdk 5.1.1 (Android)
15+
- **Native SDKs**: OptimizelySwiftSDK 5.5.0 (iOS), android-sdk 5.4.0 (Android)
1616

1717
## Folder Structure
1818

‎.github/scripts/check-version-drift.sh‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎.github/workflows/flutter.yml‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,8 @@ on:
1717
# default: "master"
1818

1919
jobs:
20-
version_drift_check:
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v3
24-
- name: Check OptimizelySwiftSDK version parity
25-
run: bash .github/scripts/check-version-drift.sh
26-
2720
unit_test_coverage:
2821
runs-on: macos-latest
29-
needs: version_drift_check
3022

3123
steps:
3224
- uses: actions/checkout@v3
@@ -152,7 +144,6 @@ jobs:
152144

153145
build_test_ios:
154146
runs-on: macos-latest
155-
needs: version_drift_check
156147

157148
steps:
158149
- uses: actions/checkout@v3

‎.gitignore‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,13 @@ unlinked_spec.ds
8282
**/ios/**/.vagrant/
8383
**/ios/**/DerivedData/
8484
**/ios/**/Icon?
85-
**/ios/**/Pods/
8685
**/ios/**/.symlinks/
8786
**/ios/**/profile
8887
**/ios/**/xcuserdata
8988
**/ios/.generated/
9089
**/ios/Flutter/.last_build_id
9190
**/ios/Flutter/App.framework
9291
**/ios/Flutter/Flutter.framework
93-
**/ios/Flutter/Flutter.podspec
9492
**/ios/Flutter/Generated.xcconfig
9593
**/ios/Flutter/ephemeral
9694
**/ios/Flutter/app.flx
@@ -102,7 +100,6 @@ unlinked_spec.ds
102100

103101
# macOS
104102
**/Flutter/ephemeral/
105-
**/Pods/
106103
**/macos/Flutter/GeneratedPluginRegistrant.swift
107104
**/macos/Flutter/ephemeral
108105
**/xcuserdata/

‎.pubignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ CLAUDE.md
66

77
# Spec Kit framework files
88
.specify/
9+
10+
# Spec Kit feature specs
11+
specs/
12+
13+
# Local build output (e.g. flutter test cache)
14+
build/

‎.specify/feature.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"feature_directory": "specs/001-cocoapods-to-spm-migration"
2+
"feature_directory": "specs/003-remove-cocoapods-ios15"
33
}

‎.specify/memory/constitution.md‎

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
<!--
22
Sync Impact Report
33
==================
4-
Version change: 1.0.0 → 1.1.0 (codebase alignment audit)
4+
Version change: 1.1.1 → 1.2.0 (SPM-only iOS, iOS 15 minimum)
55
66
Modified principles:
7-
- V. Thread Safety — corrected Android/iOS threading descriptions
8-
- VIII. Native SDK Version Pinning — removed stale pinned versions,
9-
now references source-of-truth files only
7+
- VIII. Native SDK Version Pinning — iOS source of truth is now
8+
Package.swift only (CocoaPods podspec removed)
109
11-
Added sections:
12-
- IX. CMAB & Async Decide
13-
- X. ODP Integration
14-
- XI. Event Batching Configuration
15-
- XII. Logger Bridge Architecture
16-
- Platform Compatibility: macOS/Windows noted as experimental
10+
Modified sections:
11+
- Platform Compatibility: Minimum Platform Versions — iOS 15.0,
12+
Flutter >=3.44.0
13+
14+
Added sections: N/A
1715
1816
Removed sections: N/A
1917
@@ -141,9 +139,7 @@ The source-of-truth for current versions is always the build files
141139
themselves — not this document:
142140

143141
- **iOS**: `OptimizelySwiftSDK` version in
144-
`ios/optimizely_flutter_sdk.podspec` (CocoaPods) and
145-
`ios/optimizely_flutter_sdk/Package.swift` (SPM). Both files MUST
146-
declare the same version.
142+
`ios/optimizely_flutter_sdk/Package.swift` (SPM).
147143
- **Android**: `com.optimizely.ab:android-sdk` version in
148144
`android/build.gradle`.
149145

@@ -230,9 +226,9 @@ Custom loggers are configured during SDK initialisation via the
230226
| Platform | Minimum | Compile/Target |
231227
|----------|---------|----------------|
232228
| Dart | >=2.16.2 | <4.0.0 |
233-
| Flutter | >=2.5.0 | — |
229+
| Flutter | >=3.44.0 | — |
234230
| Android | API 21 (5.0) | API 35 (15) |
235-
| iOS | 10.0 | — |
231+
| iOS | 15.0 | — |
236232
| macOS | Declared | Experimental |
237233
| Windows | Declared | Experimental |
238234

@@ -345,4 +341,4 @@ All code changes MUST comply with the principles defined above.
345341
- Use `CLAUDE.md` for runtime development guidance that supplements
346342
(but does not override) this constitution.
347343

348-
**Version**: 1.1.1 | **Ratified**: 2022-06-07 | **Last Amended**: 2026-08-22
344+
**Version**: 1.2.0 | **Ratified**: 2022-06-07 | **Last Amended**: 2026-10-12

‎CLAUDE.md‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Wrapper (OptimizelyClientWrapper) + MethodChannel
3636
↓
3737
Native Plugins (Swift/Java)
3838
↓
39-
Native Optimizely SDKs (check podspec/build.gradle for current versions)
39+
Native Optimizely SDKs (check Package.swift/build.gradle for current versions)
4040
```
4141

4242
### Critical Patterns
@@ -78,11 +78,8 @@ Native Optimizely SDKs (check podspec/build.gradle for current versions)
7878
2. `lib/package_info.dart` → `version = 'X.Y.Z'`
7979
3. `README.md` → Installation example `^X.Y.Z`
8080

81-
**Two locations must stay synchronized (native iOS SDK version):**
82-
1. `ios/optimizely_flutter_sdk.podspec` → `s.dependency 'OptimizelySwiftSDK', 'A.B.C'`
83-
2. `ios/optimizely_flutter_sdk/Package.swift` → `.package(url: "...swift-sdk.git", exact: "A.B.C")`
84-
85-
A CI check (`.github/scripts/check-version-drift.sh`) enforces parity between these two files.
81+
**Native iOS SDK version** lives in one place (SPM only):
82+
- `ios/optimizely_flutter_sdk/Package.swift` → `.package(url: "...swift-sdk.git", exact: "A.B.C")`
8683

8784
## Release Workflow
8885

@@ -181,7 +178,7 @@ Follow [Angular guidelines](https://github.com/angular/angular/blob/master/CONTR
181178

182179
**Flutter/Dart:**
183180
- Dart: >=2.16.2 <4.0.0
184-
- Flutter: >=2.5.0
181+
- Flutter: >=3.44.0
185182

186183
**Android:**
187184
- minSdk: 21 (Android 5.0)
@@ -190,9 +187,9 @@ Follow [Angular guidelines](https://github.com/angular/angular/blob/master/CONTR
190187
- Native SDK: android-sdk (see android/build.gradle for current version)
191188

192189
**iOS:**
193-
- Minimum: iOS 10.0
190+
- Minimum: iOS 15.0
194191
- Swift: 5.0
195-
- Native SDK: OptimizelySwiftSDK (see ios/optimizely_flutter_sdk.podspec and ios/optimizely_flutter_sdk/Package.swift for current version)
192+
- Native SDK: OptimizelySwiftSDK (see ios/optimizely_flutter_sdk/Package.swift for current version)
196193

197194
## Key Implementation Files
198195

@@ -211,7 +208,6 @@ Follow [Angular guidelines](https://github.com/angular/angular/blob/master/CONTR
211208
- `ios/optimizely_flutter_sdk/Sources/optimizely_flutter_sdk/SwiftOptimizelyFlutterSdkPlugin.swift` - Plugin implementation (786 LOC)
212209
- `ios/optimizely_flutter_sdk/Sources/optimizely_flutter_sdk/OptimizelyFlutterLogger.swift` - Logger bridge (main-thread dispatch)
213210
- `ios/optimizely_flutter_sdk/Package.swift` - SPM dependencies
214-
- `ios/optimizely_flutter_sdk.podspec` - CocoaPods dependencies
215211

216212
<!-- SPECKIT START -->
217213
For additional context about technologies to be used, project structure,

‎README.md‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@ Refer to the [Flutter SDK's developer documentation](https://docs.developers.opt
1919

2020
See the [pubspec.yaml](https://github.com/optimizely/optimizely-flutter-sdk/blob/master/pubspec.yaml) file for Flutter version requirements.
2121

22-
On the Android platform, the SDK requires a minimum SDK version of 21 or higher and compile SDK version of 32.
22+
On the Android platform, the SDK requires a minimum SDK version of 21 or higher and compile SDK version of 35.
2323

24-
On the iOS platform, the SDK requires a minimum version of 10.0. The SDK supports both Swift Package Manager (SPM) and CocoaPods for iOS dependency resolution. Flutter 3.44+ uses SPM by default; older versions use CocoaPods.
24+
On the iOS platform, the SDK requires a minimum version of 15.0 and Flutter 3.44 or later. The SDK is integrated through Swift Package Manager (SPM) only; CocoaPods is no longer supported.
25+
26+
#### Migrating from CocoaPods
27+
28+
1. Use Flutter 3.44 or later (SPM is enabled by default; otherwise run `flutter config --enable-swift-package-manager`). If your app's `pubspec.yaml` turns SPM off (`flutter: config: enable-swift-package-manager: false`), remove that setting.
29+
2. Set your app's iOS deployment target to 15.0 or higher (Xcode Runner target, and `platform :ios` in your Podfile if you still have one).
30+
3. Run `flutter pub get` and `flutter build ios`. Flutter migrates your Xcode project to SPM automatically.
31+
4. If no other CocoaPods plugins remain, you may run `pod deintegrate` and delete your Podfile.
2532

2633
Other Flutter platforms are not currently supported by this SDK.
2734

‎example/ios/.gitignore‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010
**/.vagrant/
1111
**/DerivedData/
1212
Icon?
13-
**/Pods/
1413
**/.symlinks/
1514
profile
1615
xcuserdata
1716
**/.generated/
1817
Flutter/App.framework
1918
Flutter/Flutter.framework
20-
Flutter/Flutter.podspec
2119
Flutter/Generated.xcconfig
2220
Flutter/ephemeral/
2321
Flutter/app.flx

0 commit comments

Comments
 (0)