From 612caf08e7878b0528d3c87abebb9acb47f67495 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Thu, 17 Sep 2026 15:21:00 -0300 Subject: [PATCH 1/8] feat: add Swift Package Manager support for iOS (#184) Flutter 3.44 makes Swift Package Manager the default package manager for Flutter apps, so plugins without a Package.swift risk build failures. - Move ios/Classes/*.swift to ios/splitio_ios/Sources/splitio_ios/ and add Package.swift, depending on the Split iOS SDK via SwiftPM (github.com/splitio/ios-client, >= 3.6.0 < 3.7.0) to mirror the podspec. - Delete the unreferenced Objective-C bridge SplitioPlugin.h/.m. The plugin registers through pluginClass SwiftSplitioPlugin, and SwiftPM does not allow mixed-language targets. - Update the podspec source_files to the new layout so CocoaPods keeps working, correct its stale version, and drop the obsolete i386 EXCLUDED_ARCHS workaround. - Raise the minimum iOS version to 12, matching the example apps and the support matrix already documented in the README. Co-Authored-By: Claude Opus 5 AI-Session-Id: 8888253a-4939-42e3-b127-1a3f91bebf49 AI-Tool: claude-code AI-Model: unknown --- splitio_ios/CHANGELOG.md | 4 +++ splitio_ios/ios/.gitignore | 7 ++++- splitio_ios/ios/Assets/.gitkeep | 0 splitio_ios/ios/Classes/SplitioPlugin.h | 4 --- splitio_ios/ios/Classes/SplitioPlugin.m | 15 ----------- splitio_ios/ios/splitio_ios.podspec | 9 +++---- splitio_ios/ios/splitio_ios/Package.swift | 26 +++++++++++++++++++ .../Sources/splitio_ios}/ArgumentParser.swift | 0 .../Sources/splitio_ios}/Constants.swift | 0 .../Sources/splitio_ios}/Extensions.swift | 0 .../SplitClientConfigHelper.swift | 0 .../splitio_ios}/SplitFactoryProvider.swift | 0 .../splitio_ios}/SplitMethodParser.swift | 0 .../Sources/splitio_ios}/SplitWrapper.swift | 0 .../splitio_ios}/SwiftSplitioPlugin.swift | 0 splitio_ios/pubspec.yaml | 2 +- 16 files changed, 41 insertions(+), 26 deletions(-) delete mode 100644 splitio_ios/ios/Assets/.gitkeep delete mode 100644 splitio_ios/ios/Classes/SplitioPlugin.h delete mode 100644 splitio_ios/ios/Classes/SplitioPlugin.m create mode 100644 splitio_ios/ios/splitio_ios/Package.swift rename splitio_ios/ios/{Classes => splitio_ios/Sources/splitio_ios}/ArgumentParser.swift (100%) rename splitio_ios/ios/{Classes => splitio_ios/Sources/splitio_ios}/Constants.swift (100%) rename splitio_ios/ios/{Classes => splitio_ios/Sources/splitio_ios}/Extensions.swift (100%) rename splitio_ios/ios/{Classes => splitio_ios/Sources/splitio_ios}/SplitClientConfigHelper.swift (100%) rename splitio_ios/ios/{Classes => splitio_ios/Sources/splitio_ios}/SplitFactoryProvider.swift (100%) rename splitio_ios/ios/{Classes => splitio_ios/Sources/splitio_ios}/SplitMethodParser.swift (100%) rename splitio_ios/ios/{Classes => splitio_ios/Sources/splitio_ios}/SplitWrapper.swift (100%) rename splitio_ios/ios/{Classes => splitio_ios/Sources/splitio_ios}/SwiftSplitioPlugin.swift (100%) diff --git a/splitio_ios/CHANGELOG.md b/splitio_ios/CHANGELOG.md index 6262687..745eab7 100644 --- a/splitio_ios/CHANGELOG.md +++ b/splitio_ios/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.2.0 (Sep 17, 2026) +* Added Swift Package Manager support, which becomes the default package manager for Flutter apps in Flutter 3.44. CocoaPods remains fully supported. +* Updated the minimum supported iOS version to 12. + # 1.1.0 (Jan 28, 2026) * Added new configuration for Fallback Treatments, which allows setting a treatment value and optional config to be returned in place of "control", either globally or by flag. Read more in our docs. * Updated iOS SDK to `3.6.0`. diff --git a/splitio_ios/ios/.gitignore b/splitio_ios/ios/.gitignore index 0c88507..82152f5 100644 --- a/splitio_ios/ios/.gitignore +++ b/splitio_ios/ios/.gitignore @@ -35,4 +35,9 @@ Icon? /Flutter/Generated.xcconfig /Flutter/ephemeral/ -/Flutter/flutter_export_environment.sh \ No newline at end of file +/Flutter/flutter_export_environment.sh + +# Swift Package Manager +.build/ +.swiftpm/ +Package.resolved diff --git a/splitio_ios/ios/Assets/.gitkeep b/splitio_ios/ios/Assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/splitio_ios/ios/Classes/SplitioPlugin.h b/splitio_ios/ios/Classes/SplitioPlugin.h deleted file mode 100644 index 032ad7e..0000000 --- a/splitio_ios/ios/Classes/SplitioPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface SplitioPlugin : NSObject -@end diff --git a/splitio_ios/ios/Classes/SplitioPlugin.m b/splitio_ios/ios/Classes/SplitioPlugin.m deleted file mode 100644 index 0b18eab..0000000 --- a/splitio_ios/ios/Classes/SplitioPlugin.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "SplitioPlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "splitio_ios-Swift.h" -#endif - -@implementation SplitioPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftSplitioPlugin registerWithRegistrar:registrar]; -} -@end diff --git a/splitio_ios/ios/splitio_ios.podspec b/splitio_ios/ios/splitio_ios.podspec index cdbf4e7..eea0993 100644 --- a/splitio_ios/ios/splitio_ios.podspec +++ b/splitio_ios/ios/splitio_ios.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'splitio_ios' - s.version = '0.9.0' + s.version = '1.2.0' s.summary = 'split.io official Flutter plugin.' s.description = <<-DESC split.io official Flutter plugin. @@ -13,12 +13,11 @@ split.io official Flutter plugin. s.license = { :file => '../LICENSE' } s.author = { 'Split' => 'support@split.io' } s.source = { :path => '.' } - s.source_files = 'Classes/**/*' + s.source_files = 'splitio_ios/Sources/splitio_ios/**/*.swift' s.dependency 'Flutter' s.dependency 'Split', '~> 3.6.0' - s.platform = :ios, '9.0' + s.platform = :ios, '12.0' - # Flutter.framework does not contain a i386 slice. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.swift_version = '5.0' end diff --git a/splitio_ios/ios/splitio_ios/Package.swift b/splitio_ios/ios/splitio_ios/Package.swift new file mode 100644 index 0000000..b29523f --- /dev/null +++ b/splitio_ios/ios/splitio_ios/Package.swift @@ -0,0 +1,26 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "splitio_ios", + platforms: [ + .iOS("12.0") + ], + products: [ + .library(name: "splitio-ios", targets: ["splitio_ios"]) + ], + dependencies: [ + // Mirrors the `~> 3.6.0` constraint in splitio_ios.podspec. + .package(url: "https://github.com/splitio/ios-client", "3.6.0" ..< "3.7.0") + ], + targets: [ + .target( + name: "splitio_ios", + dependencies: [ + .product(name: "Split", package: "ios-client") + ] + ) + ] +) diff --git a/splitio_ios/ios/Classes/ArgumentParser.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/ArgumentParser.swift similarity index 100% rename from splitio_ios/ios/Classes/ArgumentParser.swift rename to splitio_ios/ios/splitio_ios/Sources/splitio_ios/ArgumentParser.swift diff --git a/splitio_ios/ios/Classes/Constants.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/Constants.swift similarity index 100% rename from splitio_ios/ios/Classes/Constants.swift rename to splitio_ios/ios/splitio_ios/Sources/splitio_ios/Constants.swift diff --git a/splitio_ios/ios/Classes/Extensions.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/Extensions.swift similarity index 100% rename from splitio_ios/ios/Classes/Extensions.swift rename to splitio_ios/ios/splitio_ios/Sources/splitio_ios/Extensions.swift diff --git a/splitio_ios/ios/Classes/SplitClientConfigHelper.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitClientConfigHelper.swift similarity index 100% rename from splitio_ios/ios/Classes/SplitClientConfigHelper.swift rename to splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitClientConfigHelper.swift diff --git a/splitio_ios/ios/Classes/SplitFactoryProvider.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitFactoryProvider.swift similarity index 100% rename from splitio_ios/ios/Classes/SplitFactoryProvider.swift rename to splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitFactoryProvider.swift diff --git a/splitio_ios/ios/Classes/SplitMethodParser.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitMethodParser.swift similarity index 100% rename from splitio_ios/ios/Classes/SplitMethodParser.swift rename to splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitMethodParser.swift diff --git a/splitio_ios/ios/Classes/SplitWrapper.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitWrapper.swift similarity index 100% rename from splitio_ios/ios/Classes/SplitWrapper.swift rename to splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitWrapper.swift diff --git a/splitio_ios/ios/Classes/SwiftSplitioPlugin.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SwiftSplitioPlugin.swift similarity index 100% rename from splitio_ios/ios/Classes/SwiftSplitioPlugin.swift rename to splitio_ios/ios/splitio_ios/Sources/splitio_ios/SwiftSplitioPlugin.swift diff --git a/splitio_ios/pubspec.yaml b/splitio_ios/pubspec.yaml index 5035e48..fcdd980 100644 --- a/splitio_ios/pubspec.yaml +++ b/splitio_ios/pubspec.yaml @@ -1,7 +1,7 @@ name: splitio_ios description: The official iOS implementation of splitio Flutter plugin. repository: https://github.com/splitio/flutter-sdk-plugin/tree/main/splitio_ios -version: 1.1.0 +version: 1.2.0 environment: sdk: ">=2.16.2 <4.0.0" From 1188f44f698f9572f1fc81d501f24348304ef71a Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 17 Sep 2026 19:25:16 -0300 Subject: [PATCH 2/8] New import for stricter Swift build --- .../ios/splitio_ios/Sources/splitio_ios/SplitMethodParser.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitMethodParser.swift b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitMethodParser.swift index d54abd6..9fc06b4 100644 --- a/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitMethodParser.swift +++ b/splitio_ios/ios/splitio_ios/Sources/splitio_ios/SplitMethodParser.swift @@ -1,5 +1,6 @@ import Foundation import Split +import Flutter import UIKit protocol SplitMethodParser { From d04cf49d67329a8e2f671716c24cc7014532f638 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 22 Sep 2026 15:03:45 -0300 Subject: [PATCH 3/8] Gradle upgraded, iOS plugin tested --- .github/workflows/build.yml | 14 ++++++++++---- splitio/example/.gitignore | 3 +++ splitio/example/android/app/build.gradle | 1 + splitio/example/android/gradle.properties | 2 ++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- splitio/example/android/settings.gradle | 3 ++- splitio/pubspec.yaml | 2 +- splitio_ios/example/.gitignore | 3 +++ splitio_ios/ios/splitio_ios/Package.swift | 3 ++- 9 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b1846b..b5b4189 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Build example app APK run: cd splitio/example; flutter build apk @@ -34,12 +35,13 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Run Pub Get run: cd splitio/; flutter pub get - name: Build Android - run: cd splitio/example/android/; flutter build apk - - name: Run Android test - run: cd splitio/example/android/; ./gradlew :splitio:testReleaseUnitTest; + run: cd splitio/example; flutter build apk + - name: Run Android unit tests + run: cd splitio_android; flutter test build-ios: name: Build iOS @@ -50,8 +52,9 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Run Build iOS - run: cd splitio/example/ios; flutter build ios --no-codesign; + run: cd splitio/example; flutter build ios --no-codesign; test-ios: name: Test iOS @@ -62,6 +65,7 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Run Build iOS run: cd splitio_ios/example/; flutter build ios --no-codesign; @@ -81,6 +85,7 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Build Web run: cd splitio/example; flutter build web @@ -92,6 +97,7 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Build Web run: cd splitio/example; flutter build web - name: Run Web test diff --git a/splitio/example/.gitignore b/splitio/example/.gitignore index 0fa6b67..5b6a1d1 100644 --- a/splitio/example/.gitignore +++ b/splitio/example/.gitignore @@ -44,3 +44,6 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# Swift Package Manager (resolved locally by Xcode / Flutter) +**/xcshareddata/swiftpm/ diff --git a/splitio/example/android/app/build.gradle b/splitio/example/android/app/build.gradle index 25dc71f..3160c39 100644 --- a/splitio/example/android/app/build.gradle +++ b/splitio/example/android/app/build.gradle @@ -1,5 +1,6 @@ plugins { id 'com.android.application' + id 'org.jetbrains.kotlin.android' id 'dev.flutter.flutter-gradle-plugin' } diff --git a/splitio/example/android/gradle.properties b/splitio/example/android/gradle.properties index b9a9a24..f704552 100644 --- a/splitio/example/android/gradle.properties +++ b/splitio/example/android/gradle.properties @@ -4,3 +4,5 @@ android.enableJetifier=true android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=false android.nonFinalResIds=false +android.builtInKotlin=false +android.newDsl=false diff --git a/splitio/example/android/gradle/wrapper/gradle-wrapper.properties b/splitio/example/android/gradle/wrapper/gradle-wrapper.properties index 2a0fcc1..d0235bb 100644 --- a/splitio/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/splitio/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip diff --git a/splitio/example/android/settings.gradle b/splitio/example/android/settings.gradle index ea55ff6..f4d8af4 100644 --- a/splitio/example/android/settings.gradle +++ b/splitio/example/android/settings.gradle @@ -18,7 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" // apply true - id "com.android.application" version "8.4.0" apply false + id "com.android.application" version "8.11.1" apply false + id "org.jetbrains.kotlin.android" version "2.2.20" apply false } include ":app" \ No newline at end of file diff --git a/splitio/pubspec.yaml b/splitio/pubspec.yaml index 89f2b62..e8d2402 100644 --- a/splitio/pubspec.yaml +++ b/splitio/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: flutter: sdk: flutter splitio_android: ^1.1.0 - splitio_ios: ^1.1.0 + splitio_ios: ^1.2.0 splitio_web: ^1.1.1 splitio_platform_interface: ^2.1.0 dev_dependencies: diff --git a/splitio_ios/example/.gitignore b/splitio_ios/example/.gitignore index 0fa6b67..5b6a1d1 100644 --- a/splitio_ios/example/.gitignore +++ b/splitio_ios/example/.gitignore @@ -44,3 +44,6 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# Swift Package Manager (resolved locally by Xcode / Flutter) +**/xcshareddata/swiftpm/ diff --git a/splitio_ios/ios/splitio_ios/Package.swift b/splitio_ios/ios/splitio_ios/Package.swift index b29523f..d32d2d2 100644 --- a/splitio_ios/ios/splitio_ios/Package.swift +++ b/splitio_ios/ios/splitio_ios/Package.swift @@ -12,13 +12,14 @@ let package = Package( .library(name: "splitio-ios", targets: ["splitio_ios"]) ], dependencies: [ - // Mirrors the `~> 3.6.0` constraint in splitio_ios.podspec. + .package(name: "FlutterFramework", path: "../FlutterFramework"), .package(url: "https://github.com/splitio/ios-client", "3.6.0" ..< "3.7.0") ], targets: [ .target( name: "splitio_ios", dependencies: [ + .product(name: "FlutterFramework", package: "FlutterFramework"), .product(name: "Split", package: "ios-client") ] ) From bdd17692823e17b2f9a85b06931bf83040a4b5e9 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 22 Sep 2026 15:09:06 -0300 Subject: [PATCH 4/8] Reverting to published Split plugin version --- splitio/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splitio/pubspec.yaml b/splitio/pubspec.yaml index e8d2402..89f2b62 100644 --- a/splitio/pubspec.yaml +++ b/splitio/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: flutter: sdk: flutter splitio_android: ^1.1.0 - splitio_ios: ^1.2.0 + splitio_ios: ^1.1.0 splitio_web: ^1.1.1 splitio_platform_interface: ^2.1.0 dev_dependencies: From d86b4fe56eed089e67850d2bc07705ae6b5efc2a Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 22 Sep 2026 16:23:04 -0300 Subject: [PATCH 5/8] Tests fixed --- .../SplitTests/SplitMethodParserTests.swift | 1 + .../example/ios/SplitTests/SplitTests.swift | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/splitio_ios/example/ios/SplitTests/SplitMethodParserTests.swift b/splitio_ios/example/ios/SplitTests/SplitMethodParserTests.swift index fd2c688..f5f7e2f 100644 --- a/splitio_ios/example/ios/SplitTests/SplitMethodParserTests.swift +++ b/splitio_ios/example/ios/SplitTests/SplitMethodParserTests.swift @@ -1,4 +1,5 @@ import XCTest +import Flutter @testable import splitio_ios @testable import Split diff --git a/splitio_ios/example/ios/SplitTests/SplitTests.swift b/splitio_ios/example/ios/SplitTests/SplitTests.swift index a749dde..892c18d 100644 --- a/splitio_ios/example/ios/SplitTests/SplitTests.swift +++ b/splitio_ios/example/ios/SplitTests/SplitTests.swift @@ -1,4 +1,5 @@ import XCTest +import Flutter @testable import splitio_ios @testable import Split @@ -593,12 +594,29 @@ class SplitManagerStub: SplitManager, Destroyable { } } +private final class BinaryMessengerStub: NSObject, FlutterBinaryMessenger { + func send(onChannel channel: String, message: Data?) {} + func send(onChannel channel: String, message: Data?, binaryReply callback: FlutterBinaryReply?) {} + func setMessageHandlerOnChannel(_ channel: String, binaryMessageHandler handler: FlutterBinaryMessageHandler?) -> FlutterBinaryMessengerConnection { 0 } + func cleanUpConnection(_ connection: FlutterBinaryMessengerConnection) {} +} + class MethodChannelStub: FlutterMethodChannel { var methodName: String = "" var arguments: Any? + init(name: String = "splitio.test") { + super.init(name: name, binaryMessenger: BinaryMessengerStub(), codec: FlutterStandardMethodCodec.sharedInstance(), taskQueue: nil) + } + override func invokeMethod(_ method: String, arguments: Any?) { self.methodName = method self.arguments = arguments } + + override func invokeMethod(_ method: String, arguments: Any?, result callback: FlutterResult?) { + self.methodName = method + self.arguments = arguments + callback?(nil) + } } From c543812ecba8cb0efbfd13a0edac1fe6f80429df Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 22 Sep 2026 16:57:34 -0300 Subject: [PATCH 6/8] Testing Android pipeline fix --- .../input_sets/fluttersdkplugininputset.yaml | 14 ++ .harness/pipeline.yaml | 172 ++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/fluttersdkplugin/input_sets/fluttersdkplugininputset.yaml create mode 100644 .harness/pipeline.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/fluttersdkplugin/input_sets/fluttersdkplugininputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/fluttersdkplugin/input_sets/fluttersdkplugininputset.yaml new file mode 100644 index 0000000..2285838 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/fluttersdkplugin/input_sets/fluttersdkplugininputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: flutter-sdk-plugin-inputset + identifier: fluttersdkplugininputset + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: fluttersdkplugin + properties: + ci: + codebase: + build: + type: branch + spec: + branch: <+trigger.sourceBranch> diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml new file mode 100644 index 0000000..c961d14 --- /dev/null +++ b/.harness/pipeline.yaml @@ -0,0 +1,172 @@ +pipeline: + name: flutter-sdk-plugin-repo + identifier: fluttersdkplugin + projectIdentifier: Harness_Split + orgIdentifier: PROD + tags: {} + properties: + ci: + codebase: + connectorRef: fmegithubharnessgitops + repoName: flutter-sdk-plugin + build: + type: branch + spec: + branch: <+input> + stages: + - stage: + name: Build and Test + identifier: Build_and_Test + description: "" + type: CI + spec: + cloneCodebase: true + caching: + enabled: true + override: true + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: + size: flex + execution: + steps: + - step: + type: Run + name: Install Java + identifier: Install_Java + spec: + shell: Sh + command: |- + apt-get update -qq + apt-get install -y openjdk-17-jdk -qq + java -version + - step: + type: Run + name: Install Flutter + identifier: Install_Flutter + spec: + shell: Bash + command: |- + git clone https://github.com/flutter/flutter.git -b stable --depth 1 $HOME/flutter + export PATH="$HOME/flutter/bin:$PATH" + flutter --version + flutter config --no-analytics + flutter precache + - step: + type: Run + name: Test splitio + identifier: Test_splitio + spec: + shell: Bash + command: |- + export PATH="$HOME/flutter/bin:$PATH" + cd splitio + flutter pub get + flutter test + - step: + type: Run + name: Test splitio_android + identifier: Test_splitio_android + spec: + shell: Bash + command: |- + export PATH="$HOME/flutter/bin:$PATH" + cd splitio_android + flutter pub get + flutter test + - step: + type: Run + name: Test splitio_ios + identifier: Test_splitio_ios + spec: + shell: Bash + command: |- + export PATH="$HOME/flutter/bin:$PATH" + cd splitio_ios + flutter pub get + flutter test + - step: + type: Run + name: Test splitio_web + identifier: Test_splitio_web + spec: + shell: Bash + command: |- + export PATH="$HOME/flutter/bin:$PATH" + cd splitio_web + flutter pub get + flutter test --platform=chrome + - step: + type: Run + name: SonarQube Scan + identifier: SonarQube_Scan + when: + stageStatus: Success + condition: <+matrix.sdkVersion> == "stable" + spec: + shell: Sh + command: |- + export SONAR_SCANNER_VERSION=5.0.1.3006 + curl -sSLo sonar-scanner.zip \ + "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip" + unzip -q sonar-scanner.zip + export PATH="$PWD/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin:$PATH" + apt-get update -qq + apt-get install -y openjdk-17-jdk -qq + sonar-scanner \ + -Dsonar.projectKey=flutter-sdk-plugin \ + -Dsonar.sources=splitio/lib,splitio_android/lib,splitio_ios/lib,splitio_web/lib,splitio_platform_interface/lib \ + -Dsonar.tests=splitio/test,splitio_android/test,splitio_ios/test,splitio_web/test,splitio_platform_interface/test \ + -Dsonar.host.url=https://sonar.harness.io \ + -Dsonar.token=<+secrets.getValue("sonarqube-token")> \ + -Dsonar.exclusions="**/example/**,**/.dart_tool/**,**/build/**" + - step: + type: Run + name: Post Quality Gate + identifier: Post_Quality_Gate + when: + stageStatus: Success + condition: <+matrix.sdkVersion> == "stable" + spec: + shell: Bash + command: |- + #!/bin/bash + set -e + + SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" + SONAR_URL="https://sonar.harness.io" + SONAR_PROJECT_KEY="flutter-sdk-plugin" + GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" + GITHUB_REPO="flutter-sdk-plugin" + COMMIT_SHA="<+codebase.commitSha>" + + STATUS_JSON=$(curl -sf \ + -H "Authorization: Bearer ${SONAR_TOKEN}" \ + "${SONAR_URL}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}") + + QG_STATUS=$(echo "$STATUS_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['projectStatus']['status'])") + + case "$QG_STATUS" in + OK) GH_STATE="success"; DESCRIPTION="Quality gate passed" ;; + ERROR) GH_STATE="failure"; DESCRIPTION="Quality gate failed" ;; + WARN) GH_STATE="success"; DESCRIPTION="Quality gate passed with warnings" ;; + *) GH_STATE="pending"; DESCRIPTION="Quality gate status unknown" ;; + esac + + TARGET_URL="${SONAR_URL}/dashboard?id=${SONAR_PROJECT_KEY}" + + curl -sf -X POST \ + -H "Authorization: token ${GITHUB_TOKEN}" \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Content-Type: application/json" \ + -d "{\"state\":\"${GH_STATE}\",\"description\":\"${DESCRIPTION}\",\"context\":\"sonarqube/quality-gate\",\"target_url\":\"${TARGET_URL}\"}" \ + "https://api.github.com/repos/splitio/${GITHUB_REPO}/statuses/${COMMIT_SHA}" + + echo "Posted SonarQube quality gate status: ${GH_STATE}" + strategy: + matrix: + sdkVersion: + - "stable" From 00187312532c8e258f98960dfabbcb3849a73f45 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 22 Sep 2026 17:07:54 -0300 Subject: [PATCH 7/8] Testing Android pipeline fix --- .harness/pipeline.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index c961d14..9fa5b50 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -38,11 +38,17 @@ pipeline: name: Install Java identifier: Install_Java spec: - shell: Sh + shell: Bash command: |- - apt-get update -qq - apt-get install -y openjdk-17-jdk -qq + set -e + JDK_DIR="$HOME/jdk-17" + curl -fsSL "https://api.adoptium.net/v3/binary/latest/17/ga/linux/x64/jdk/hotspot/normal/eclipse?project=jdk" -o /tmp/jdk17.tar.gz + mkdir -p "$JDK_DIR" + tar -xzf /tmp/jdk17.tar.gz -C "$JDK_DIR" --strip-components=1 + export JAVA_HOME="$JDK_DIR" + export PATH="$JAVA_HOME/bin:$PATH" java -version + printf 'export JAVA_HOME=%s\nexport PATH="$JAVA_HOME/bin:$PATH"\n' "$JDK_DIR" > "$HOME/java.env" - step: type: Run name: Install Flutter @@ -107,15 +113,15 @@ pipeline: stageStatus: Success condition: <+matrix.sdkVersion> == "stable" spec: - shell: Sh + shell: Bash command: |- + set -e + . "$HOME/java.env" export SONAR_SCANNER_VERSION=5.0.1.3006 curl -sSLo sonar-scanner.zip \ "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip" unzip -q sonar-scanner.zip export PATH="$PWD/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin:$PATH" - apt-get update -qq - apt-get install -y openjdk-17-jdk -qq sonar-scanner \ -Dsonar.projectKey=flutter-sdk-plugin \ -Dsonar.sources=splitio/lib,splitio_android/lib,splitio_ios/lib,splitio_web/lib,splitio_platform_interface/lib \ From cc39acc1fb3926c59931308cfd4cbda035d2829b Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 23 Sep 2026 12:03:51 -0300 Subject: [PATCH 8/8] Bump of versions (general & ios) --- splitio/CHANGELOG.md | 5 +++++ splitio/pubspec.yaml | 4 ++-- splitio_ios/CHANGELOG.md | 3 ++- splitio_ios/pubspec.yaml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/splitio/CHANGELOG.md b/splitio/CHANGELOG.md index 371938a..7e48db6 100644 --- a/splitio/CHANGELOG.md +++ b/splitio/CHANGELOG.md @@ -1,3 +1,8 @@ + +# 1.3.0-rc.1 (Sep 23, 2026) +* Added Swift Package Manager support, which becomes the default package manager for Flutter apps in Flutter 3.44. CocoaPods remains fully supported. +* Updated the minimum supported iOS version to 12. + # 1.2.1 (Jan 28, 2026) * Bug fix: corrected asset path for loading the Browser SDK. diff --git a/splitio/pubspec.yaml b/splitio/pubspec.yaml index 89f2b62..b559737 100644 --- a/splitio/pubspec.yaml +++ b/splitio/pubspec.yaml @@ -1,6 +1,6 @@ name: splitio description: Official plugin for split.io, the platform for controlled rollouts, which serves features to your users via feature flags to manage your complete customer experience. -version: 1.2.1 +version: 1.3.0-rc.1 homepage: https://split.io/ repository: https://github.com/splitio/flutter-sdk-plugin/tree/main/splitio/ @@ -22,7 +22,7 @@ dependencies: flutter: sdk: flutter splitio_android: ^1.1.0 - splitio_ios: ^1.1.0 + splitio_ios: ^1.2.0-rc.1 splitio_web: ^1.1.1 splitio_platform_interface: ^2.1.0 dev_dependencies: diff --git a/splitio_ios/CHANGELOG.md b/splitio_ios/CHANGELOG.md index 745eab7..50fb26b 100644 --- a/splitio_ios/CHANGELOG.md +++ b/splitio_ios/CHANGELOG.md @@ -1,4 +1,5 @@ -# 1.2.0 (Sep 17, 2026) + +# 1.2.0-rc.1 (Sep 23, 2026) * Added Swift Package Manager support, which becomes the default package manager for Flutter apps in Flutter 3.44. CocoaPods remains fully supported. * Updated the minimum supported iOS version to 12. diff --git a/splitio_ios/pubspec.yaml b/splitio_ios/pubspec.yaml index fcdd980..5b5e8b4 100644 --- a/splitio_ios/pubspec.yaml +++ b/splitio_ios/pubspec.yaml @@ -1,7 +1,7 @@ name: splitio_ios description: The official iOS implementation of splitio Flutter plugin. repository: https://github.com/splitio/flutter-sdk-plugin/tree/main/splitio_ios -version: 1.2.0 +version: 1.2.0-rc.1 environment: sdk: ">=2.16.2 <4.0.0"