Skip to content
Open
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
89 changes: 68 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ workflows:
- build-xcframework-and-app:
requires:
- validate-code
- build-swift6:
requires:
- validate-code
- build-min-toolchain:
requires:
- validate-code

commands:
install_dependencies:
Expand Down Expand Up @@ -85,15 +91,15 @@ commands:
steps:
- macos/preboot-simulator:
platform: "iOS"
device: "iPhone 16"
version: "18.6"
device: "iPhone 18 Pro"
version: "27.0"

prestart_tvos_simulator:
steps:
- macos/preboot-simulator:
platform: "tvOS"
device: "Apple TV"
version: "18.5"
device: "Apple TV 4K (3rd generation)"
version: "27.0"

parse_and_upload_coverage:
description: "Convert .xcresult → Cobertura XML and upload to Codecov"
Expand Down Expand Up @@ -150,7 +156,7 @@ jobs:
validate-code:
resource_class: m4pro.medium
macos:
xcode: 26.6.0
xcode: 27.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Add an explicit Swift 6 consumer and callback-runtime CI lane

Selecting Xcode 27 does not select Swift 6 language mode: the checked-in Xcode targets still use SWIFT_VERSION = 5.0, and the CI make commands do not introduce a Swift 6 override or a dedicated Swift 6 consumer. The new @sendable / @preconcurrency boundary specifically changes how actor-isolated callers compile and run, so the existing Swift 5 test jobs do not continuously protect the scenario this PR fixes.

Please add an explicit Swift 6 SDK build and a Swift 6 consumer runtime job that calls sendEvent and getLocationHint with plain closures from @mainactor code, covering successful completion and error/timeout paths with UI updates handed to the main actor. Keep dependencies in their declared language modes when testing a Swift 6 consumer; globally forcing every dependency into Swift 6 tests a different configuration. Local Swift 6 checks are useful evidence, but a committed lane is needed to prevent regressions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is in now.

  • Swift 6 SDK build (5f2afd6): the AEPEdge target now builds in Swift 6 in CI, on iOS and tvOS. Only AEPEdge reads the new AEPEDGE_SWIFT_VERSION setting, so AEPCore, AEPServices and AEPRulesEngine stay on Swift 5. Normal builds still default to Swift 5.
  • Swift 6 consumer: a small Swift 6 app calls sendEvent and getLocationHint with plain closures from @MainActor code, covering the success and error/timeout paths. UI updates go back to the main actor. Dependencies keep their own Swift versions here too.


steps:
- checkout
Expand All @@ -162,11 +168,11 @@ jobs:
test-ios-unit:
resource_class: m4pro.medium
macos:
xcode: 26.6.0
xcode: 27.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Retain a minimum-supported-toolchain CI lane alongside Xcode 27

Xcode 27 is appropriate for iOS 27 compatibility testing, but all CircleCI jobs now use it while README advertises Xcode 15.3 / Swift 5.10 as the minimum supported toolchain. A successful latest-toolchain build cannot catch accidental adoption of compiler features or SDK APIs unavailable at that advertised minimum. The GitHub Actions workflow also does not explicitly select a minimum-toolchain job.

Please retain the Xcode 27 / iOS 27 lane and add an explicit Xcode 15.3 / Swift 5.10 build or consumer-integration lane, using a simulator/runtime supported by that older Xcode rather than iOS 27. This is a compatibility coverage gap, not evidence that the current sources already fail on Xcode 15.3.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in f508505. Added a committed minimum-toolchain lane (build-min-toolchain) alongside the Xcode 27 lanes.

Note on version: Xcode 15.3 images are deprecated/removed from CircleCI (deprecated Nov 2025). The oldest 15.x image still hosted is Xcode 15.4, which ships the same Swift 5.10 compiler as the advertised 15.3 floor, so it satisfies the minimum-toolchain intent. The lane is compile-only on generic/platform=iOS Simulator (no iOS 27 runtime), so it catches accidental adoption of APIs/features newer than the advertised minimum.


environment:
IOS_DEVICE_NAME: "iPhone 16"
IOS_VERSION: "18.6"
IOS_DEVICE_NAME: "iPhone 18 Pro"
IOS_VERSION: "27.0"

steps:
- checkout
Expand All @@ -182,11 +188,11 @@ jobs:
test-ios-functional:
resource_class: m4pro.medium
macos:
xcode: 26.6.0
xcode: 27.0.0

environment:
IOS_DEVICE_NAME: "iPhone 16"
IOS_VERSION: "18.6"
IOS_DEVICE_NAME: "iPhone 18 Pro"
IOS_VERSION: "27.0"

steps:
- checkout
Expand All @@ -202,11 +208,11 @@ jobs:
test-ios-integration:
resource_class: m4pro.medium
macos:
xcode: 26.6.0
xcode: 27.0.0

environment:
IOS_DEVICE_NAME: "iPhone 16"
IOS_VERSION: "18.6"
IOS_DEVICE_NAME: "iPhone 18 Pro"
IOS_VERSION: "27.0"

steps:
- checkout
Expand All @@ -222,11 +228,11 @@ jobs:
test-tvos-unit:
resource_class: m4pro.medium
macos:
xcode: 26.6.0
xcode: 27.0.0

