Skip to content

iOS 27: minimum iOS/tvOS 15.0, Swift 5.10 toolchain and Swift 6 readiness - #156

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

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

Conversation

@shushinde

@shushinde shushinde commented Oct 19, 2026 •

Copy link
Copy Markdown

What this PR does

Gets AEPEdgeIdentity ready for iOS 27 / Xcode 27 and for apps written in Swift 6.

Minimum iOS and tvOS is now 15.0. It's set the same way everywhere: Package.swift, the podspec, the Xcode project, the Podfile and the test scripts. Xcode 27 won't build anything below 15.0, so main (still on 12.0) no longer builds with it.

Minimum toolchain is now Swift 5.10 / Xcode 15.3. Package.swift uses tools version 5.10, the podspec sets swift_version = '5.10', and the README lists the new requirements.

Fixes a crash in Swift 6 apps. If a Swift 6 app called getExperienceCloudId, getUrlVariables or getIdentities from SwiftUI or UIKit code with a regular closure, the app crashed. Swift treated the closure as main-thread-only, but the SDK calls it from its own background queue. These three completion handlers are now marked @Sendable (with @preconcurrency), the same fix AEPCore uses.

  • Existing apps still compile; at most they get warnings.
  • The binary interface is unchanged: exported symbols match main exactly.
  • The test app now switches to the main thread before updating the UI.

Also:

  • The test app uses @main instead of the deprecated @UIApplicationMain.
  • The project stays on Swift 5 language mode (SWIFT_VERSION = 5.0). Swift 6 support was checked by building in Swift 6 mode and running a Swift 6 app.

Testing

Tested on Xcode 27 with iOS 27 and tvOS 27 simulators, using local builds of the dependency PRs listed below.

Check Result
Builds: Swift 5 and Swift 6, Debug and Release, iOS and tvOS, simulator and device ✅ 16/16
Exported symbols compared with main ✅ identical
Unit tests, iOS and tvOS ✅ 149/149
Functional tests, iOS and tvOS ✅ 144/144
Test apps (Swift, Objective-C, tvOS) ✅ build
Smoke test in a Swift 6 app on a fresh simulator ✅ 21/21, no crashes

The smoke test follows the Mobile SDK smoke tests – Edge / Edge Identity / Edge Consent wiki page. It covered ECID and URL variables, updating, reading and removing identities, resetting identities, location hint, consent (yes, no, pending, and repeated requests), lifecycle events reaching Edge, and datastream overrides. Network retry and the Assurance UI weren't covered.

Dependencies and release

This is one of five PRs that ship together. All of them target dev-ios27:

SDK PR Depends on
AEPRulesEngine adobe/aepsdk-rulesengine-ios#83 —
AEPCore (+ Services, Identity, Lifecycle) adobe/aepsdk-core-ios#1248 AEPRulesEngine
AEPEdgeIdentity this PR AEPCore
AEPEdge adobe/aepsdk-edge-ios#548 AEPCore, AEPEdgeIdentity
AEPEdgeConsent adobe/aepsdk-edgeconsent-ios#127 AEPCore, AEPEdge

Release in that order: RulesEngine → Core → EdgeIdentity → Edge → EdgeConsent. Each one should be published before the next is released.

Before releasing EdgeIdentity:

  • Bump the version. The branch still says 5.2.0, which is already released. The release workflow checks the version in the podspec, MARKETING_VERSION in the Xcode project and EXTENSION_VERSION in IdentityConstants.swift; the update-versions workflow updates all three.
  • Raise the AEPCore minimum from 5.13.0 to the new Core release, in both the podspec and Package.swift, so apps can't pick up an older Core. The update-versions workflow can do this with its core-dependency input.
  • Refresh Podfile.lock against the published pods.

Edge and EdgeConsent will need the same updates for their own dependencies once the releases before them are out.

Version number: raising the minimum OS from 12 to 15 drops apps that still target iOS/tvOS 12–14. All five SDKs make this change, so pick the same kind of version bump (minor or major) for all of them.

EdgeIdentity doesn't use any new Core API. The Core minimum is raised so the whole set ships and gets resolved together.

Comment thread Podfile.lock Outdated
- AEPCore (< 6.0.0, >= 5.0.0)
- AEPServices (< 6.0.0, >= 5.0.0)
- AEPCore (5.10.0):
- AEPCore (5.12.0):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Need to set again with new core major version

@ishwetansh ishwetansh left a comment

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.

iOS 27 / Swift 6 readiness review

