Swift 6
UpdatedSwift 6 introduces language changes that can affect how you integrate the Customer.io iOS SDK. This page explains what to expect when your app uses Swift 6.
General
Swift 6 was introduced in 2024 with Xcode 16. It includes language updates focused on safer, more predictable code, including macro improvements, stronger C++ interoperability, and stronger data-race detection through Strict Concurrency.
Strict Concurrency helps you catch concurrency issues at compile time by enforcing actor isolation, Sendable requirements, and safer async boundaries. Many iOS apps are still migrating to Swift 6, while others have already completed the transition and run Swift 6 in production.
Compatibility
To maintain the broadest compatibility possible, our iOS SDK does not yet depend on Swift 6. Starting with Customer.io iOS SDK version 4.2.0, we have no known compatibility issues for apps that use Swift 6. Future SDK versions will be built with Swift 6, so if your app is still in the migration process, we encourage you to complete that transition.
The demo apps in the iOS repository now build with Swift 6.2 and enable most optional Swift 6 features, including MEMBER_IMPORT_VISIBILITY.
Quirks
Some optional Swift 6 features change library behavior. If you enable these features in your app, your integration may differ from the examples in this documentation.
MEMBER_IMPORT_VISIBILITY
When you enable this flag, you need additional import statements. In practice, anywhere you use import CioDataPipelines, you should also add import CioInternalCommon. As the name implies, CioInternalCommon is not intended for direct app usage. It may bring some Customer.io utility classes into scope, but it should not introduce negative side effects.
The same pattern applies when importing CioMessagingPushAPN or CioMessagingPushFCM; in both cases, also import CioMessagingPush.