environment:
TVOS_DEVICE_NAME: "Apple TV"
TVOS_VERSION: "18.5"
TVOS_DEVICE_NAME: "Apple TV 4K (3rd generation)"
TVOS_VERSION: "27.0"

steps:
- checkout
Expand All @@ -242,11 +248,11 @@ jobs:
test-tvos-functional:
resource_class: m4pro.medium
macos:
xcode: 26.6.0
xcode: 27.0.0

environment:
TVOS_DEVICE_NAME: "Apple TV"
TVOS_VERSION: "18.5"
TVOS_DEVICE_NAME: "Apple TV 4K (3rd generation)"
TVOS_VERSION: "27.0"

steps:
- checkout
Expand All @@ -262,7 +268,7 @@ jobs:
build-xcframework-and-app:
resource_class: m4pro.medium
macos:
xcode: 26.6.0
xcode: 27.0.0

steps:
- checkout
Expand All @@ -273,3 +279,44 @@ jobs:
- run:
name: Build Test App
command: make build-app

# Swift 6 language-mode coverage. Selecting Xcode 27 does not select Swift 6
# mode (checked-in targets are SWIFT_VERSION = 5.0), so this lane builds the
# AEPEdge target in Swift 6 via AEPEDGE_SWIFT_VERSION (referenced only by that
# target), then compiles a Swift 6 consumer that calls the public
# completion-handler APIs with plain closures from @MainActor code. Dependencies
# keep their own declared language modes (matching a real Swift 6 app), so this
# does not force unreleased dependencies into Swift 6. This continuously protects the
# @Sendable / @preconcurrency boundary this PR adds.
# The full Swift 6 consumer *runtime* probe lands with the dependency-minimum
# bump, once the fixed @Sendable AEPCore / AEPEdgeIdentity releases are published.
build-swift6:
resource_class: m4pro.medium
macos:
xcode: 27.0.0

steps:
- checkout
- install_dependencies
- run:
name: Build AEPEdge in Swift 6 language mode (dependencies keep their modes)
command: make build-swift6
- run:
name: Build Swift 6 consumer (plain closures from @MainActor)
command: make test-swift6-consumer

# Minimum-supported-toolchain coverage. README advertises Xcode 15.3+ / Swift
# 5.10 as the floor; 15.4 is the oldest 15.x image CircleCI still hosts and
# ships the same Swift 5.10 compiler. Compile-only (no iOS 27 runtime) to catch
# accidental use of APIs/features newer than the advertised minimum.
build-min-toolchain:
resource_class: m4pro.medium
macos:
xcode: 15.4.0

steps:
- checkout
- install_dependencies
- run:
name: Build SDK on minimum supported toolchain (Xcode 15.4 / Swift 5.10)
command: make build-min-toolchain
6 changes: 3 additions & 3 deletions AEPEdge.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Pod::Spec.new do |s|
s.author = "Adobe Experience Platform SDK Team"
s.source = { :git => "https://github.com/adobe/aepsdk-edge-ios.git", :tag => s.version.to_s }

s.ios.deployment_target = '12.0'
s.tvos.deployment_target = '12.0'
s.ios.deployment_target = '15.0'
s.tvos.deployment_target = '15.0'

s.swift_version = '5.1'
s.swift_version = '5.10'

s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
s.dependency 'AEPCore', '>= 5.13.0', '< 6.0.0'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Require the fixed dependency releases before Swift 6 readiness sign-off

The current dependency constraints still allow AEPEdgeIdentity 5.2.0, and Podfile.lock selects that published version. With this PR and the locked published dependencies, a Swift 6 consumer calling Identity.getExperienceCloudId with a plain closure from @mainactor code crashes on iOS 27.2 with a libdispatch assertion that the block was expected to execute on the main queue. DispatchQueue.main.async inside the callback does not prevent the crash because the executor check happens when entering the callback; the same probe passes with an explicitly @sendable callback.

This is a pre-existing cross-SDK readiness blocker, not a newly introduced Edge implementation defect. The reported smoke tests used all five local SDK branches, so they do not establish that the currently permitted published dependency combination is safe. As already noted in the release prerequisites, please raise the CocoaPods and SPM dependency minimums to the fixed releases, refresh the lockfile, and exercise the published dependency combination before release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged — this is a cross-SDK release-gating item rather than an Edge code change.

The Edge-side fix (public completions marked @preconcurrency + @Sendable) is in this PR. The dependency-minimum bump you're asking for cannot be applied yet: the Swift 6 @Sendable fixed releases of AEPCore and AEPEdgeIdentity are not yet published, so raising the CocoaPods/SPM constraints to those versions now would break resolution against the public spec repos.

Plan to close this fully once those releases ship:

  1. Raise the minimums in AEPEdge.podspec and Package.swift to the fixed AEPCore / AEPEdgeIdentity releases.
  2. Refresh Podfile.lock against the published combination.
  3. Re-run the Swift 6 consumer probe (plain closure from @MainActor, success + error/timeout) against the published dependency set, not local branches.

I'll add a tracking TODO next to the dependency constraints in the same commit so the intent is visible until the versions are available.

Expand Down
Loading
Loading