Skip to content

Commit

Permalink
Merge pull request #734 from adjust/v501
Browse files Browse the repository at this point in the history
Version 5.0.1
  • Loading branch information
uerceg authored Sep 14, 2024
2 parents 81037ba + 8f90545 commit c419718
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 28 deletions.
3 changes: 1 addition & 2 deletions Adjust.podspec
Original file line number Diff line number Diff line change
@@ -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' }
Expand All @@ -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}'
Expand Down
2 changes: 1 addition & 1 deletion Adjust/Adjust.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion Adjust/Internal/ADJUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
12 changes: 4 additions & 8 deletions AdjustBridge/AdjustBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,8 @@ - (void)handleMessageFromWebview:(NSDictionary<NSString *,id> *)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];
Expand All @@ -187,10 +185,8 @@ - (void)handleMessageFromWebview:(NSDictionary<NSString *,id> *)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];
Expand Down
34 changes: 31 additions & 3 deletions AdjustBridge/AdjustBridgeRegister.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
},

Expand Down Expand Up @@ -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';
}
},

Expand Down Expand Up @@ -225,13 +229,21 @@ 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
});
},

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 });
},

Expand All @@ -240,13 +252,21 @@ 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
});
},

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 });
},

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ <h2><center>Webview</center></h2><br></br>

function startButton() {
console.log('btnStartTestSession');
<!-- TestLibraryBridge.addTestDirectory('event-tracking');-->
<!-- TestLibraryBridge.addTestDirectory('gdpr');-->
<!-- TestLibraryBridge.addTestDirectory('disable-enable');-->
<!-- TestLibraryBridge.addTestDirectory('third-party-sharing');-->
<!--TestLibraryBridge.addTestDirectory('coppa');-->
<!--TestLibraryBridge.addTest('Test_AttributionCallback_reattribution');-->
TestLibraryBridge.startTestSession();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0
5.0.1

0 comments on commit c419718

Please sign in to comment.