Swiftpack.co - rudderlabs/rudder-sdk-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Repo for RudderStack's iOS SDK. RudderStack is an open-source, warehouse-first Customer Data Pipeline and Segment-alternative. It collects and routes clickstream data and builds your customer data lake on your data warehouse.
.package(url: "https://github.com/rudderlabs/rudder-sdk-ios.git", from: "v1.0.24")


What is RudderStack?

RudderStack is a customer data pipeline tool for collecting, routing and processing data from your websites, apps, cloud tools, and data warehouse.

More information on RudderStack can be found here.

RudderStack iOS SDK

The RudderStack iOS SDK allows you to integrate RudderStack to your iOS application in order to track event data from your app. After integrating this SDK, you will also be able to send this data to your preferred analytics destination/s such as Google Analytics, Amplitude, and more, via RudderStack.


RudderStack is available through CocoaPods and Carthage.


To install it, simply add the following line to your Podfile:

pod 'Rudder', '1.0.22'


And for Carthage support add the following line to your Cartfile

github "rudderlabs/rudder-sdk-ios" "v1.0.22"

Remember to include the following code in all .m and .h files where you want to refer to or use Rudder SDK classes

#import <Rudder/Rudder.h>

Initialize Client

To the initialize RSClient, put the following code in your AppDelegate.m file under the method didFinishLaunchingWithOptions:

RSConfigBuilder *builder = [[RSConfigBuilder alloc] init];
[builder withDataPlaneUrl:<DATA_PLANE_URL>];
[RSClient getInstance:<WRITE_KEY> config:[builder build]];

A shared instance of RSClient is accesible after the initialization by [RSClient sharedInstance].

Sending Events


[[RSClient sharedInstance] track:@"simple_track_event"];
[[RSClient sharedInstance] track:@"simple_track_with_props" properties:@{
    @"key_1" : @"value_1",
    @"key_2" : @"value_2"


[[RSClient sharedInstance] screen:@"Main" properties:@{@"prop_key" : @"prop_value"}];


[[RSClient sharedInstance] identify:@"test_user_id"
                             traits:@{@"foo": @"bar",
                                      @"foo1": @"bar1",
                                      @"email": @"test@gmail.com"}


[[RSClient sharedInstance] group:@"sample_group_id"
                          traits:@{@"foo": @"bar",
                                   @"foo1": @"bar1",
                                   @"email": @"test@gmail.com"}


[[RSClient sharedInstance] alias:@"new_user_id"];


[[RSClient sharedInstance] reset];

For detailed documentation, check our documentation page.

Contact Us

If you come across any issues while configuring or using the RudderStack iOS SDK, please feel free to contact us or start a conversation on our Slack channel. We will be happy to help you.


Stars: 9
Last commit: 12 hours ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

Version 1.0.20
12 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics