Skip to content

Commit

Permalink
Merge pull request #76 from attentive-mobile/rsmith/f21-update
Browse files Browse the repository at this point in the history
0.4.3-beta.2 - Boosting logs and preventing retrigger of creative
  • Loading branch information
rsmith-attentive authored Feb 9, 2024
2 parents 28a860f + 0dab3b6 commit 767224d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Sources/ATTNSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ - (void)trigger:(UIView *)theView handler:(ATTNCreativeTriggerCompletionHandler)
_triggerHandler = handler;

NSLog(@"Called showWebView in creativeSDK with domain: %@", _domain);
if (isCreativeOpen) {
NSLog(@"Attempted to trigger creative, but creative is currently open. Taking no action");
return;
}
if (@available(iOS 14, *)) {
NSLog(@"The iOS version is new enough, continuing to show the Attentive creative.");
} else {
Expand Down Expand Up @@ -184,12 +188,11 @@ - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigat

- (void)userContentController:(WKUserContentController *)userContentController
didReceiveScriptMessage:(WKScriptMessage *)message {
NSLog(@"web event message: %@", message.body);
NSLog(@"web event message: %@. isCreativeOpen: %@", message.body, isCreativeOpen ? @"YES" : @"NO");
if ([message.body isEqualToString:@"CLOSE"]) {

[self closeCreative];
} else if ([message.body isEqualToString:@"IMPRESSION"]) {

NSLog(@"Creative opened and generated impression event");
isCreativeOpen = YES;
} else if ([message.body isEqualToString:[NSString stringWithFormat:@"%@ true", visibilityEvent]] && isCreativeOpen == YES) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Internal/ATTNVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

// This should match the Podspec version
// If there's a way to define the version in one place and use it both here and the Podspec then we should do it - I don't know of a way
NSString* const SDK_VERSION = @"0.4.3-beta.1";
NSString* const SDK_VERSION = @"0.4.3-beta.2";

#endif /* ATTNVersion_h */
2 changes: 1 addition & 1 deletion attentive-ios-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'attentive-ios-sdk'
s.version = '0.4.3-beta.1'
s.version = '0.4.3-beta.2'
s.summary = 'Attentive IOS SDK'

# This description is used to generate tags and improve search results.
Expand Down

0 comments on commit 767224d

Please sign in to comment.