diff --git a/Adjust.podspec b/Adjust.podspec index 5c6826a46..8c5004a8a 100644 --- a/Adjust.podspec +++ b/Adjust.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Adjust" s.module_name = "AdjustSdk" - s.version = "5.0.0" + s.version = "5.0.1" s.summary = "This is the iOS SDK of Adjust. You can read more about it at https://adjust.com." s.homepage = "https://github.com/adjust/ios_sdk" s.license = { :type => 'MIT', :file => 'LICENSE' } @@ -13,7 +13,6 @@ Pod::Spec.new do |s| s.ios.weak_framework = 'AdSupport' s.tvos.weak_framework = 'AdSupport' s.default_subspec = 'Adjust' - s.module_map = 'ModuleMap/module.modulemap' s.subspec 'Adjust' do |adj| adj.source_files = 'Adjust/**/*.{h,m}', 'UmbrellaHeaders/sdk/*.{h,m}' diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 3ada002a9..8b780a6c1 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -2,7 +2,7 @@ // Adjust.h // Adjust SDK // -// V5.0.0 +// V5.0.1 // Created by Christian Wellenbrock (@wellle) on 23rd July 2013. // Copyright (c) 2012-Present Adjust GmbH. All rights reserved. // diff --git a/Adjust/Internal/ADJUtil.m b/Adjust/Internal/ADJUtil.m index 6fa08d107..8b06e2033 100644 --- a/Adjust/Internal/ADJUtil.m +++ b/Adjust/Internal/ADJUtil.m @@ -31,7 +31,7 @@ static NSRegularExpression *goLinkUniversalLinkRegex = nil; static NSRegularExpression *excludedDeeplinkRegex = nil; -static NSString * const kClientSdk = @"ios5.0.0"; +static NSString * const kClientSdk = @"ios5.0.1"; static NSString * const kDeeplinkParam = @"deep_link="; static NSString * const kSchemeDelimiter = @"://"; static NSString * const kDefaultScheme = @"AdjustUniversalScheme"; diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index da8bdd64e..9c9061a6b 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -173,10 +173,8 @@ - (void)handleMessageFromWebview:(NSDictionary *)message { [Adjust addGlobalCallbackParameter:value forKey:key]; } else if ([methodName isEqual:ADJWBRemoveGlobalCallbackParameterMethodName]) { - if (![parameters isKindOfClass:[NSString class]]) { - return; - } - [Adjust removeGlobalCallbackParameterForKey:(NSString *)parameters]; + NSString *key = [parameters objectForKey:ADJWBKvKeyKey]; + [Adjust removeGlobalCallbackParameterForKey:key]; } else if ([methodName isEqual:ADJWBRemoveGlobalCallbackParametersMethodName]) { [Adjust removeGlobalCallbackParameters]; @@ -187,10 +185,8 @@ - (void)handleMessageFromWebview:(NSDictionary *)message { [Adjust addGlobalPartnerParameter:value forKey:key]; } else if ([methodName isEqual:ADJWBRemoveGlobalPartnerParameterMethodName]) { - if (![parameters isKindOfClass:[NSString class]]) { - return; - } - [Adjust removeGlobalPartnerParameterForKey:(NSString *)parameters]; + NSString *key = [parameters objectForKey:ADJWBKvKeyKey]; + [Adjust removeGlobalPartnerParameterForKey:key]; } else if ([methodName isEqual:ADJWBRemoveGlobalPartnerParametersMethodName]) { [Adjust removeGlobalPartnerParameters]; diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index 751b18ec8..36b12eac7 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -101,8 +101,12 @@ function canSend(okCheck, errReason) { _handleCallbackFromObjC: function(callback, callbackId) { window[callbackId] = function(value) { - const parsedValue = JSON.parse(value); - callback(parsedValue); + if(callbackId.includes("adjust_deferredDeeplinkCallback")) { + callback(value); + } else { + const parsedValue = JSON.parse(value); + callback(parsedValue); + } }; }, @@ -172,7 +176,7 @@ function canSend(okCheck, errReason) { if (this.sdkPrefix) { return this.sdkPrefix; } else { - return 'web-bridge5.0.0'; + return 'web-bridge5.0.1'; } }, @@ -225,6 +229,10 @@ function canSend(okCheck, errReason) { }, addGlobalCallbackParameter: function(key, value) { + if (typeof key !== 'string' || typeof value !== 'string') { + console.log('Passed key or value is not of string type'); + return; + } this._postMessage("adjust_addGlobalCallbackParameter", { _key: key, _keyType: typeof key, _value: value, _valueType: typeof value @@ -232,6 +240,10 @@ function canSend(okCheck, errReason) { }, removeGlobalCallbackParameter: function(key) { + if (typeof key !== 'string') { + console.log('Passed key is not of string type'); + return; + } this._postMessage("adjust_removeGlobalCallbackParameter", { _key: key, _keyType: typeof key }); }, @@ -240,6 +252,10 @@ function canSend(okCheck, errReason) { }, addGlobalPartnerParameter: function(key, value) { + if (typeof key !== 'string' || typeof value !== 'string') { + console.log('Passed key or value is not of string type'); + return; + } this._postMessage("adjust_addGlobalPartnerParameter", { _key: key, _keyType: typeof key, _value: value, _valueType: typeof value @@ -247,6 +263,10 @@ function canSend(okCheck, errReason) { }, removeGlobalPartnerParameter: function(key) { + if (typeof key !== 'string') { + console.log('Passed key is not of string type'); + return; + } this._postMessage("adjust_removeGlobalPartnerParameter", { _key: key, _keyType: typeof key }); }, @@ -308,12 +328,20 @@ function canSend(okCheck, errReason) { }; AdjustThirdPartySharing.prototype.addGranularOption = function(partnerName, key, value) { + if (typeof partnerName !== 'string' || typeof key !== 'string' || typeof value !== 'string') { + console.log('Passed partnerName, key or value is not of string type'); + return; + } this.granularOptions.push(partnerName); this.granularOptions.push(key); this.granularOptions.push(value); }; AdjustThirdPartySharing.prototype.addPartnerSharingSetting = function(partnerName, key, value) { + if (typeof partnerName !== 'string' || typeof key !== 'string' || typeof value !== 'boolean') { + console.log('Passed partnerName or key is not of string type or value is not of boolean type'); + return; + } this.partnerSharingSettings.push(partnerName); this.partnerSharingSettings.push(key); this.partnerSharingSettings.push(value); diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m index 3fe5f37e8..d9bec7848 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m @@ -347,11 +347,11 @@ - (void)config:(NSDictionary *)parameters { if ([parameters objectForKey:@"deferredDeeplinkCallback"]) { NSLog(@"deferredDeeplinkCallback detected"); NSString *shouldOpenDeeplinkS = [parameters objectForKey:@"deferredDeeplinkCallback"][0]; + BOOL shouldOpenDeeplink = [shouldOpenDeeplinkS boolValue]; self.adjustDelegate = - [[ATAAdjustDelegateDeferredDeeplink alloc] - initWithTestLibrary:self.testLibrary - extraPath:self.extraPath - andReturnValue:[shouldOpenDeeplinkS boolValue]]; + [[ATAAdjustDelegateDeferredDeeplink alloc] initWithTestLibrary:self.testLibrary + extraPath:self.extraPath + andReturnValue:shouldOpenDeeplink]; } if ([parameters objectForKey:@"skanCallback"]) { diff --git a/AdjustTests/AdjustTestApp/AdjustTestApp/Delegates/ATAAdjustDelegateDeferredDeeplink.m b/AdjustTests/AdjustTestApp/AdjustTestApp/Delegates/ATAAdjustDelegateDeferredDeeplink.m index 43fc29e5a..f1e3343b8 100644 --- a/AdjustTests/AdjustTestApp/AdjustTestApp/Delegates/ATAAdjustDelegateDeferredDeeplink.m +++ b/AdjustTests/AdjustTestApp/AdjustTestApp/Delegates/ATAAdjustDelegateDeferredDeeplink.m @@ -32,7 +32,7 @@ - (id)initWithTestLibrary:(ATLTestLibrary *)testLibrary extraPath:(NSString *)ex return self; } -- (BOOL)adjustDeeplinkResponse:(nullable NSURL *)deeplink { +- (BOOL)adjustDeferredDeeplinkReceived:(nullable NSURL *)deeplink { NSLog(@"Deferred deep link callback called!"); NSLog(@"Deep link: %@", deeplink); diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html index 178601436..7dfbebd34 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html @@ -23,12 +23,6 @@

