forked from segmentio/analytics-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Packaged Integrations
Prateek Srivastava edited this page Nov 16, 2015
·
6 revisions
We're in the process of decoupling integrations from our main library. This lets partners host integrations themselves and eliminates the barrier of releasing independent updates to those integrations.
This update is an API compatible release, and the process for using our library hasn't changed significantly.
First, you need to install our SDK.
pod 'Analytics', '~> 3.0.2-alpha'
This will install only the Segment integration. If you need to add more integrations, add them as a dependency manually.
pod `Segment-Bugsnag`
pod `Segment-Branch`
...
Once you've setup your dependencies, you need to initialize our SDK (make sure you import all the required headers).
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
// Add any of your bundled integrations.
config use:[SEGGoogleAnalyticsIntegrationFactory instance];
config use:[BNCBranchIntegrationFactory instance];
...
[SEGAnalytics setupWithConfiguration:config];
As you can see, bundling an integration is a 2 step process:
- Add the integration dependency.
- Register it with your configuration.
The rest of the steps are the same as before.