-
Notifications
You must be signed in to change notification settings - Fork 333
Packaged Integrations
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. The only change is how bundled integrations are picked up our library. Bundling an integration is a 2 step process:
-
Add the integration dependency.
-
Register it with your configuration.
First, you need to install our SDK. Use the alpha channel for now.
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];
The rest of the steps are the same as before.
The rest of the steps are the same as before.
v3 is an API compatible release, but there are a few additional steps to bundle integrations.
- Add the integration dependencies.
pod `Segment-Bugsnag`
pod `Segment-Branch`
...
- Register them in your configuration when you initialize the SDK.
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
// Add any of your bundled integrations.
config use:[SEGGoogleAnalyticsIntegrationFactory instance];
config use:[BNCBranchIntegrationFactory instance];
...
[SEGAnalytics setupWithConfiguration:config];