Reviewed commit 82fa34f94124251abdbd256c86832bb187c99a84 against dev-ios27.

Assessment: changes and explicit readiness prerequisites remain. The inconsistent source/binary minimum-OS contract is attached inline. The existing dependency-version comment is not duplicated.

Verified: Xcode 27.1 / Swift 6.4 / SDK 27.1; 16 focused unit tests and 29 functional tests passed on iOS 27.0 in shipped settings. A further 29 functional tests passed with the owned library in actual Swift 6 mode. Owned-library Debug/Release Swift 6 builds, Swift 6 CocoaPods/SPM consumers, and a default tvOS 27 SDK build passed using released dependencies. The current-head CI registration-timeout case passed locally; its regression causality remains unproven.

Important Swift 6 runtime blocker (pre-existing, not introduced by this diff): a real @MainActor Swift 6 consumer calling Identity.getExperienceCloudId with an ordinary inferred-isolation completion crashes with _dispatch_assert_queue_fail / Swift executor checking on com.adobe.OperationOrderer(EventHub). The stack reaches Identity+PublicAPI.swift:47. The unchanged public completion is not @Sendable, allowing the caller's actor isolation to be inferred even though the SDK invokes it on its event queue. An explicit @Sendable consumer callback avoids the crash; UI work must then deliberately hop to its actor. This requires an API/compatibility strategy before claiming unrestricted Swift 6 readiness, not just a compile pass.

Cross-SDK evidence: a Swift 6 consumer built against all five exact PR heads and passed registration/ECID/reset smoke testing with the explicit callback workaround. An all-owned-target Swift 6 Release build remains blocked by Core's mobileCoreInitializer and EventHub.shared Release declarations. These are separate from the known strict UnitTests blocker with released Core 5.12.0.

Scope: the submitted library and UnitTests targets still use Swift 5, despite the PR description claiming all-target adoption. No full-suite, physical-device, tvOS 27-runtime, live Edge-network, or iOS 27.1-runtime sign-off is implied.

INFOPLIST_FILE = Sources/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.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] Apply the new deployment floor to both source distribution manifests

This raises the framework artifact's minimum iOS version to 15, but Package.swift still declares iOS/tvOS 12 and AEPEdgeIdentity.podspec still declares both deployment targets as 12. The Podfile post_install change only affects this repository's workspace; it does not run for customers installing the pod or Swift package. Consequently the same SDK release continues to be advertised/resolved for iOS/tvOS 12-14 through source distribution while its Xcode/XCFramework artifact requires 15. Update both public manifests with the deployment-floor change so supported platforms are consistent across installation methods.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 1a49cb6: Package.swift now declares platforms: [.iOS(.v15), .tvOS(.v15)] and AEPEdgeIdentity.podspec sets both deployment_targets to 15.0, matching the Xcode project (including the project-level configs, which were still 12.0) and the Podfile. The test scripts (Script/test-podspec.sh, Script/test-SPM.sh) also use 15.0 now.

- Set minimum iOS/tvOS deployment target to 15.0 (project + Podfile post_install)
- Move all targets to Swift 6
- Replace deprecated @UIApplicationMain with @main in TestApp AppDelegate
- Update MockExtension for Swift 6 concurrency
- Bump AEPCore/AEPServices/AEPIdentity pods to 5.12.0
…iOS/tvOS 15.0

- Package.swift: swift-tools-version 5.10, platforms iOS/tvOS .v15
- AEPEdgeIdentity.podspec: swift_version 5.10, iOS/tvOS deployment 15.0
- Project-level IPHONEOS/TVOS_DEPLOYMENT_TARGET 12.0 -> 15.0
- Podfile: platform iOS 15.0; refresh Podfile.lock (AEPCore 5.13.0, checksum)
- Script/test-SPM.sh and Script/test-podspec.sh: 5.10 tools / 15.0 targets
- SampleApps/TestApp/Makefile: IPHONEOS_DEPLOYMENT_TARGET 15.0
- README: Xcode 15.3+, Swift 5.10+, iOS/tvOS 15.0+
Swift 6 apps crashed (_dispatch_assert_queue_fail on
com.adobe.OperationOrderer(EventHub), Identity+PublicAPI.swift:47) when
calling Identity.getExperienceCloudId from @mainactor code with a plain
closure: the closure was inferred main-actor isolated, but the SDK invokes
it on the EventHub queue.

- getExperienceCloudId, getUrlVariables, getIdentities: completion is now
  @escaping @sendable, matching AEPCore/AEPIdentity
