Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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
42 changes: 21 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,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 +150,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 +162,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 +182,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 +202,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 +222,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 +242,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 +262,7 @@ jobs:
build-xcframework-and-app:
resource_class: m4pro.medium
macos:
xcode: 26.6.0
xcode: 27.0.0

steps:
- checkout
Expand Down
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
156 changes: 79 additions & 77 deletions AEPEdge.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TVOS_ARCHIVE_PATH = $(CURR_DIR)/build/tvos.xcarchive/Products/Library/Frameworks
TVOS_ARCHIVE_DSYM_PATH = $(CURR_DIR)/build/tvos.xcarchive/dSYMs/

# CI variables - using values with defaults. Set defaults to values that are most useful for local development.
IOS_DEVICE_NAME ?= iPhone 15
IOS_DEVICE_NAME ?= iPhone 18 Pro
# If OS version is not specified, uses the first device name match in the list of available simulators
IOS_VERSION ?=
ifeq ($(strip $(IOS_VERSION)),)
Expand All @@ -24,7 +24,7 @@ else
IOS_DESTINATION = "platform=iOS Simulator,name=$(IOS_DEVICE_NAME),OS=$(IOS_VERSION)"
endif

TVOS_DEVICE_NAME ?= Apple TV
TVOS_DEVICE_NAME ?= Apple TV 4K (3rd generation)
# If OS version is not specified, uses the first device name match in the list of available simulators
TVOS_VERSION ?=
ifeq ($(strip $(TVOS_VERSION)),)
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
/*
Copyright 2020 Adobe. All rights reserved.
Expand All @@ -15,7 +15,7 @@ import PackageDescription

let package = Package(
name: "AEPEdge",
platforms: [.iOS(.v12), .tvOS(.v12)],
platforms: [.iOS(.v15), .tvOS(.v15)],
products: [
.library(name: "AEPEdge", targets: ["AEPEdge"])
],
Expand Down
5 changes: 3 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
platform :ios, '15.0'

# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
Expand Down Expand Up @@ -54,7 +54,8 @@ end
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |bc|
bc.build_settings['TVOS_DEPLOYMENT_TARGET'] = '12.0'
bc.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
bc.build_settings['TVOS_DEPLOYMENT_TARGET'] = '15.0'
bc.build_settings['SUPPORTED_PLATFORMS'] = 'iphoneos iphonesimulator appletvos appletvsimulator'
bc.build_settings['TARGETED_DEVICE_FAMILY'] = "1,2,3"
end
Expand Down
6 changes: 3 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ CHECKOUT OPTIONS:
SPEC CHECKSUMS:
AEPAssurance: 3ab00d47a40bc6c6cb2000689e0dcfa595cda250
AEPCore: 13541c6cd72488506a3fda85a5e1288759f09336
AEPEdge: bf1044fefb7038ef98dff4834154145967a35cf9
AEPEdge: 2243ebfbd3f7bd88464a8caddd626634c642a292
AEPEdgeConsent: b5a54985b79ee0222b1f1fc4b0859f8b8afed07a
AEPEdgeIdentity: 784ecc1dd434f9a19c66cc74a6a947876b93fa8f
AEPRulesEngine: fe5800653a4bee07b1e41e61b4d5551f0dba557b
AEPServices: 5533aaa108ffb0e75adcbfdfdd08bd4cbe9b02fd
AEPTestUtils: 2bbed995c8974f6f6d92058db88d6cd2e4a7f869
SwiftLint: 13280e21cdda6786ad908dc6e416afe5acd1fcb7

PODFILE CHECKSUM: 92bb69895448b79aa523a99f61cda67f43890e00
PODFILE CHECKSUM: 36aa15c92787a4e5ae2af17173c30bab00d9c2c5

COCOAPODS: 1.16.2
COCOAPODS: 1.17.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ The Edge Network mobile extension is part of the [Adobe Experience Platform Mobi
For more details, see the [Adobe Experience Platform Edge Network](https://developer.adobe.com/client-sdks/documentation/edge-network/) documentation.

## Requirements
- Xcode 15 (or newer)
- Swift 5.1 (or newer)
- Xcode 15.3 (or newer)
- Swift 5.10 (or newer)

## Installation

Expand Down
4 changes: 2 additions & 2 deletions Script/test-SPM.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ mkdir -p $PROJECT_NAME && cd $PROJECT_NAME
swift package init

# Create the Package.swift.
echo "// swift-tools-version:5.3
echo "// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: \"TestProject\",
defaultLocalization: \"en-US\",
platforms: [
.iOS(.v12), .tvOS(.v12)
.iOS(.v15), .tvOS(.v15)
],
products: [
.library(
Expand Down
4 changes: 2 additions & 2 deletions Script/test-podspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ targets:
type: framework
sources: Sources
platform: iOS
deploymentTarget: "12.0"
deploymentTarget: "15.0"
settings:
GENERATE_INFOPLIST_FILE: YES
" >>project.yml
Expand Down Expand Up @@ -82,7 +82,7 @@ targets:
type: framework
sources: Sources
platform: tvOS
deploymentTarget: "12.0"
deploymentTarget: "15.0"
settings:
GENERATE_INFOPLIST_FILE: YES
" >>project.yml
Expand Down
4 changes: 2 additions & 2 deletions Sources/Edge+PublicAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public extension Edge {
/// - completion: Optional completion handler to be invoked when the request is complete, returning the associated response handles
/// received from the Adobe Experience Edge. It may be invoked on a different thread.
@objc(sendExperienceEvent:completion:)
static func sendEvent(experienceEvent: ExperienceEvent, _ completion: (([EdgeEventHandle]) -> Void)? = nil) {
@preconcurrency static func sendEvent(experienceEvent: ExperienceEvent, _ completion: (@Sendable ([EdgeEventHandle]) -> Void)? = nil) {
guard let xdmData = experienceEvent.xdm, !xdmData.isEmpty, let eventData = experienceEvent.asDictionary() else {
Log.debug(label: LOG_TAG, "Failed to dispatch the experience event because the XDM data was nil/empty.")
return
Expand Down Expand Up @@ -68,7 +68,7 @@ public extension Edge {
/// Returns the Edge Network location hint, or nil if the location hint expired or is not set.
/// - Parameter completion: A completion handler invoked with the location hint, or an 'AEPError' if the request times out or an unexpected error occurs.
@objc(getLocationHint:)
static func getLocationHint(_ completion: @escaping (String?, Error?) -> Void) {
@preconcurrency static func getLocationHint(_ completion: @escaping @Sendable (String?, Error?) -> Void) {
let event = Event(name: "Edge Request Location Hint",
type: EventType.edge,
source: EventSource.requestIdentity,
Expand Down
6 changes: 3 additions & 3 deletions Sources/EdgeNetworkHandlers/CompletionHandlersManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Foundation
class CompletionHandlersManager {
private let TAG = "CompletionHandlersManager"
private var completionHandlers =
ThreadSafeDictionary<String, (([EdgeEventHandle]) -> Void)>(identifier: "com.adobe.edge.completionHandlers")
ThreadSafeDictionary<String, (@Sendable ([EdgeEventHandle]) -> Void)>(identifier: "com.adobe.edge.completionHandlers")

// edge response handles for a event request id (key)
private var edgeEventHandles =
Expand All @@ -30,7 +30,7 @@ class CompletionHandlersManager {
private var edgeEventErrors =
ThreadSafeDictionary<String, [EdgeEventError]>(identifier: "com.adobe.edge.edgeEventErrorsList")

static let shared = CompletionHandlersManager()
nonisolated(unsafe) static let shared = CompletionHandlersManager()
Comment thread
shushinde marked this conversation as resolved.
Resolved

/// Registers a completion handler for the specified `requestEventId`. This handler is invoked when the Edge response content has been
/// handled entirely by the Edge extension, containing a list of `EdgeEventHandle`(s). This list can be empty or can contain one or multiple items
Expand All @@ -39,7 +39,7 @@ class CompletionHandlersManager {
/// - Parameters:
/// - forRequestEventId: unique event identifier for which the completion handler is registered; should not be empty
/// - completionHandler: the completion handler that needs to be registered, should not be nil
func registerCompletionHandler(forRequestEventId: String, completion: (([EdgeEventHandle]) -> Void)?) {
func registerCompletionHandler(forRequestEventId: String, completion: (@Sendable ([EdgeEventHandle]) -> Void)?) {
guard let unwrappedCompletion = completion else { return }
guard !forRequestEventId.isEmpty else {
Log.warning(label: TAG, "Failed to register completion handler because of empty request event id.")
Expand Down
4 changes: 2 additions & 2 deletions Sources/EdgeNetworkHandlers/EdgeBundledBatchingConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ enum EdgeBundledBatchingConfig {
static let BUNDLED_CONFIG_FILE_TYPE = "json"

private static let loadLock = NSLock()
private static var cachedConfig: [String: Any]?
private static var loadAttempted = false
nonisolated(unsafe) private static var cachedConfig: [String: Any]?
nonisolated(unsafe) private static var loadAttempted = false

/// Returns the parsed contents of the bundled batching config file, loading and caching it the
/// first time this is called. Subsequent calls return the cached result without re-reading the
Expand Down
2 changes: 1 addition & 1 deletion Sources/EdgeNetworkHandlers/NetworkResponseHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class NetworkResponseHandler {
/// for the whole batch's stream to close. The highest index and anything still pending complete
/// at stream close (`processResponseOnComplete`), exactly as before. Only relevant to multi-event
/// batched responses; single events, consent, batch-of-1 are unaffected either way.
static var earlyPerEventCompletionEnabled = true
nonisolated(unsafe) static var earlyPerEventCompletionEnabled = true

// the order of the request events matter for matching them with the response events
private var sentEventsWaitingResponse = ThreadSafeDictionary<String, [Event]>()
Expand Down
2 changes: 1 addition & 1 deletion TestApps/TestAppSwiftUI/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import UIKit
import AEPAssurance
#endif

@UIApplicationMain
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
// TODO: Set up the Environment File ID from your Launch property for the preferred environment
private let LAUNCH_ENVIRONMENT_FILE_ID = ""
Expand Down
Loading
Loading