From 18de54b7a568892903e7eaa9c64f5c1e8968bef9 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Tue, 22 Nov 2016 19:57:47 -0800 Subject: [PATCH 1/4] Fall back to using Segment integration when we cannot get settings --- Analytics/Classes/SEGAnalytics.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Analytics/Classes/SEGAnalytics.m b/Analytics/Classes/SEGAnalytics.m index f76e95b7a..be96a6723 100644 --- a/Analytics/Classes/SEGAnalytics.m +++ b/Analytics/Classes/SEGAnalytics.m @@ -562,8 +562,16 @@ - (void)refreshSettings self.settingsRequest = [self.httpClient settingsForWriteKey:self.configuration.writeKey completionHandler:^(BOOL success, NSDictionary *settings) { if (success) { [self setCachedSettings:settings]; + } else { + // Hotfix: If settings request fail, fall back to using just Segment integration + // Won't catch situation where this callback never gets called - that will get addressed separately in regular dev + [self setCachedSettings:@{ + @"integrations": @{ + @"Segment.io": @{ @"apiKey": self.configuration.writeKey }, + }, + @"plan": @{ @"track": @{} } + }]; } - self.settingsRequest = nil; }]; } From fdaea8b278c82baf154ea6c22f2b576ed4312111 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Tue, 22 Nov 2016 20:01:06 -0800 Subject: [PATCH 2/4] Increment version to 3.5.4 --- Analytics.podspec | 2 +- Analytics/Classes/SEGAnalytics.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Analytics.podspec b/Analytics.podspec index 780d63c9d..156e70c37 100644 --- a/Analytics.podspec +++ b/Analytics.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Analytics" - s.version = "3.5.3" + s.version = "3.5.4" s.summary = "The hassle-free way to add analytics to your iOS app." s.description = <<-DESC diff --git a/Analytics/Classes/SEGAnalytics.m b/Analytics/Classes/SEGAnalytics.m index be96a6723..f7df068da 100644 --- a/Analytics/Classes/SEGAnalytics.m +++ b/Analytics/Classes/SEGAnalytics.m @@ -591,7 +591,7 @@ + (void)debug:(BOOL)showDebugLogs + (NSString *)version { - return @"3.5.3"; + return @"3.5.4"; } #pragma mark - Private From 495bc3c8080082fdd5957064988d1e1d9c815489 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Tue, 22 Nov 2016 21:40:07 -0800 Subject: [PATCH 3/4] Address a few PR comments --- Analytics/Classes/SEGAnalytics.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Analytics/Classes/SEGAnalytics.m b/Analytics/Classes/SEGAnalytics.m index f7df068da..c26714739 100644 --- a/Analytics/Classes/SEGAnalytics.m +++ b/Analytics/Classes/SEGAnalytics.m @@ -563,7 +563,7 @@ - (void)refreshSettings if (success) { [self setCachedSettings:settings]; } else { - // Hotfix: If settings request fail, fall back to using just Segment integration + // TODO: If settings request fail, fall back to using just Segment integration // Won't catch situation where this callback never gets called - that will get addressed separately in regular dev [self setCachedSettings:@{ @"integrations": @{ @@ -591,7 +591,7 @@ + (void)debug:(BOOL)showDebugLogs + (NSString *)version { - return @"3.5.4"; + return @"3.5.3"; } #pragma mark - Private From edae17c0888f4b37d1027227533f1b0a28369131 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Tue, 22 Nov 2016 21:43:24 -0800 Subject: [PATCH 4/4] Keep release number the same --- Analytics.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Analytics.podspec b/Analytics.podspec index 156e70c37..780d63c9d 100644 --- a/Analytics.podspec +++ b/Analytics.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Analytics" - s.version = "3.5.4" + s.version = "3.5.3" s.summary = "The hassle-free way to add analytics to your iOS app." s.description = <<-DESC