Segment v3.4.0 Release Notes
Release Date: 2016-09-01 // over 7 years ago-
- New: Adds a
SEGRequestFactory
API that can be used to configure the HTTP requests made by Segment.
SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"]; // Set a custom request factory which allows you to modify the way the library creates an HTTP request. // In this case, we're transforming the URL to point to our own custom non-Segment host. configuration.requestFactory = ^(NSURL *url) { NSURLComponents \*components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO]; // Replace YOUR_PROXY_HOST with the address of your proxy, e.g. aba64da6.ngrok.io. components.host = @"YOUR_PROXY_HOST"; NSURL \*transformedURL = components.URL; return [NSMutableURLRequest requestWithURL:transformedURL]; }; // Set any other custom configuration options. ... // Initialize the SDK with the configuration. [SEGAnalytics setupWithConfiguration:configuration]
- New: Add method to retrieve anonymous ID.
[[SEGAnalytics sharedAnalytics] getAnonymousId];
Improvement: Store
context
object with every event. This makes it more accurate collecting the context at the time the event was observed, rather than uploaded.Improvement: Automatic screen tracking improvements, specifically in the case when the root view is a
UINavigationController
.Improvement: Don't send
Segment.io: false
in integration dictionary.Improvement: Friendly assert messages.
Fix: Namespace GZIP extension to avoid conflicts.
Fix: Fix assertion in
identify
method.Fix: Static analyzer warnings for reachability implementation.
Fix: Handle case where screen name is empty.
- New: Adds a