Repository navigation
[FSSDK-11920] Migrate Swift SDK distribution, CI, and releases to SPM on Xcode 27 - #658
Conversation
Co-authored-by: muzahidul-opti <129880873+muzahidul-opti@users.noreply.github.com>
Co-authored-by: muzahidul-opti <129880873+muzahidul-opti@users.noreply.github.com>
Co-authored-by: muzahidul-opti <129880873+muzahidul-opti@users.noreply.github.com>
|
🔗 Commit SHA: 990ab4f | Docs | View more details | Give us feedback! |
- Delete OptimizelySwiftSDK.xcworkspace (pod-integration artifact; demo app
subprojects the SDK xcodeproj directly). Move IDETemplateMacros.plist to
OptimizelySwiftSDK.xcodeproj/xcshareddata so Xcode keeps the file-header
template.
- De-pod DemoSwiftApp: drop Pods xcconfigs, Pods framework links, manifest-lock
phases; repoint lint phases from \${PODS_ROOT}/SwiftLint to brew swiftlint.
- Delete orphaned Scripts/prepare_simulator.sh (no callers left).
- .gitignore: drop CocoaPods section; CONTRIBUTING: document swiftlint install.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Xcode 27 refuses to build deployment targets below iOS/tvOS 15, watchOS 8, macOS 12 (xcodebuild errors out; SPM toolchain deprecates the same floors). Bump pbxproj (30 iOS + 18 tvOS + 4 watchOS + 2 macOS lines), Package.swift platforms, and swift-tools-version 5.3 -> 6.4 (required for .iOS(.v15)/.macOS(.v12) enums). Update README/CLAUDE.md platform support notes. Verified: xcodebuild iOS scheme BUILD SUCCEEDED on iPhone 17 / OS 27.0 simulator; swift build + swift package resolve pass. Co-Authored-By: Claude Code <noreply@anthropic.com>
…SDK-11920) Same floor as the SDK project: iOS/tvOS 15.0, watchOS 8.0 (was 10.0/6.0/3.0). Verified: DemoSwiftiOS BUILD SUCCEEDED on iPhone 17 / OS 27.0 simulator. Co-Authored-By: Claude Code <noreply@anthropic.com>
Keep OptimizelySwiftSDK.xcworkspace so the SDK and DemoSwiftApp targets open together in one Xcode window; drop only the dead refs (Pods project and deleted podspec). IDETemplateMacros.plist returns to the workspace's xcshareddata. Verified: xcodebuild -workspace -list shows all SDK + demo schemes. Co-Authored-By: Claude Code <noreply@anthropic.com>
…DK-11920) Co-Authored-By: Claude Code <noreply@anthropic.com>
…920) Apps linked against the iOS 27 SDK crash at launch with "UIScene life cycle is required" when they still use the legacy UIApplicationDelegate window pattern. - Add SceneDelegate (UIWindowSceneDelegate) creating the window in scene(_:willConnectTo:); shared by the iOS and tvOS demo targets. - Add UIApplicationSceneManifest to both Info.plists (replaces UIMainStoryboardFile); the scene starts on SplashScreenViewController and AppDelegate swaps in the variation view once the SDK decides, as before. - AppDelegate keeps SDK init; window ownership moves to SceneDelegate, reached via UIApplication.shared.connectedScenes. Verified: installed on iPhone 17 (OS 27.0) simulator and launched — app stays alive on the splash screen (launch crash gone); DemoSwiftiOS Release build succeeds. Co-Authored-By: Claude Code <noreply@anthropic.com>
swift.yml calls unit_tests.yml@master, so PR runs execute master's old (pod-based) matrix and fail with "No Podfile found" — the branch's new workflow can never run on its own PR. Point the caller at this branch so CI exercises the new xcode-27 matrix. Revert to @master in the final merge commit once both files land together. Co-Authored-By: Claude Code <noreply@anthropic.com>
Unquoted 27.0 parses as a YAML float; Actions stringifies it to "27",
so xcodebuild got OS=27 and found no matching device ("iPhone 17"
exists on the runner only as OS 27.0). Old matrices used 17.2/18.2,
whose float stringification keeps the fraction, so the bug never
showed until a .0 release. Quote all four matrix values.
Co-Authored-By: Claude Code <noreply@anthropic.com>
The xcode-27 runner image ships no iPhone 17 Pro at OS 27.0, so xcodebuild cannot resolve the destination. Available iPhone simulators at 27.0 are iPhone 17, 17e, 18 Pro, 18 Pro Max, and Air — pick iPhone Air to keep three iOS device jobs. Co-Authored-By: Claude Code <noreply@anthropic.com>
The step had no explicit name, so Actions titled it after its first
command ("Run gem install coveralls-lcov"), hiding what it does. Name
it "Run unit tests". The gem itself was dead weight: the coverage path
uses xccov2lcov in prepare_coveralls_report.sh, not coveralls-lcov.
Co-Authored-By: Claude Code <noreply@anthropic.com>
The async-ordering tests (e.g. testDecideAsyncCompletionOrder) fail randomly on the iOS 27 matrix — a different one per run, and a crash on iPad sometimes kills the job before xcodebuild can name the test. Manual rerun --failed works but is whack-a-mole. Let the runner retry each failed job up to 2 extra times so flakes stop failing pipelines. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: muzahidul-opti <129880873+muzahidul-opti@users.noreply.github.com>
|
Reviewed and addressed the follow-ups in a21ef42: removed the invalid |
- Delete Scripts/runtimeVersion.sh and Scripts/change_header/replace_headers_folder.sh (no callers) - Pin xccov2lcov to a commit instead of fetching its moving HEAD - Pin coverallsapp/github-action to v2 instead of @master - continue-on-error on coverage steps so a coverage failure can't fail the test job Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test targets compile the SDK sources themselves. Xcode 27 no longer instruments targets outside the scheme's coverage list, so tests that don't go through Optimizely.framework recorded nothing and coverage fell from 93.9% to 56.2%. Gather coverage for all targets (xccov merges per source file) and export only Optimizely.framework to keep test code out of the report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jaeopt
left a comment
There was a problem hiding this comment.
Critical issues
1. The version and CHANGELOG don't reflect the breaking change.
- This PR removes CocoaPods and raises the minimum iOS from 10 to 15, which breaks existing consumers. Under semver, that needs a major version (6.0.0), not 5.6.0.
CHANGELOG.mdisn't touched. Its top entry is still 5.5.0..github/workflows/swift.ymlstill hasVERSION: 5.5.0.
2. Carthage support is also removed, and the PR doesn't mention it.
The README removes the Carthage badge and its whole install section, but the PR description only covers CocoaPods. The CHANGELOG and README should tell both groups of users how to migrate, for example: "5.5.0 is the last version available via CocoaPods/Carthage; use Swift Package Manager going forward."
|
Thanks @jaeopt.
🤖 Generated with Claude Code |
jaeopt
left a comment
There was a problem hiding this comment.
LGTM - I see we need to upgrade to v6 when we release it.
The only versioned line was the CocoaPods install snippet, removed in #658. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t changes (#659) * ci: publish releases automatically when SDKVersion.swift changes Replace the manual PREP/RELEASE workflow_dispatch jobs (hub-based run_prep.sh / run_release.sh on macOS runners) with release.yml, which tags vX.Y.Z and publishes the GitHub release on merge to master or release/**. SDKVersion.swift is the single source of the version. Also run unit tests for release/** PRs; run_unit_tests.sh previously skipped them silently on any branch other than master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: skip integration tests on manual runs The ci-helper-tools trigger script rejects workflow_dispatch events; the removed PREP/RELEASE guards used to skip this job on manual runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: reference actions/checkout by major tag in release.yml Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: README no longer carries a version to bump The only versioned line was the CocoaPods install snippet, removed in #658. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Package.swift, the SDK xcodeproj, and the demo appOptimizelySwiftSDK.xcworkspaceso the SDK and demo targets open together, minus the dead Pods/podspec referencesswiftlintand skips with a warning if it's missing. Move iOS/tvOS to the UIScene life cycle (SceneDelegate+UIApplicationSceneManifest), which apps built with the iOS/tvOS 27 SDK require or they crash at launchswift package resolve/swift build) and a simulator matrix onxcode-27run directly fromOptimizelySwiftSDK.xcodeproj: iPhone 17, iPad Pro 11-inch (M5), iPhone Air, Apple TV 4K (3rd gen), all OS 27.0.unittestscalls the local./.github/workflows/unit_tests.yml, so PRs test their own workflow changesos: "27.0"(YAML parsed it as float27); replace iPhone 17 Pro, which the runner image doesn't have; retry the unit-test step up to 3 times, because a few async-ordering tests (e.g.testDecideAsyncCompletionOrder) fail at random; name the test step; drop the unusedcoveralls-lcovgemxccov2lcovto a commit andcoverallsapp/github-actiontov2(both were floating), and mark the coverage stepscontinue-on-errorso a coverage failure can't fail the test jobScripts/prepare_simulator.sh,Scripts/runtimeVersion.shandScripts/change_header/replace_headers_folder.sh, drop the CocoaPods section from.gitignore, and update README / CONTRIBUTING / CLAUDE.md for an SPM-only workflow with the new minimumsCocoaPods support is being sunset and the CI runners now use Xcode 27, which can't build for targets below iOS 15 / tvOS 15 / watchOS 9 / macOS 12. Breaking for consumers: CocoaPods installs are gone, and the minimum OS versions go up (iOS 15 / tvOS 15 / watchOS 9 / macOS 12). This needs a major release (6.0.0). CHANGELOG and
VERSIONinswift.ymlare updated in the release PR; that entry should call out both the removed CocoaPods support and the new minimums, and note that 5.5.0 is the last version available via CocoaPods.Test plan
swift package dump-packagepasses;plutil -lintandxcodebuild -listpass forOptimizelySwiftSDK.xcodeprojandDemoSwiftApp.xcodeprojDemoSwiftiOSon an iOS 27 simulator: no UIScene launch crash, splash screen renders, process stays alivexcode-27. The retry loop covers the known flaky tests; they are not fixed in this PRswift-sdk @ copilot/remove-cocoapod-supportthrough SPM and built, and the IPA was uploaded to BrowserStackIssues
🤖 Generated with Claude Code