Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ All code changes MUST comply with the project constitution at `.specify/memory/c
This is a **Flutter SDK** wrapping native Optimizely SDKs for iOS and Android.

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

## Folder Structure

Expand Down
27 changes: 0 additions & 27 deletions .github/scripts/check-version-drift.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,8 @@ on:
# default: "master"

jobs:
version_drift_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check OptimizelySwiftSDK version parity
run: bash .github/scripts/check-version-drift.sh

unit_test_coverage:
runs-on: macos-latest
needs: version_drift_check

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -152,7 +144,6 @@ jobs:

build_test_ios:
runs-on: macos-latest
needs: version_drift_check

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,13 @@ unlinked_spec.ds
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/.last_build_id
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
Expand All @@ -102,7 +100,6 @@ unlinked_spec.ds

# macOS
**/Flutter/ephemeral/
**/Pods/
**/macos/Flutter/GeneratedPluginRegistrant.swift
**/macos/Flutter/ephemeral
**/xcuserdata/
Expand Down
6 changes: 6 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ CLAUDE.md

# Spec Kit framework files
.specify/

# Spec Kit feature specs
specs/

# Local build output (e.g. flutter test cache)
build/
2 changes: 1 addition & 1 deletion .specify/feature.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"feature_directory": "specs/001-cocoapods-to-spm-migration"
"feature_directory": "specs/003-remove-cocoapods-ios15"
}
28 changes: 12 additions & 16 deletions .specify/memory/constitution.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<!--
Sync Impact Report
==================
Version change: 1.0.0 → 1.1.0 (codebase alignment audit)
Version change: 1.1.1 → 1.2.0 (SPM-only iOS, iOS 15 minimum)

Modified principles:
- V. Thread Safety — corrected Android/iOS threading descriptions
- VIII. Native SDK Version Pinning — removed stale pinned versions,
now references source-of-truth files only
- VIII. Native SDK Version Pinning — iOS source of truth is now
Package.swift only (CocoaPods podspec removed)

Added sections:
- IX. CMAB & Async Decide
- X. ODP Integration
- XI. Event Batching Configuration
- XII. Logger Bridge Architecture
- Platform Compatibility: macOS/Windows noted as experimental
Modified sections:
- Platform Compatibility: Minimum Platform Versions — iOS 15.0,
Flutter >=3.44.0

Added sections: N/A

Removed sections: N/A

Expand Down Expand Up @@ -141,9 +139,7 @@ The source-of-truth for current versions is always the build files
themselves — not this document:

- **iOS**: `OptimizelySwiftSDK` version in
`ios/optimizely_flutter_sdk.podspec` (CocoaPods) and
`ios/optimizely_flutter_sdk/Package.swift` (SPM). Both files MUST
declare the same version.
`ios/optimizely_flutter_sdk/Package.swift` (SPM).
- **Android**: `com.optimizely.ab:android-sdk` version in
`android/build.gradle`.

Expand Down Expand Up @@ -230,9 +226,9 @@ Custom loggers are configured during SDK initialisation via the
| Platform | Minimum | Compile/Target |
|----------|---------|----------------|
| Dart | >=2.16.2 | <4.0.0 |
| Flutter | >=2.5.0 | — |
| Flutter | >=3.44.0 | — |
| Android | API 21 (5.0) | API 35 (15) |
| iOS | 10.0 | — |
| iOS | 15.0 | — |
| macOS | Declared | Experimental |
| Windows | Declared | Experimental |

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

**Version**: 1.1.1 | **Ratified**: 2022-06-07 | **Last Amended**: 2026-08-22
**Version**: 1.2.0 | **Ratified**: 2022-06-07 | **Last Amended**: 2026-10-12
16 changes: 6 additions & 10 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Wrapper (OptimizelyClientWrapper) + MethodChannel
↓
Native Plugins (Swift/Java)
↓
Native Optimizely SDKs (check podspec/build.gradle for current versions)
Native Optimizely SDKs (check Package.swift/build.gradle for current versions)
```

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

**Two locations must stay synchronized (native iOS SDK version):**
1. `ios/optimizely_flutter_sdk.podspec` → `s.dependency 'OptimizelySwiftSDK', 'A.B.C'`
2. `ios/optimizely_flutter_sdk/Package.swift` → `.package(url: "...swift-sdk.git", exact: "A.B.C")`

A CI check (`.github/scripts/check-version-drift.sh`) enforces parity between these two files.
**Native iOS SDK version** lives in one place (SPM only):
- `ios/optimizely_flutter_sdk/Package.swift` → `.package(url: "...swift-sdk.git", exact: "A.B.C")`

## Release Workflow

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

**Flutter/Dart:**
- Dart: >=2.16.2 <4.0.0
- Flutter: >=2.5.0
- Flutter: >=3.44.0

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

**iOS:**
- Minimum: iOS 10.0
- Minimum: iOS 15.0
- Swift: 5.0
- Native SDK: OptimizelySwiftSDK (see ios/optimizely_flutter_sdk.podspec and ios/optimizely_flutter_sdk/Package.swift for current version)
- Native SDK: OptimizelySwiftSDK (see ios/optimizely_flutter_sdk/Package.swift for current version)

## Key Implementation Files

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

<!-- SPECKIT START -->
For additional context about technologies to be used, project structure,
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@ Refer to the [Flutter SDK's developer documentation](https://docs.developers.opt

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

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

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

#### Migrating from CocoaPods

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.
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).
3. Run `flutter pub get` and `flutter build ios`. Flutter migrates your Xcode project to SPM automatically.
4. If no other CocoaPods plugins remain, you may run `pod deintegrate` and delete your Podfile.

Other Flutter platforms are not currently supported by this SDK.

Expand Down
2 changes: 0 additions & 2 deletions example/ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Expand Down
1 change: 0 additions & 1 deletion example/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 0 additions & 1 deletion example/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
41 changes: 0 additions & 41 deletions example/ios/Podfile

This file was deleted.

Loading
Loading