Webview



function startButton() { console.log('btnStartTestSession'); - - - - - - TestLibraryBridge.startTestSession(); } diff --git a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js index 946104f2a..8397c3f35 100644 --- a/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js +++ b/AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js @@ -621,7 +621,7 @@ AdjustCommandExecutor.prototype.thirdPartySharing = function(params) { for (var i = 0; i < partnerSharingSettings.length; i = i + 3) { var partnerName = partnerSharingSettings[i]; var key = partnerSharingSettings[i + 1]; - var value = partnerSharingSettings[i + 2]; + var value = partnerSharingSettings[i + 2] == 'true'; adjustThirdPartySharing.addPartnerSharingSetting(partnerName, key, value); } } diff --git a/CHANGELOG.md b/CHANGELOG.md index 06630b73f..16c484ebc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +### Version 5.0.1 (14th September 2024) +#### Fixed +- Fixed `Adjust.modulemap not found` error in certain CocoaPods integration cases. +- Fixed `removeGlobalCallbackParameter` and `removeGlobalPartnerParameter` web bridge methods. +- Fixed deferred deep link callback not getting triggered issue in the web bridge. + +#### Changed +- Added validation when passing callback / partner parameters and third party sharing granular options / partner sharing setting parameters in web bridge. + +--- + ### Version 5.0.0 (2nd August 2024) We're excited to release our major new SDK version (v5). Among many internal improvements, our spoofing protection solution is now included out of the box, reinforcing our commitment to accurate, actionable, and fraud-free data. @@ -17,6 +28,7 @@ In case you were using beta version of the SDK v5, please switch to the official - Fixed occasional crashes when processing resolved deep links. --- + ### Version 4.38.3 (23rd May 2024) #### Fixed - Added missing `WKNavigationDelegate` methods to the `WebBridge` implementation. diff --git a/VERSION b/VERSION index 0062ac971..6b244dcd6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.0.0 +5.0.1