Skip to content

Commit

Permalink
Merge pull request #526 from adjust/remove_legacy
Browse files Browse the repository at this point in the history
Version 4.28.0
  • Loading branch information
uerceg authored Apr 1, 2021
2 parents ef12e59 + 573af76 commit 8790a53
Show file tree
Hide file tree
Showing 36 changed files with 44 additions and 622 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.27.1"
s.version = "4.28.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.27.1" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.28.0" }
s.ios.deployment_target = '6.0'
s.tvos.deployment_target = '9.0'
s.framework = 'SystemConfiguration'
Expand Down
40 changes: 0 additions & 40 deletions Adjust.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions Adjust/ADJActivityState.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// Copyright (c) 2013 adjust GmbH. All rights reserved.
//

#import "ADJKeychain.h"
#import "ADJAdjustFactory.h"
#import "ADJActivityState.h"
#import "UIDevice+ADJAdditions.h"
Expand Down Expand Up @@ -84,26 +83,7 @@ - (BOOL)findTransactionId:(NSString *)transactionId {
#pragma mark - Private & helper methods

- (void)assignUuid:(NSString *)uuid {
NSString *persistedUuid = [ADJKeychain valueForKeychainKey:@"adjust_uuid" service:@"deviceInfo"];

// Check if value exists in Keychain.
if (persistedUuid != nil) {
// Check if value has UUID format.
if ((bool)[[NSUUID alloc] initWithUUIDString:persistedUuid]) {
[[ADJAdjustFactory logger] verbose:@"Value read from the keychain"];

// Value written in keychain seems to have UUID format.
self.uuid = persistedUuid;
self.isPersisted = YES;
return;
}
}

// At this point, UUID was not persisted in Keychain or if persisted, didn't have proper UUID format.
// Since we don't have anything in the keychain, we'll use the passed UUID value.
// Try to save that value to the keychain.
self.uuid = uuid;
self.isPersisted = [ADJKeychain setValue:self.uuid forKeychainKey:@"adjust_uuid" inService:@"deviceInfo"];
}

- (NSString *)description {
Expand Down
1 change: 0 additions & 1 deletion Adjust/ADJAdditions/UIDevice+ADJAdditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
- (NSString *)adjDeviceName;
- (NSString *)adjCreateUuid;
- (NSString *)adjVendorId;
- (NSString *)adjDeviceId:(ADJDeviceInfo *)deviceInfo;
- (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_queue_t)queue;
- (NSString *)adjFetchAdServicesAttribution:(NSError **)errorPtr;

Expand Down
105 changes: 0 additions & 105 deletions Adjust/ADJAdditions/UIDevice+ADJAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,111 +214,6 @@ - (NSString *)adjVendorId {
return @"";
}

- (NSString *)adjDeviceId:(ADJDeviceInfo *)deviceInfo {
int languageMaxLength = 16;
NSString *language = deviceInfo.languageCode;
NSString *binaryLanguage = [ADJUtil stringToBinaryString:language];
NSString *binaryLanguageFormatted = [ADJUtil enforceParameterLength:binaryLanguage withMaxlength:languageMaxLength];

int hardwareNameMaxLength = 48;
NSString *hardwareName = deviceInfo.machineModel;
NSString *binaryHardwareName = [ADJUtil stringToBinaryString:hardwareName];
NSString *binaryHardwareNameFormatted = [ADJUtil enforceParameterLength:binaryHardwareName withMaxlength:hardwareNameMaxLength];

NSArray *versionParts = [deviceInfo.systemVersion componentsSeparatedByString:@"."];
int osVersionMajor = [[versionParts objectAtIndex:0] intValue];
int osVersionMinor = [[versionParts objectAtIndex:1] intValue];
int osVersionPatch = [versionParts count] == 3 ? [[versionParts objectAtIndex:2] intValue] : 0;

int osVersionMajorMaxLength = 8;
NSString *binaryOsVersionMajor = [ADJUtil decimalToBinaryString:osVersionMajor];
NSString *binaryOsVersionMajorFormatted = [ADJUtil enforceParameterLength:binaryOsVersionMajor withMaxlength:osVersionMajorMaxLength];

int osVersionMinorMaxLength = 8;
NSString *binaryOsVersionMinor = [ADJUtil decimalToBinaryString:osVersionMinor];
NSString *binaryOsVersionMinorFormatted = [ADJUtil enforceParameterLength:binaryOsVersionMinor withMaxlength:osVersionMinorMaxLength];

int osVersionPatchMaxLength = 8;
NSString *binaryOsVersionPatch = [ADJUtil decimalToBinaryString:osVersionPatch];
NSString *binaryOsVersionPatchFormatted = [ADJUtil enforceParameterLength:binaryOsVersionPatch withMaxlength:osVersionPatchMaxLength];

int mccMaxLength = 24;
NSString *mcc = [ADJUtil readMCC];
NSString *binaryMcc = [ADJUtil stringToBinaryString:mcc];
NSString *binaryMccFormatted = [ADJUtil enforceParameterLength:binaryMcc withMaxlength:mccMaxLength];

int mncMaxLength = 24;
NSString *mnc = [ADJUtil readMNC];
NSString *binaryMnc = [ADJUtil stringToBinaryString:mnc];
NSString *binaryMncFormatted = [ADJUtil enforceParameterLength:binaryMnc withMaxlength:mncMaxLength];

int chargingStatusMaxLength = 8;
NSUInteger chargingStatus = [ADJSystemProfile chargingStatus];
NSString *binaryChargingStatus = [ADJUtil decimalToBinaryString:chargingStatus];
NSString *binaryChargingStatusFormatted = [ADJUtil enforceParameterLength:binaryChargingStatus withMaxlength:chargingStatusMaxLength];

int batteryLevelMaxSize = 8;
NSUInteger batteryLevel = [ADJSystemProfile batteryLevel];
NSString *binaryBatteryLevel = [ADJUtil decimalToBinaryString:batteryLevel];
NSString *binaryBatteryLevelFormatted = [ADJUtil enforceParameterLength:binaryBatteryLevel withMaxlength:batteryLevelMaxSize];

int totalSpaceMaxSize = 24;
NSUInteger totalSpace = [ADJSystemProfile totalDiskSpace];
NSString *binaryTotalSpace = [ADJUtil decimalToBinaryString:totalSpace];
NSString *binaryTotalSpaceFormatted = [ADJUtil enforceParameterLength:binaryTotalSpace withMaxlength:totalSpaceMaxSize];

int freeSpaceMaxSize = 24;
NSUInteger freeSpace = [ADJSystemProfile freeDiskSpace];
NSString *binaryFreeSpace = [ADJUtil decimalToBinaryString:freeSpace];
NSString *binaryFreeSpaceFormatted = [ADJUtil enforceParameterLength:binaryFreeSpace withMaxlength:freeSpaceMaxSize];

int systemUptimeMaxSize = 24;
NSUInteger systemUptime = [ADJSystemProfile systemUptime];
NSString *binarySystemUptime = [ADJUtil decimalToBinaryString:systemUptime];
NSString *binarySystemUptimeFormatted = [ADJUtil enforceParameterLength:binarySystemUptime withMaxlength:systemUptimeMaxSize];

int lastBootTimeMaxSize = 32;
NSUInteger lastBootTime = [ADJSystemProfile lastBootTime];
NSString *binaryLastBootTime = [ADJUtil decimalToBinaryString:lastBootTime];
NSString *binaryLastBootTimeFormatted = [ADJUtil enforceParameterLength:binaryLastBootTime withMaxlength:lastBootTimeMaxSize];

NSString *concatenated = [NSString stringWithFormat:@"%@%@%@%@%@%@%@%@%@%@%@%@%@",
binaryLanguageFormatted,
binaryHardwareNameFormatted,
binaryOsVersionMajorFormatted,
binaryOsVersionMinorFormatted,
binaryOsVersionPatchFormatted,
binaryMccFormatted,
binaryMncFormatted,
binaryChargingStatusFormatted,
binaryBatteryLevelFormatted,
binaryTotalSpaceFormatted,
binaryFreeSpaceFormatted,
binarySystemUptimeFormatted,
binaryLastBootTimeFormatted];

// make sure concatenated string length is multiple of 4
if (concatenated.length % 4 != 0) {
int numberOfBits = concatenated.length % 4;
while (numberOfBits != 4) {
concatenated = [@"0" stringByAppendingString:concatenated];
numberOfBits += 1;
}
}

NSString *mParameter = @"";
for (NSUInteger i = 0; i < concatenated.length; i += 4) {
// get fourplet substring
NSString *fourplet = [concatenated substringWithRange:NSMakeRange(i, 4)];
// convert fourplet to decimal number
long decimalFourplet = strtol([fourplet UTF8String], NULL, 2);
// append hex value of fourplet to final parameter
mParameter = [mParameter stringByAppendingString:[NSString stringWithFormat:@"%lX", decimalFourplet]];
}

return mParameter;
}

- (void)adjCheckForiAd:(ADJActivityHandler *)activityHandler queue:(dispatch_queue_t)queue {
// if no tries for iad v3 left, stop trying
id<ADJLogger> logger = [ADJAdjustFactory logger];
Expand Down
16 changes: 0 additions & 16 deletions Adjust/ADJKeychain.h

This file was deleted.

144 changes: 0 additions & 144 deletions Adjust/ADJKeychain.m

This file was deleted.

Loading

0 comments on commit 8790a53

Please sign in to comment.