Skip to content

iOS 27 and Swift 6 readiness for AEPEdgeBridge - #128

Open
shushinde wants to merge 8 commits into
dev-ios27from
ios-27
Open

shushinde wants to merge 8 commits into
dev-ios27from
ios-27

Conversation

@shushinde

@shushinde shushinde commented Nov 4, 2026 •

Copy link
Copy Markdown

Summary

Makes AEPEdgeBridge compile cleanly under Swift 6 language mode for iOS 27 / Xcode 27. The SDK still ships in Swift 5 mode.

Jira: MOB-25785

Target

Area Before After
Minimum iOS / tvOS 12.0 15.0 (Package.swift, podspec, project, Podfile, scripts)
Minimum toolchain Swift 5.1 / Xcode 15 Swift 5.10 / Xcode 15.3 (swift-tools-version 5.10)
Language mode Swift 5 Swift 5 (Swift 6 verified)
ABI Unchanged (exported symbols 32 of 32 identical to dev-ios27)

Approach

  1. Raised the deployment target and toolchain
  2. Built against local Swift 6 ready dependencies (Core, RulesEngine, Edge, EdgeIdentity, Assurance)
  3. Switched own targets to Swift 6 and fixed every error in Debug and Release
  4. Ran the smoke tests, then reverted to Swift 5

Swift 6 fixes

  • EdgeBridgeHelper: the main thread branch now reads UIApplication.shared.applicationState through MainActor.assumeIsolated, since UIApplication is main actor only in Swift 6. Behavior is unchanged.
  • Test app: @UIApplicationMain replaced with @main.
  • Test utils: TestableExtensionRuntime implements recordHistoricalEvent(_:handler:) so the tests compile against newer AEPCore.
  • Project: SwiftLint build phases quote ${SRCROOT} so builds work from paths with spaces.

Public API changes

None. AEPEdgeBridge has no public completion handlers or listeners, and its only public static is the immutable extensionVersion.

Consumer impact

Swift 5, Swift 6 and Obj-C callers: no change.

CI

GitHub hosted macos-14 runners used by the shared aepsdk-commons workflow only provide Xcode up to 16.2, so, like aepsdk-edge-ios, the Xcode 27 jobs run on CircleCI and the GitHub workflow keeps its original settings.

  • New CircleCI config on Xcode 27.0.0: validate-code, iOS and tvOS unit and functional tests on iPhone 18 Pro / Apple TV 4K (3rd generation) (27.0), and xcframework + test app build. Makefile simulator defaults updated to match.
  • build-swift6 (Xcode 27.0.0): builds the AEPEdgeBridge target in Swift 6 via AEPEDGEBRIDGE_SWIFT_VERSION=6.0 (read only by that target, dependencies keep their modes), then builds a Swift 6 consumer package (Script/test-swift6-consumer.sh).
  • build-min-toolchain (Xcode 15.4.0, the oldest 15.x image CircleCI hosts, same Swift 5.10 compiler as 15.3).

Validation

Check Result
Builds: Swift 5 and Swift 6, Debug and Release, iOS and tvOS (SDK, test apps, test targets) ✅
Unit tests (iOS 27 / tvOS 27) ✅ 52 of 52 / 52 of 52
Functional tests (iOS 27 / tvOS 27) ✅ 3 of 3 / 3 of 3
Exported symbols vs dev-ios27 ✅ 32 of 32 identical
make build-swift6, make test-swift6-consumer ✅ iOS and tvOS
Smoke tests (Swift 5 and Swift 6 app, fresh iPhone 18 Pro iOS 27 simulator) ✅ see comment

Dependencies and release

Depends on the ios-27 PRs of: AEPCore (adobe/aepsdk-core-ios#1248), AEPRulesEngine (swift6-readiness), AEPEdge (adobe/aepsdk-edge-ios#548), AEPEdgeIdentity (adobe/aepsdk-edgeidentity-ios#156). AEPEdge, AEPEdgeIdentity and AEPAssurance are used only by the tests and test apps. Release after them.

@shushinde

Copy link
Copy Markdown
Author

Smoke test results for AEPEdgeBridge

What

I ran the Mobile SDK smoke tests - Edge Bridge against this branch at f362c00. The later commits only touch CI and the Swift version build setting, so SDK and test app code are the same.

How

Setup Details
Dependencies All local branches: aepsdk-core-ios ios-27, aepsdk-rulesengine-ios swift6-readiness, aepsdk-edge-ios ios-27, aepsdk-edgeidentity-ios ios-27, aepsdk-assurance-ios ios-27
Install Clean pod install after deleting Pods and derived data
Device Brand new iPhone 18 Pro simulator on iOS 27
App This repo's TestAppiOS, run once in Swift 5 mode and once in Swift 6 mode, with the Edge Bridge test property from the wiki
Calls The same calls as the test app buttons, made from main thread code, plus one trackAction when the app moves to the background
Verification SDK trace logs, checking each Edge Bridge Request payload

Result

Check Swift 5 app Swift 6 app
Unit tests ✅ 52 of 52 (iOS and tvOS)
Functional tests ✅ 3 of 3 (iOS and tvOS)
Smoke test steps ✅ 6 of 6 ✅ 6 of 6
Crashes None None
# Test Result Observed
1 trackAction "purchase" ✅ linkName: purchase, linkType: other, contextData has a.AppID: TestAppiOS 1.0 (1) and myapp.promotion
2 trackState product view ✅ pageName: products/189025/runningshoes/12345, contextData has a.AppID, myapp.category, myapp.promotion
3 cp in foreground ✅ cp: foreground on tests 1, 2 and 6
4 cp in background ✅ cp: background on a trackAction sent after the app moved to the background
5 && prefixed keys ✅ products and events placed under data.__adobe.analytics, not in contextData
6 Trigger Consequence (rule from the mobile property) ✅ Rule fired and was forwarded: linkName: Trigger Rule Consequence Example, contextData.test: value, linkType: other

…27.0 simulators

GitHub hosted macos-14 runners used by the shared aepsdk-commons workflow only provide Xcode up to 16.2, so the Xcode 27 jobs run on CircleCI like aepsdk-edge-ios. The GitHub workflow is restored to its original settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant