Skip to content

Commit c419718

Browse files
authored
Merge pull request #734 from adjust/v501
Version 5.0.1
2 parents 81037ba + 8f90545 commit c419718

File tree

11 files changed

+57
-28
lines changed

11 files changed

+57
-28
lines changed

Adjust.podspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Adjust"
33
s.module_name = "AdjustSdk"
4-
s.version = "5.0.0"
4+
s.version = "5.0.1"
55
s.summary = "This is the iOS SDK of Adjust. You can read more about it at https://adjust.com."
66
s.homepage = "https://github.com/adjust/ios_sdk"
77
s.license = { :type => 'MIT', :file => 'LICENSE' }
@@ -13,7 +13,6 @@ Pod::Spec.new do |s|
1313
s.ios.weak_framework = 'AdSupport'
1414
s.tvos.weak_framework = 'AdSupport'
1515
s.default_subspec = 'Adjust'
16-
s.module_map = 'ModuleMap/module.modulemap'
1716

1817
s.subspec 'Adjust' do |adj|
1918
adj.source_files = 'Adjust/**/*.{h,m}', 'UmbrellaHeaders/sdk/*.{h,m}'

Adjust/Adjust.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Adjust.h
33
// Adjust SDK
44
//
5-
// V5.0.0
5+
// V5.0.1
66
// Created by Christian Wellenbrock (@wellle) on 23rd July 2013.
77
// Copyright (c) 2012-Present Adjust GmbH. All rights reserved.
88
//

Adjust/Internal/ADJUtil.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
static NSRegularExpression *goLinkUniversalLinkRegex = nil;
3232
static NSRegularExpression *excludedDeeplinkRegex = nil;
3333

34-
static NSString * const kClientSdk = @"ios5.0.0";
34+
static NSString * const kClientSdk = @"ios5.0.1";
3535
static NSString * const kDeeplinkParam = @"deep_link=";
3636
static NSString * const kSchemeDelimiter = @"://";
3737
static NSString * const kDefaultScheme = @"AdjustUniversalScheme";

AdjustBridge/AdjustBridge.m

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,8 @@ - (void)handleMessageFromWebview:(NSDictionary<NSString *,id> *)message {
173173
[Adjust addGlobalCallbackParameter:value forKey:key];
174174

175175
} else if ([methodName isEqual:ADJWBRemoveGlobalCallbackParameterMethodName]) {
176-
if (![parameters isKindOfClass:[NSString class]]) {
177-
return;
178-
}
179-
[Adjust removeGlobalCallbackParameterForKey:(NSString *)parameters];
176+
NSString *key = [parameters objectForKey:ADJWBKvKeyKey];
177+
[Adjust removeGlobalCallbackParameterForKey:key];
180178

181179
} else if ([methodName isEqual:ADJWBRemoveGlobalCallbackParametersMethodName]) {
182180
[Adjust removeGlobalCallbackParameters];
@@ -187,10 +185,8 @@ - (void)handleMessageFromWebview:(NSDictionary<NSString *,id> *)message {
187185
[Adjust addGlobalPartnerParameter:value forKey:key];
188186

189187
} else if ([methodName isEqual:ADJWBRemoveGlobalPartnerParameterMethodName]) {
190-
if (![parameters isKindOfClass:[NSString class]]) {
191-
return;
192-
}
193-
[Adjust removeGlobalPartnerParameterForKey:(NSString *)parameters];
188+
NSString *key = [parameters objectForKey:ADJWBKvKeyKey];
189+
[Adjust removeGlobalPartnerParameterForKey:key];
194190

195191
} else if ([methodName isEqual:ADJWBRemoveGlobalPartnerParametersMethodName]) {
196192
[Adjust removeGlobalPartnerParameters];

AdjustBridge/AdjustBridgeRegister.m

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,12 @@ function canSend(okCheck, errReason) {
101101

102102
_handleCallbackFromObjC: function(callback, callbackId) {
103103
window[callbackId] = function(value) {
104-
const parsedValue = JSON.parse(value);
105-
callback(parsedValue);
104+
if(callbackId.includes("adjust_deferredDeeplinkCallback")) {
105+
callback(value);
106+
} else {
107+
const parsedValue = JSON.parse(value);
108+
callback(parsedValue);
109+
}
106110
};
107111
},
108112

@@ -172,7 +176,7 @@ function canSend(okCheck, errReason) {
172176
if (this.sdkPrefix) {
173177
return this.sdkPrefix;
174178
} else {
175-
return 'web-bridge5.0.0';
179+
return 'web-bridge5.0.1';
176180
}
177181
},
178182

@@ -225,13 +229,21 @@ function canSend(okCheck, errReason) {
225229
},
226230

227231
addGlobalCallbackParameter: function(key, value) {
232+
if (typeof key !== 'string' || typeof value !== 'string') {
233+
console.log('Passed key or value is not of string type');
234+
return;
235+
}
228236
this._postMessage("adjust_addGlobalCallbackParameter", {
229237
_key: key, _keyType: typeof key,
230238
_value: value, _valueType: typeof value
231239
});
232240
},
233241

234242
removeGlobalCallbackParameter: function(key) {
243+
if (typeof key !== 'string') {
244+
console.log('Passed key is not of string type');
245+
return;
246+
}
235247
this._postMessage("adjust_removeGlobalCallbackParameter", { _key: key, _keyType: typeof key });
236248
},
237249

@@ -240,13 +252,21 @@ function canSend(okCheck, errReason) {
240252
},
241253

242254
addGlobalPartnerParameter: function(key, value) {
255+
if (typeof key !== 'string' || typeof value !== 'string') {
256+
console.log('Passed key or value is not of string type');
257+
return;
258+
}
243259
this._postMessage("adjust_addGlobalPartnerParameter", {
244260
_key: key, _keyType: typeof key,
245261
_value: value, _valueType: typeof value
246262
});
247263
},
248264

249265
removeGlobalPartnerParameter: function(key) {
266+
if (typeof key !== 'string') {
267+
console.log('Passed key is not of string type');
268+
return;
269+
}
250270
this._postMessage("adjust_removeGlobalPartnerParameter", { _key: key, _keyType: typeof key });
251271
},
252272

@@ -308,12 +328,20 @@ function canSend(okCheck, errReason) {
308328
};
309329

310330
AdjustThirdPartySharing.prototype.addGranularOption = function(partnerName, key, value) {
331+
if (typeof partnerName !== 'string' || typeof key !== 'string' || typeof value !== 'string') {
332+
console.log('Passed partnerName, key or value is not of string type');
333+
return;
334+
}
311335
this.granularOptions.push(partnerName);
312336
this.granularOptions.push(key);
313337
this.granularOptions.push(value);
314338
};
315339

316340
AdjustThirdPartySharing.prototype.addPartnerSharingSetting = function(partnerName, key, value) {
341+
if (typeof partnerName !== 'string' || typeof key !== 'string' || typeof value !== 'boolean') {
342+
console.log('Passed partnerName or key is not of string type or value is not of boolean type');
343+
return;
344+
}
317345
this.partnerSharingSettings.push(partnerName);
318346
this.partnerSharingSettings.push(key);
319347
this.partnerSharingSettings.push(value);

AdjustTests/AdjustTestApp/AdjustTestApp/ATAAdjustCommandExecutor.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,11 @@ - (void)config:(NSDictionary *)parameters {
347347
if ([parameters objectForKey:@"deferredDeeplinkCallback"]) {
348348
NSLog(@"deferredDeeplinkCallback detected");
349349
NSString *shouldOpenDeeplinkS = [parameters objectForKey:@"deferredDeeplinkCallback"][0];
350+
BOOL shouldOpenDeeplink = [shouldOpenDeeplinkS boolValue];
350351
self.adjustDelegate =
351-
[[ATAAdjustDelegateDeferredDeeplink alloc]
352-
initWithTestLibrary:self.testLibrary
353-
extraPath:self.extraPath
354-
andReturnValue:[shouldOpenDeeplinkS boolValue]];
352+
[[ATAAdjustDelegateDeferredDeeplink alloc] initWithTestLibrary:self.testLibrary
353+
extraPath:self.extraPath
354+
andReturnValue:shouldOpenDeeplink];
355355
}
356356

357357
if ([parameters objectForKey:@"skanCallback"]) {

AdjustTests/AdjustTestApp/AdjustTestApp/Delegates/ATAAdjustDelegateDeferredDeeplink.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ - (id)initWithTestLibrary:(ATLTestLibrary *)testLibrary extraPath:(NSString *)ex
3232
return self;
3333
}
3434

35-
- (BOOL)adjustDeeplinkResponse:(nullable NSURL *)deeplink {
35+
- (BOOL)adjustDeferredDeeplinkReceived:(nullable NSURL *)deeplink {
3636
NSLog(@"Deferred deep link callback called!");
3737
NSLog(@"Deep link: %@", deeplink);
3838

AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/AdjustTestApp-WebView.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ <h2><center>Webview</center></h2><br></br>
2323

2424
function startButton() {
2525
console.log('btnStartTestSession');
26-
<!-- TestLibraryBridge.addTestDirectory('event-tracking');-->
27-
<!-- TestLibraryBridge.addTestDirectory('gdpr');-->
28-
<!-- TestLibraryBridge.addTestDirectory('disable-enable');-->
29-
<!-- TestLibraryBridge.addTestDirectory('third-party-sharing');-->
30-
<!--TestLibraryBridge.addTestDirectory('coppa');-->
31-
<!--TestLibraryBridge.addTest('Test_AttributionCallback_reattribution');-->
3226
TestLibraryBridge.startTestSession();
3327
}
3428

AdjustTests/AdjustWebBridgeTestApp/AdjustWebBridgeTestApp/TestLibraryBridge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ AdjustCommandExecutor.prototype.thirdPartySharing = function(params) {
621621
for (var i = 0; i < partnerSharingSettings.length; i = i + 3) {
622622
var partnerName = partnerSharingSettings[i];
623623
var key = partnerSharingSettings[i + 1];
624-
var value = partnerSharingSettings[i + 2];
624+
var value = partnerSharingSettings[i + 2] == 'true';
625625
adjustThirdPartySharing.addPartnerSharingSetting(partnerName, key, value);
626626
}
627627
}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
### Version 5.0.1 (14th September 2024)
2+
#### Fixed
3+
- Fixed `Adjust.modulemap not found` error in certain CocoaPods integration cases.
4+
- Fixed `removeGlobalCallbackParameter` and `removeGlobalPartnerParameter` web bridge methods.
5+
- Fixed deferred deep link callback not getting triggered issue in the web bridge.
6+
7+
#### Changed
8+
- Added validation when passing callback / partner parameters and third party sharing granular options / partner sharing setting parameters in web bridge.
9+
10+
---
11+
112
### Version 5.0.0 (2nd August 2024)
213

314
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
1728
- Fixed occasional crashes when processing resolved deep links.
1829

1930
---
31+
2032
### Version 4.38.3 (23rd May 2024)
2133
#### Fixed
2234
- Added missing `WKNavigationDelegate` methods to the `WebBridge` implementation.

0 commit comments

Comments
 (0)