Skip to content

Commit

Permalink
Merge branch 'release/3.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
pyby committed Nov 9, 2017
2 parents e85a5d0 + a319e42 commit d2fbe59
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion Framework/Sources/Core/SRGAnalyticsTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ - (void)trackTagCommanderPageViewWithTitle:(NSString *)title
[fullLabelsDictionary srg_safelySetString:fromPushNotification ? @"true" : @"false" forKey:@"accessed_after_push_notification"];
[fullLabelsDictionary srg_safelySetString:[self pageIdWithTitle:title levels:levels] forKey:@"page_id"];


[levels enumerateObjectsUsingBlock:^(NSString * _Nonnull object, NSUInteger idx, BOOL * _Nonnull stop) {
if (idx > 7) {
*stop = YES;
Expand Down
4 changes: 4 additions & 0 deletions Framework/Sources/Core/UIViewController+SRGAnalytics.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "SRGAnalyticsTracker.h"

#import <libextobjc/libextobjc.h>
#import <objc/runtime.h>

// Associated object keys
Expand Down Expand Up @@ -91,7 +92,10 @@ static void swizzled_viewDidAppear(UIViewController *self, SEL _cmd, BOOL animat
// An anonymous observer (conveniently created with the notification center registration method taking a block as
// parameter) is required. If we simply registered `self` as observer, removal in `-viewWillDisappear:` would also
// remove all other registrations of the view controller for the same notifications!
@weakify(self)
id observer = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillEnterForegroundNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull notification) {
@strongify(self)

[self srg_trackPageViewForced:NO];
}];
objc_setAssociatedObject(self, s_observerKey, observer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
Expand Down
4 changes: 2 additions & 2 deletions SRGAnalytics.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.1;
MARKETING_VERSION = 3.1.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -1252,7 +1252,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.1;
MARKETING_VERSION = 3.1.1;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand Down

0 comments on commit d2fbe59

Please sign in to comment.