TizianoCoroneo / rudder-sdk-ios

Privacy and Security focused Segment-alternative. iOS SDK

Home Page:https://www.rudderstack.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is Rudder?

Short answer: Rudder is an open-source Segment alternative written in Go, built for the enterprise.

Long answer: Rudder is a platform for collecting, storing and routing customer event data to dozens of tools. Rudder is open-source, can run in your cloud environment (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation framework to process your event data on the fly.

Released under Apache License 2.0

Installation

Rudder is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Rudder', '1.0.3'

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

Now initialize RSClient Put this 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

Track

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

Screen

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

Identify

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

Group

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

Alias

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

Reset

[[RSClient sharedInstance] reset];

For more detailed documentation check our documentation page

Contact Us

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

About

Privacy and Security focused Segment-alternative. iOS SDK

https://www.rudderstack.com

License:Apache License 2.0


Languages

Language:Objective-C 95.9%Language:Swift 3.1%Language:Ruby 0.7%Language:Shell 0.2%