Skip to content

Commit

Permalink
Prepare for release 4.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjcharles committed Jul 9, 2021
1 parent 3a392e9 commit 6e5dc12
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Analytics.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Analytics"
s.module_name = "Segment"
s.version = "4.1.4"
s.version = "4.1.5"
s.summary = "The hassle-free way to add analytics to your iOS app."

s.description = <<-DESC
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Change Log
==========
Version 4.1.5 *(9 July, 2021)*
-----------------------------
* [Fix](https://github.com/segmentio/analytics-ios/pull/999) Add missing nullability identifier
* [Fix](https://github.com/segmentio/analytics-ios/pull/1002) Update Readme with SPM guide

Version 4.1.4 *(3 May, 2021)*
-----------------------------
* [Fix](https://github.com/segmentio/analytics-ios/pull/994) Add missing import in Segment.h for Xcode 12.5
Expand Down
2 changes: 1 addition & 1 deletion Examples/CarthageExample/Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "segmentio/analytics-ios" "4.1.3"
github "segmentio/analytics-ios" "4.1.5"
# Use a local project when debugging
# git "~/Code/segmentio/analytics-ios/" "master"
22 changes: 11 additions & 11 deletions Segment/Classes/SEGAnalytics.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ - (instancetype)initWithConfiguration:(SEGAnalyticsConfiguration *)configuration
// In swift this would not have been OK... But hey.. It's objc
// TODO: Figure out if this is really the best way to do things here.
self.integrationsManager = [[SEGIntegrationsManager alloc] initWithAnalytics:self];

self.runner = [[SEGMiddlewareRunner alloc] initWithMiddleware:
[configuration.sourceMiddleware ?: @[] arrayByAddingObject:self.integrationsManager]];

Expand Down Expand Up @@ -110,7 +110,7 @@ - (instancetype)initWithConfiguration:(SEGAnalyticsConfiguration *)configuration
}
}
#endif

[SEGState sharedInstance].configuration = configuration;
[[SEGState sharedInstance].context updateStaticContext];
}
Expand Down Expand Up @@ -229,7 +229,7 @@ - (void)_applicationWillEnterForeground
@"version" : currentVersion ?: @"",
@"build" : currentBuild ?: @"",
}];

[[SEGState sharedInstance].context updateStaticContext];
}

Expand Down Expand Up @@ -270,7 +270,7 @@ - (void)identify:(NSString *)userId traits:(NSDictionary *)traits
- (void)identify:(NSString *)userId traits:(NSDictionary *)traits options:(NSDictionary *)options
{
NSCAssert2(userId.length > 0 || traits.count > 0, @"either userId (%@) or traits (%@) must be provided.", userId, traits);

// this is done here to match functionality on android where these are inserted BEFORE being spread out amongst destinations.
// it will be set globally later when it runs through SEGIntegrationManager.identify.
NSString *anonId = [options objectForKey:@"anonymousId"];
Expand All @@ -297,7 +297,7 @@ - (void)identify:(NSString *)userId traits:(NSDictionary *)traits options:(NSDic
// merge w/ existing traits and set them.
[existingTraitsCopy addEntriesFromDictionary:traitsCopy];
[SEGState sharedInstance].userInfo.traits = existingTraitsCopy;

[self run:SEGEventTypeIdentify payload:
[[SEGIdentifyPayload alloc] initWithUserId:userId
anonymousId:anonId
Expand Down Expand Up @@ -483,7 +483,7 @@ - (void)openURL:(NSURL *)url options:(NSDictionary *)options
if (!self.oneTimeConfiguration.trackDeepLinks) {
return;
}

NSString *urlString = url.absoluteString;
[SEGState sharedInstance].context.referrer = @{
@"url" : urlString,
Expand Down Expand Up @@ -549,7 +549,7 @@ + (NSString *)version
{
// this has to match the actual version, NOT what's in info.plist
// because Apple only accepts X.X.X as versions in the review process.
return @"4.1.4";
return @"4.1.5";
}

#pragma mark - Helpers
Expand All @@ -559,7 +559,7 @@ - (void)run:(SEGEventType)eventType payload:(SEGPayload *)payload
if (!self.enabled) {
return;
}

if (getAdTrackingEnabled(self.oneTimeConfiguration)) {
// if idfa has changed since last we looked, we need to rebuild
// the static context to pick up the change.
Expand All @@ -569,13 +569,13 @@ - (void)run:(SEGEventType)eventType payload:(SEGPayload *)payload
[[SEGState sharedInstance].context updateStaticContext];
}
}

if (self.oneTimeConfiguration.experimental.nanosecondTimestamps) {
payload.timestamp = iso8601NanoFormattedString([NSDate date]);
} else {
payload.timestamp = iso8601FormattedString([NSDate date]);
}

SEGContext *context = [[[SEGContext alloc] initWithAnalytics:self] modify:^(id<SEGMutableContext> _Nonnull ctx) {
ctx.eventType = eventType;
ctx.payload = payload;
Expand All @@ -587,7 +587,7 @@ - (void)run:(SEGEventType)eventType payload:(SEGPayload *)payload
ctx.payload.anonymousId = [SEGState sharedInstance].userInfo.anonymousId;
}
}];

// Could probably do more things with callback later, but we don't use it yet.
[self.runner run:context callback:nil];
}
Expand Down
2 changes: 1 addition & 1 deletion Segment/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.1.4</string>
<string>4.1.5</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down

0 comments on commit 6e5dc12

Please sign in to comment.