Skip to content

Commit

Permalink
Merge pull request #484 from adjust/v4240
Browse files Browse the repository at this point in the history
Version 4.24.0
  • Loading branch information
uerceg authored Dec 9, 2020
2 parents 950ba35 + 2d88501 commit 772d1bd
Show file tree
Hide file tree
Showing 58 changed files with 442 additions and 292 deletions.
4 changes: 2 additions & 2 deletions Adjust.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = "Adjust"
s.version = "4.23.2"
s.version = "4.24.0"
s.summary = "This is the iOS SDK of adjust. You can read more about it at http://adjust.com."
s.homepage = "https://github.com/adjust/ios_sdk"
s.license = { :type => 'MIT', :file => 'MIT-LICENSE' }
s.author = { "Christian Wellenbrock" => "[email protected]" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.23.2" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.24.0" }
s.ios.deployment_target = '6.0'
s.tvos.deployment_target = '9.0'
s.framework = 'SystemConfiguration'
Expand Down
11 changes: 9 additions & 2 deletions Adjust.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2267,7 +2267,7 @@
9679920518BBAE2800394606 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1150;
LastUpgradeCheck = 1220;
ORGANIZATIONNAME = "adjust GmbH";
TargetAttributes = {
9615158E1CD2CB2C0022D336 = {
Expand Down Expand Up @@ -2895,6 +2895,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
Expand All @@ -2914,6 +2915,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
Expand Down Expand Up @@ -2947,6 +2949,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -2956,7 +2959,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_DYNAMIC_NO_PIC = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
Expand Down Expand Up @@ -3000,6 +3003,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -3009,6 +3013,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -3032,6 +3037,7 @@
DEAD_CODE_STRIPPING = NO;
DSTROOT = /tmp/Adjust.dst;
ENABLE_BITCODE = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
Expand All @@ -3056,6 +3062,7 @@
DEAD_CODE_STRIPPING = NO;
DSTROOT = /tmp/Adjust.dst;
ENABLE_BITCODE = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
Expand Down
2 changes: 1 addition & 1 deletion Adjust.xcodeproj/xcshareddata/xcschemes/AdjustSdk.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
8 changes: 7 additions & 1 deletion Adjust/ADJActivityHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -2452,6 +2452,7 @@ - (void)registerForSKAdNetworkAttribution {
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
[skAdNetwork performSelector:registerAttributionSelector];
#pragma clang diagnostic pop
[logger verbose:@"Call to SKAdNetwork's registerAppForAdNetworkAttribution method made"];
}
}

Expand Down Expand Up @@ -2488,6 +2489,8 @@ - (void)checkConversionValue:(ADJResponseData *)responseData {

[conversionInvocation setArgument:&intValue atIndex:2];
[conversionInvocation invoke];

[logger verbose:@"Call to SKAdNetwork's updateConversionValue: method made with value %d", intValue];
}
}

Expand All @@ -2514,7 +2517,10 @@ - (instancetype)initWithActivityHandler:(ADJActivityHandler *)activityHandler {
}
// public api
- (BOOL)canGetAttStatus {
return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"14.0");
if (@available(iOS 14.0, tvOS 14.0, *)) {
return YES;
}
return NO;
}

- (BOOL)trackingEnabled {
Expand Down
14 changes: 0 additions & 14 deletions Adjust/ADJActivityState.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,6 @@ - (void)assignUuid:(NSString *)uuid {
self.isPersisted = [ADJKeychain setValue:self.uuid forKeychainKey:@"adjust_uuid" inService:@"deviceInfo"];
}

- (NSString *)generateUniqueKey {
if (appToken == nil) {
return nil;
}

NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
if (bundleIdentifier == nil) {
return nil;
}

NSString *joinedKey = [NSString stringWithFormat:@"%@%@", bundleIdentifier, appToken];
return [joinedKey adjSha1];
}

- (NSString *)description {
return [NSString stringWithFormat:@"ec:%d sc:%d ssc:%d ask:%d sl:%.1f ts:%.1f la:%.1f dt:%@ gdprf:%d dtps:%d att:%d",
self.eventCount, self.sessionCount,
Expand Down
2 changes: 0 additions & 2 deletions Adjust/ADJAdditions/NSString+ADJAdditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

@interface NSString(ADJAdditions)

- (NSString *)adjMd5;
- (NSString *)adjSha1;
- (NSString *)adjSha256;
- (NSString *)adjTrim;
- (NSString *)adjUrlEncode;
Expand Down
27 changes: 0 additions & 27 deletions Adjust/ADJAdditions/NSString+ADJAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,6 @@ - (NSString *)adjRemoveColons {
return [self stringByReplacingOccurrencesOfString:@":" withString:@""];
}

- (NSString *)adjMd5 {
const char *cStr = [self UTF8String];
unsigned char digest[CC_MD5_DIGEST_LENGTH];
CC_MD5(cStr, (CC_LONG)strlen(cStr), digest);

NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
for(int i = 0; i < CC_MD5_DIGEST_LENGTH; i++) {
[output appendFormat:@"%02x", digest[i]];
}
return output;
}

- (NSString *)adjSha1 {
NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding];
uint8_t digest[CC_SHA1_DIGEST_LENGTH];

CC_SHA1(data.bytes, (CC_LONG)data.length, digest);

NSMutableString *output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2];

for (int i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) {
[output appendFormat:@"%02x", digest[i]];
}

return output;
}

- (NSString *)adjSha256 {
const char* str = [self UTF8String];
unsigned char result[CC_SHA256_DIGEST_LENGTH];
Expand Down
2 changes: 1 addition & 1 deletion Adjust/ADJAdditions/UIDevice+ADJAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ - (NSString *)adjDeviceType {
- (NSString *)adjDeviceName {
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *name = malloc(size);
char *name = calloc(1, size);
sysctlbyname("hw.machine", name, &size, NULL, 0);
NSString *machine = [NSString stringWithUTF8String:name];
free(name);
Expand Down
15 changes: 15 additions & 0 deletions Adjust/ADJAttribution.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@
*/
@property (nonatomic, copy, nullable) NSString *adid;

/**
* @brief Cost type.
*/
@property (nonatomic, copy, nullable) NSString *costType;

/**
* @brief Cost amount.
*/
@property (nonatomic, copy, nullable) NSNumber *costAmount;

/**
* @brief Cost currency.
*/
@property (nonatomic, copy, nullable) NSString *costCurrency;

/**
* @brief Make attribution object.
*
Expand Down
Loading

0 comments on commit 772d1bd

Please sign in to comment.