Skip to content

Commit

Permalink
Remove legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
nonelse committed Apr 1, 2021
1 parent ef12e59 commit 9f608db
Show file tree
Hide file tree
Showing 21 changed files with 11 additions and 557 deletions.
8 changes: 0 additions & 8 deletions Adjust.xcodeproj/project.pbxproj
Expand Up @@ -339,8 +339,6 @@
9DF38210260E9B740033F5A1 /* NSNumber+ADJAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DF3820E260E9B740033F5A1 /* NSNumber+ADJAdditions.m */; };
9DF3821C260E9B8D0033F5A1 /* NSNumber+ADJAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DF3821A260E9B8D0033F5A1 /* NSNumber+ADJAdditions.m */; };
9DF3821D260E9B8D0033F5A1 /* NSNumber+ADJAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DF3821B260E9B8D0033F5A1 /* NSNumber+ADJAdditions.h */; };
9DF9C8B31D6ED228008E362F /* ADJKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DF9C8B11D6ED228008E362F /* ADJKeychain.h */; };
9DF9C8B41D6ED228008E362F /* ADJKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DF9C8B21D6ED228008E362F /* ADJKeychain.m */; };
9DF9C9091D6F3CA5008E362F /* ADJActivityHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DF9C8C91D6F3CA5008E362F /* ADJActivityHandler.h */; };
9DF9C90A1D6F3CA5008E362F /* ADJActivityHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DF9C8CA1D6F3CA5008E362F /* ADJActivityHandler.m */; };
9DF9C90B1D6F3CA5008E362F /* ADJActivityKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DF9C8CB1D6F3CA5008E362F /* ADJActivityKind.h */; };
Expand Down Expand Up @@ -974,8 +972,6 @@
9DF3820E260E9B740033F5A1 /* NSNumber+ADJAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+ADJAdditions.m"; sourceTree = "<group>"; };
9DF3821A260E9B8D0033F5A1 /* NSNumber+ADJAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+ADJAdditions.m"; sourceTree = "<group>"; };
9DF3821B260E9B8D0033F5A1 /* NSNumber+ADJAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+ADJAdditions.h"; sourceTree = "<group>"; };
9DF9C8B11D6ED228008E362F /* ADJKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJKeychain.h; sourceTree = "<group>"; };
9DF9C8B21D6ED228008E362F /* ADJKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJKeychain.m; sourceTree = "<group>"; };
9DF9C8C91D6F3CA5008E362F /* ADJActivityHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJActivityHandler.h; sourceTree = "<group>"; };
9DF9C8CA1D6F3CA5008E362F /* ADJActivityHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADJActivityHandler.m; sourceTree = "<group>"; };
9DF9C8CB1D6F3CA5008E362F /* ADJActivityKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADJActivityKind.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1408,8 +1404,6 @@
965B7F2F1CC78F6600098639 /* ADJBackoffStrategy.m */,
96164D701CC8FA73009431AB /* ADJSdkClickHandler.h */,
96164D711CC8FA73009431AB /* ADJSdkClickHandler.m */,
9DF9C8B11D6ED228008E362F /* ADJKeychain.h */,
9DF9C8B21D6ED228008E362F /* ADJKeychain.m */,
96B6710E1D788EEC0090A023 /* ADJSessionParameters.h */,
96B6710F1D788EEC0090A023 /* ADJSessionParameters.m */,
6FCC84F81F278CF300D6A0ED /* ADJReachability.h */,
Expand Down Expand Up @@ -1995,7 +1989,6 @@
96164D8C1CCA4DEA009431AB /* ADJSystemProfile.h in Headers */,
965B7F301CC78F6600098639 /* ADJBackoffStrategy.h in Headers */,
96164D721CC8FA73009431AB /* ADJSdkClickHandler.h in Headers */,
9DF9C8B31D6ED228008E362F /* ADJKeychain.h in Headers */,
96B671101D788EEC0090A023 /* ADJSessionParameters.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -2687,7 +2680,6 @@
96164D8D1CCA4DEA009431AB /* ADJSystemProfile.m in Sources */,
965B7F311CC78F6600098639 /* ADJBackoffStrategy.m in Sources */,
96164D731CC8FA73009431AB /* ADJSdkClickHandler.m in Sources */,
9DF9C8B41D6ED228008E362F /* ADJKeychain.m in Sources */,
96B671111D788EEC0090A023 /* ADJSessionParameters.m in Sources */,
9DD0E9AF1F44690B00B2A759 /* ADJUserDefaults.m in Sources */,
9DF381BC260E990B0033F5A1 /* NSNumber+ADJAdditions.m in Sources */,
Expand Down
20 changes: 0 additions & 20 deletions Adjust/ADJActivityState.m
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
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
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.

0 comments on commit 9f608db

Please sign in to comment.