From 6e5dc12663a96081f375f11441f8d1a4def62aec Mon Sep 17 00:00:00 2001 From: Alan Charles Date: Fri, 9 Jul 2021 15:02:58 -0600 Subject: [PATCH] Prepare for release 4.1.5 --- Analytics.podspec | 2 +- CHANGELOG.md | 5 +++++ Examples/CarthageExample/Cartfile | 2 +- Segment/Classes/SEGAnalytics.m | 22 +++++++++++----------- Segment/Info.plist | 2 +- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Analytics.podspec b/Analytics.podspec index e0aacf089..3256db2a1 100644 --- a/Analytics.podspec +++ b/Analytics.podspec @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 20ab423d6..30ec35fe1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Examples/CarthageExample/Cartfile b/Examples/CarthageExample/Cartfile index 1c0e03b77..688f16db1 100644 --- a/Examples/CarthageExample/Cartfile +++ b/Examples/CarthageExample/Cartfile @@ -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" diff --git a/Segment/Classes/SEGAnalytics.m b/Segment/Classes/SEGAnalytics.m index 118abbe1a..da7e0904e 100644 --- a/Segment/Classes/SEGAnalytics.m +++ b/Segment/Classes/SEGAnalytics.m @@ -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]]; @@ -110,7 +110,7 @@ - (instancetype)initWithConfiguration:(SEGAnalyticsConfiguration *)configuration } } #endif - + [SEGState sharedInstance].configuration = configuration; [[SEGState sharedInstance].context updateStaticContext]; } @@ -229,7 +229,7 @@ - (void)_applicationWillEnterForeground @"version" : currentVersion ?: @"", @"build" : currentBuild ?: @"", }]; - + [[SEGState sharedInstance].context updateStaticContext]; } @@ -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"]; @@ -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 @@ -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, @@ -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 @@ -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. @@ -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 _Nonnull ctx) { ctx.eventType = eventType; ctx.payload = payload; @@ -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]; } diff --git a/Segment/Info.plist b/Segment/Info.plist index 81d941b4c..a58b6f62c 100644 --- a/Segment/Info.plist +++ b/Segment/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.1.4 + 4.1.5 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass