letconfiguration=Configuration(writeKey:"WRITE_KEY",dataPlaneUrl:"<https://data-plane.com>")letanalytics=Analytics(configuration:configuration)// Store and use the instanceanalytics.track(name:"Event")
Public classes renamed
All public classes have been renamed to remove the RS prefix in favor of clearer, more descriptive names. Find and replace all references in your codebase.
Old
New
RSClient
Analytics
RSConfig
Configuration
RSOption
RudderOption
RSMessage
Event
RSPlugin
Plugin
RSEventPlugin
EventPlugin
RSDestinationPlugin
IntegrationPlugin
RSLogLevel
LogLevel
API method signatures
All tracking methods now use explicit named parameters for better code readability and Swift conventions. The first parameter is no longer anonymous, and option has been renamed to options.
Method
iOS SDK v2 — Legacy
iOS (Swift)
Track
track(_:properties:option:)
track(name:properties:options:)
Identify
identify(_:traits:option:)
identify(userId:traits:options:)
Screen
screen(_:category:properties:option:)
screen(screenName:category:properties:options:)
Group
group(_:traits:option:)
group(groupId:traits:options:)
Alias
alias(_:option:)
alias(newId:previousId:options:)
Reset
reset()
reset(options:)
Type changes
Several numeric types have changed to UInt64 for consistency and to support larger values. Note that flush interval units changed from seconds to milliseconds for finer control.
Plugin execution stages have been renamed to better describe their purpose in the event processing pipeline. The .after stage has been removed — use .terminal or .utility instead.
iOS SDK v2 — Legacy
iOS (Swift)
.before
.preProcess
.enrichment
.onProcess
.destination
.terminal
.after
Removed
.utility
.utility
Configuration mappings
The builder pattern (RSConfig().method().method()) has been replaced with a standard Swift initializer. Session-related settings are now grouped in a separate SessionConfiguration object.
Use the below table as a reference when updating your configuration code:
iOS SDK v2 — Legacy (RSConfig)
iOS (Swift) SDK (Configuration)
writeKey
writeKey
dataPlaneURL(_:)
dataPlaneUrl
controlPlaneURL(_:)
controlPlaneUrl
loglevel(_:)
Handled via LoggerAnalytics class
trackLifecycleEvents(_:)
trackApplicationLifecycleEvents
recordScreenViews(_:)
Not available. User can handle via custom plugins
flushQueueSize(_:)
CountFlushPolicy
sleepTimeOut(_:)
Handled via FrequencyFlushPolicy
dbCountThreshold(_:)
Handled via CountFlushPolicy
autoSessionTracking(_:)
Handled via SessionConfiguration.automaticSessionTracking
sessionTimeout(_:)
Handled via SessionConfiguration.sessionTimeoutInMillis
Removed features
The following features are removed in the iOS (Swift) SDK:
MessageContext and context call are no longer available.
CocoaPods is not supported — only Swift Package Manager is supported.
Migration from iOS v2 SDK
See the Migration Guide for detailed instructions on migrating from the legacy iOS SDK v2 to the iOS (Swift) SDK.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.