- @preconcurrency keeps existing Swift 6 clients building (warnings only)
- No ABI change: exported symbols identical to main (107/107) in Swift 5
  and Swift 6 builds
- TestApp: hop to main queue before updating SwiftUI state
Swift 6 readiness was validated with Swift 6 builds and a Swift 6 consumer
app; the project itself stays in Swift 5 language mode.
@shushinde shushinde changed the title iOS 27: minimum deployment 15.0 and Swift 6 readiness iOS 27: minimum iOS/tvOS 15.0, Swift 5.10 toolchain and Swift 6 readiness Oct 27, 2026
@shushinde

Copy link
Copy Markdown
Author

Thanks @ishwetansh, addressed in 1a49cb6, 1d97835 and 69750e8:

  • Deployment-floor mismatch: iOS/tvOS 15.0 is now in Package.swift, the podspec, all project configs and the scripts (see the inline reply).
  • Swift 6 runtime crash (Identity.getExperienceCloudId from @MainActor): reproduced in a Swift 6 TestApp, with the same _dispatch_assert_queue_fail on com.adobe.OperationOrderer(EventHub) at Identity+PublicAPI.swift:47. Fixed by making the completions of getExperienceCloudId, getUrlVariables and getIdentities @preconcurrency @escaping @Sendable, the same strategy as AEPCore. Existing callers still compile (warnings only), Swift 5 callers are unaffected, and exported symbols are unchanged (107/107 vs main, Swift 5 and Swift 6 builds). The Swift 6 smoke test now passes with plain closures and no workaround. The same fix is applied to Edge (iOS 27 and Swift 6 readiness aepsdk-edge-ios#548) and Edge Consent (iOS 27 and Swift 6 readiness aepsdk-edgeconsent-ios#127).
  • Scope / description: corrected. All targets stay on SWIFT_VERSION = 5.0; Swift 6 readiness is validated by Swift 6 Debug/Release builds of the library and a Swift 6 consumer app, not by switching the project's language mode.
  • Release build blocked by Core's mobileCoreInitializer / EventHub.shared: with Swift 6 language mode compatibility (iOS 27 / Xcode 27) aepsdk-core-ios#1248, all 16 Swift 5/6 Debug/Release builds pass.

Validation details are in the updated description.

@ishwetansh

Copy link
Copy Markdown
Contributor

@shushinde , can you check the CI, the functional tests are broken

@shushinde

shushinde commented Oct 27, 2026 •

Copy link
Copy Markdown
Author

@shushinde , can you check the CI, the functional tests are broken

Hi @ishwetansh ,
I re ran the failed job and it passed.
Issue was: runner couldn't find the iOS simulator Unable to find a device matching the provided destination
The other test jobs used the same macos-15 image and simulator and passed.
Also gh fully supports macos-15, so this wasn't a deprecation issue.
I think it was an intermittent problem on that runner

@shushinde

Copy link
Copy Markdown
Author

Smoke test results for AEPEdgeIdentity

What

I ran the Edge, Edge Identity and Edge Consent smoke tests from the wiki against this branch at 69750e8.

How

Setup Details
Dependencies All local branches: RulesEngine, Core (with Services, Identity, Lifecycle), Edge, Edge Consent
Install Clean pod install after deleting Pods and derived data
Device Brand new iPhone 18 Pro simulator on iOS 27 for every run, deleted afterwards
App This repo's TestApp, run once in Swift 5 mode and once in Swift 6 mode
Property Edge testing property from the wiki
Callbacks Plain closures from main actor code, the case that used to crash in Swift 6 apps

Result

Check Swift 5 app Swift 6 app
Unit tests ✅ 149 of 149
Functional tests ✅ 144 of 144
Smoke test steps ✅ 21 of 21 ✅ 21 of 21
Crashes None None
Smoke test step Result
Get ECID and URL variables ✅
Update, get and remove identities, with events sent before and after ✅ Email shows up in the request identity map, then is gone after removal
Reset identities ✅ New ECID, only the ECID namespace remains
Consent no, pending and yes ✅ Events dropped on no, held on pending, sent after yes
Repeated consent within one second ✅ Second request dropped
Location hint set, get and clear ✅
Lifecycle launch and close reach Edge ✅
Datastream ID and config overrides ✅ Request uses the override config ID and keeps the original datastream
Send event with callback ✅

Network retry and the Assurance UI need a manual check and weren't part of this run.

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.

2 participants