diff --git a/Adjust.podspec b/Adjust.podspec index 0d6923bff..8fbc80eba 100644 --- a/Adjust.podspec +++ b/Adjust.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = "Adjust" - s.version = "4.10.2" + s.version = "4.10.3" s.summary = "This is the iOS SDK of adjust. You can read more about it at http://adjust.com." s.homepage = "http://adjust.com" s.license = { :type => 'MIT', :file => 'MIT-LICENSE' } s.author = { "Christian Wellenbrock" => "welle@adjust.com" } - s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.10.2" } + s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.10.3" } s.ios.deployment_target = '6.0' s.tvos.deployment_target = '9.0' s.framework = 'SystemConfiguration' diff --git a/Adjust/ADJActivityHandler.h b/Adjust/ADJActivityHandler.h index 18edf293a..d1f89b779 100644 --- a/Adjust/ADJActivityHandler.h +++ b/Adjust/ADJActivityHandler.h @@ -16,6 +16,8 @@ @property (nonatomic, assign) BOOL background; @property (nonatomic, assign) BOOL delayStart; @property (nonatomic, assign) BOOL updatePackages; +@property (nonatomic, copy) NSData* deviceToken; + - (id)init; - (BOOL)isEnabled; @@ -33,7 +35,8 @@ @protocol ADJActivityHandler - (id)initWithConfig:(ADJConfig *)adjustConfig -sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray; +sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray + deviceToken:(NSData*)deviceToken; - (void)applicationDidBecomeActive; - (void)applicationWillResignActive; @@ -78,7 +81,8 @@ sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray; @interface ADJActivityHandler : NSObject + (id)handlerWithConfig:(ADJConfig *)adjustConfig - sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray; + sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray + deviceToken:(NSData*)deviceToken; - (ADJAttribution*) attribution; - (void)addSessionCallbackParameterI:(ADJActivityHandler *)selfI diff --git a/Adjust/ADJActivityHandler.m b/Adjust/ADJActivityHandler.m index 06d6a96e9..684187a9a 100644 --- a/Adjust/ADJActivityHandler.m +++ b/Adjust/ADJActivityHandler.m @@ -99,13 +99,16 @@ @implementation ADJActivityHandler + (id)handlerWithConfig:(ADJConfig *)adjustConfig sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray + deviceToken:(NSData*)deviceToken { return [[ADJActivityHandler alloc] initWithConfig:adjustConfig - sessionParametersActionsArray:sessionParametersActionsArray]; + sessionParametersActionsArray:sessionParametersActionsArray + deviceToken:deviceToken]; } - (id)initWithConfig:(ADJConfig *)adjustConfig sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray + deviceToken:(NSData*)deviceToken { self = [super init]; if (self == nil) return nil; @@ -153,6 +156,7 @@ - (id)initWithConfig:(ADJConfig *)adjustConfig } else { self.internalState.updatePackages = self.activityState.updatePackages; } + self.internalState.deviceToken = deviceToken; self.internalQueue = dispatch_queue_create(kInternalQueueName, DISPATCH_QUEUE_SERIAL); [ADJUtil launchInQueue:self.internalQueue @@ -638,8 +642,7 @@ - (void)initI:(ADJActivityHandler *)selfI selfI.attributionHandler = [ADJAdjustFactory attributionHandlerForActivityHandler:selfI withAttributionPackage:attributionPackage startsSending:[selfI toSendI:selfI - sdkClickHandlerOnly:NO] - hasAttributionChangedDelegate:selfI.adjustConfig.hasAttributionChangedDelegate]; + sdkClickHandlerOnly:NO]]; selfI.sdkClickHandler = [ADJAdjustFactory sdkClickHandlerWithStartsPaused:[selfI toSendI:selfI sdkClickHandlerOnly:YES]]; @@ -672,6 +675,7 @@ - (void)processSessionI:(ADJActivityHandler *)selfI { if (selfI.activityState == nil) { selfI.activityState = [[ADJActivityState alloc] init]; selfI.activityState.sessionCount = 1; // this is the first session + selfI.activityState.deviceToken = [ADJUtil convertDeviceToken:self.internalState.deviceToken]; [selfI transferSessionPackageI:selfI now:now]; [selfI.activityState resetSessionAttributes:now]; @@ -903,10 +907,6 @@ - (BOOL)updateAttributionI:(ADJActivityHandler *)selfI return NO; } - if (![selfI.adjustConfig hasAttributionChangedDelegate]) { - return NO; - } - if (![selfI.adjustDelegate respondsToSelector:@selector(adjustAttributionChanged:)]) { return NO; } @@ -1008,13 +1008,7 @@ - (BOOL)trySetAttributionDeeplink:(ADJAttribution *)deeplinkAttribution - (void)setDeviceTokenI:(ADJActivityHandler *)selfI deviceToken:(NSData *)deviceToken { - if (deviceToken == nil) { - return; - } - - NSString *deviceTokenString = [deviceToken.description stringByTrimmingCharactersInSet: - [NSCharacterSet characterSetWithCharactersInString:@"<>"]]; - deviceTokenString = [deviceTokenString stringByReplacingOccurrencesOfString:@" " withString:@""]; + NSString *deviceTokenString = [ADJUtil convertDeviceToken:deviceToken]; if (deviceTokenString == nil) { return; @@ -1025,15 +1019,15 @@ - (void)setDeviceTokenI:(ADJActivityHandler *)selfI } double now = [NSDate.date timeIntervalSince1970]; - ADJPackageBuilder * clickBuilder = [[ADJPackageBuilder alloc] + ADJPackageBuilder * infoBuilder = [[ADJPackageBuilder alloc] initWithDeviceInfo:selfI.deviceInfo activityState:selfI.activityState config:selfI.adjustConfig createdAt:now]; - clickBuilder.deviceToken = deviceTokenString; + infoBuilder.deviceToken = deviceTokenString; - ADJActivityPackage * clickPackage = [clickBuilder buildClickPackage:@"push"]; + ADJActivityPackage * clickPackage = [infoBuilder buildInfoPackage:@"push"]; [selfI.sdkClickHandler sendSdkClick:clickPackage]; diff --git a/Adjust/ADJActivityKind.h b/Adjust/ADJActivityKind.h index 24fedfd91..9a4146a4e 100644 --- a/Adjust/ADJActivityKind.h +++ b/Adjust/ADJActivityKind.h @@ -19,6 +19,7 @@ typedef NS_ENUM(int, ADJActivityKind) { // ADJActivityKindRevenue = 3, ADJActivityKindClick = 4, ADJActivityKindAttribution = 5, + ADJActivityKindInfo = 6, }; @interface ADJActivityKindUtil : NSObject diff --git a/Adjust/ADJAdjustFactory.h b/Adjust/ADJAdjustFactory.h index 94e66c601..8889efc3c 100644 --- a/Adjust/ADJAdjustFactory.h +++ b/Adjust/ADJAdjustFactory.h @@ -22,7 +22,8 @@ startsSending:(BOOL)startsSending; + (id)requestHandlerForPackageHandler:(id)packageHandler; + (id)activityHandlerWithConfig:(ADJConfig *)adjustConfig - sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray; + sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray + deviceToken:(NSData*)deviceToken; + (id)sdkClickHandlerWithStartsPaused:(BOOL)startsSending; + (id)logger; @@ -35,8 +36,7 @@ + (id)attributionHandlerForActivityHandler:(id)activityHandler withAttributionPackage:(ADJActivityPackage *) attributionPackage - startsSending:(BOOL)startsSending - hasAttributionChangedDelegate:(BOOL)hasAttributionChangedDelegate; + startsSending:(BOOL)startsSending; + (BOOL)testing; + (NSTimeInterval)maxDelayStart; diff --git a/Adjust/ADJAdjustFactory.m b/Adjust/ADJAdjustFactory.m index 16986d6ac..06a1022cf 100644 --- a/Adjust/ADJAdjustFactory.m +++ b/Adjust/ADJAdjustFactory.m @@ -44,13 +44,17 @@ @implementation ADJAdjustFactory + (id)activityHandlerWithConfig:(ADJConfig *)adjustConfig sessionParametersActionsArray:(NSArray*)sessionParametersActionsArray + deviceToken:(NSData*)deviceToken { if (internalActivityHandler == nil) { return [ADJActivityHandler handlerWithConfig:adjustConfig - sessionParametersActionsArray:sessionParametersActionsArray]; + sessionParametersActionsArray:sessionParametersActionsArray + deviceToken:deviceToken + ]; } return [internalActivityHandler initWithConfig:adjustConfig - sessionParametersActionsArray:sessionParametersActionsArray]; + sessionParametersActionsArray:sessionParametersActionsArray + deviceToken:deviceToken]; } + (id)logger { @@ -106,19 +110,16 @@ + (ADJBackoffStrategy *)sdkClickHandlerBackoffStrategy { + (id)attributionHandlerForActivityHandler:(id)activityHandler withAttributionPackage:(ADJActivityPackage *) attributionPackage startsSending:(BOOL)startsSending - hasAttributionChangedDelegate:(BOOL)hasAttributionChangedDelegate { if (internalAttributionHandler == nil) { return [ADJAttributionHandler handlerWithActivityHandler:activityHandler withAttributionPackage:attributionPackage - startsSending:startsSending - hasAttributionChangedDelegate:hasAttributionChangedDelegate]; + startsSending:startsSending]; } return [internalAttributionHandler initWithActivityHandler:activityHandler withAttributionPackage:attributionPackage - startsSending:startsSending - hasAttributionChangedDelegate:hasAttributionChangedDelegate]; + startsSending:startsSending]; } + (id)sdkClickHandlerWithStartsPaused:(BOOL)startsSending diff --git a/Adjust/ADJAttributionHandler.h b/Adjust/ADJAttributionHandler.h index bc1e767d6..ea73e90cd 100644 --- a/Adjust/ADJAttributionHandler.h +++ b/Adjust/ADJAttributionHandler.h @@ -14,8 +14,7 @@ - (id)initWithActivityHandler:(id) activityHandler withAttributionPackage:(ADJActivityPackage *) attributionPackage - startsSending:(BOOL)startsSending -hasAttributionChangedDelegate:(BOOL)hasAttributionChangedDelegate; + startsSending:(BOOL)startsSending; - (void)checkSessionResponse:(ADJSessionResponseData *)sessionResponseData; @@ -35,7 +34,6 @@ hasAttributionChangedDelegate:(BOOL)hasAttributionChangedDelegate; + (id)handlerWithActivityHandler:(id)activityHandler withAttributionPackage:(ADJActivityPackage *) attributionPackage - startsSending:(BOOL)startsSending - hasAttributionChangedDelegate:(BOOL)hasAttributionChangedDelegate; + startsSending:(BOOL)startsSending; @end diff --git a/Adjust/ADJAttributionHandler.m b/Adjust/ADJAttributionHandler.m index 0fdaf39cb..cde895521 100644 --- a/Adjust/ADJAttributionHandler.m +++ b/Adjust/ADJAttributionHandler.m @@ -24,7 +24,6 @@ @interface ADJAttributionHandler() @property (nonatomic, strong) ADJTimerOnce *attributionTimer; @property (nonatomic, strong) ADJActivityPackage * attributionPackage; @property (nonatomic, assign) BOOL paused; -@property (nonatomic, assign) BOOL hasNeedsResponseDelegate; @end @@ -34,19 +33,16 @@ @implementation ADJAttributionHandler + (id)handlerWithActivityHandler:(id)activityHandler withAttributionPackage:(ADJActivityPackage *) attributionPackage - startsSending:(BOOL)startsSending - hasAttributionChangedDelegate:(BOOL)hasAttributionChangedDelegate; + startsSending:(BOOL)startsSending; { return [[ADJAttributionHandler alloc] initWithActivityHandler:activityHandler withAttributionPackage:attributionPackage - startsSending:startsSending - hasAttributionChangedDelegate:hasAttributionChangedDelegate]; + startsSending:startsSending]; } - (id)initWithActivityHandler:(id) activityHandler withAttributionPackage:(ADJActivityPackage *) attributionPackage - startsSending:(BOOL)startsSending -hasAttributionChangedDelegate:(BOOL)hasAttributionChangedDelegate; + startsSending:(BOOL)startsSending; { self = [super init]; if (self == nil) return nil; @@ -56,7 +52,6 @@ - (id)initWithActivityHandler:(id) activityHandler self.logger = ADJAdjustFactory.logger; self.attributionPackage = attributionPackage; self.paused = !startsSending; - self.hasNeedsResponseDelegate = hasAttributionChangedDelegate; __weak __typeof__(self) weakSelf = self; self.attributionTimer = [ADJTimerOnce timerWithBlock:^{ __typeof__(self) strongSelf = weakSelf; @@ -167,9 +162,6 @@ - (void)checkDeeplinkI:(ADJAttributionHandler*)selfI } - (void)requestAttributionI:(ADJAttributionHandler*)selfI { - if (!selfI.hasNeedsResponseDelegate) { - return; - } if (selfI.paused) { [selfI.logger debug:@"Attribution handler is paused"]; return; diff --git a/Adjust/ADJConfig.h b/Adjust/ADJConfig.h index 1774c80c7..7f5f97155 100644 --- a/Adjust/ADJConfig.h +++ b/Adjust/ADJConfig.h @@ -171,7 +171,6 @@ @property (nonatomic, copy) NSString *userAgent; @property (nonatomic, assign, readonly) BOOL hasResponseDelegate; -@property (nonatomic, assign, readonly) BOOL hasAttributionChangedDelegate; - (BOOL) isValid; @end diff --git a/Adjust/ADJConfig.m b/Adjust/ADJConfig.m index 5c36732b0..8a0e84e3c 100644 --- a/Adjust/ADJConfig.m +++ b/Adjust/ADJConfig.m @@ -60,7 +60,6 @@ - (id)initWithAppToken:(NSString *)appToken _environment = environment; // default values _hasResponseDelegate = NO; - _hasAttributionChangedDelegate = NO; self.eventBufferingEnabled = NO; return self; @@ -92,7 +91,6 @@ - (void)setLogLevel:(ADJLogLevel)logLevel - (void)setDelegate:(NSObject *)delegate { _hasResponseDelegate = NO; - _hasAttributionChangedDelegate = NO; BOOL implementsDeeplinkCallback = NO; if ([ADJUtil isNull:delegate]) { @@ -105,7 +103,6 @@ - (void)setDelegate:(NSObject *)delegate { [self.logger debug:@"Delegate implements adjustAttributionChanged:"]; _hasResponseDelegate = YES; - _hasAttributionChangedDelegate = YES; } if ([delegate respondsToSelector:@selector(adjustEventTrackingSucceeded:)]) { @@ -192,7 +189,6 @@ -(id)copyWithZone:(NSZone *)zone copy.defaultTracker = [self.defaultTracker copyWithZone:zone]; copy.eventBufferingEnabled = self.eventBufferingEnabled; copy->_hasResponseDelegate = self.hasResponseDelegate; - copy->_hasAttributionChangedDelegate = self.hasAttributionChangedDelegate; copy.sendInBackground = self.sendInBackground; copy.delayStart = self.delayStart; copy.userAgent = [self.userAgent copyWithZone:zone]; diff --git a/Adjust/ADJDeviceInfo.h b/Adjust/ADJDeviceInfo.h index 4465eded2..73f6d5fb4 100644 --- a/Adjust/ADJDeviceInfo.h +++ b/Adjust/ADJDeviceInfo.h @@ -27,6 +27,7 @@ @property (nonatomic, copy) NSString *machineModel; @property (nonatomic, copy) NSString *cpuSubtype; @property (nonatomic, copy) NSString *installReceiptBase64; +@property (nonatomic, copy) NSString *osBuild; - (id)initWithSdkPrefix:(NSString *)sdkPrefix; + (ADJDeviceInfo *)deviceInfoWithSdkPrefix:(NSString *)sdkPrefix; diff --git a/Adjust/ADJDeviceInfo.m b/Adjust/ADJDeviceInfo.m index 992ab904c..475ece787 100644 --- a/Adjust/ADJDeviceInfo.m +++ b/Adjust/ADJDeviceInfo.m @@ -43,6 +43,7 @@ - (id)initWithSdkPrefix:(NSString *)sdkPrefix { self.systemVersion = device.systemVersion; self.machineModel = [ADJSystemProfile machineModel]; self.cpuSubtype = [ADJSystemProfile cpuSubtype]; + self.osBuild = [ADJSystemProfile osVersion]; if (sdkPrefix == nil) { self.clientSdk = ADJUtil.clientSdk; diff --git a/Adjust/ADJPackageBuilder.h b/Adjust/ADJPackageBuilder.h index 9378bc9ac..3f472c28d 100644 --- a/Adjust/ADJPackageBuilder.h +++ b/Adjust/ADJPackageBuilder.h @@ -40,6 +40,7 @@ sessionParameters:(ADJSessionParameters *)sessionParameters isInDelay:(BOOL)isInDelay; - (ADJActivityPackage *)buildClickPackage:(NSString *)clickSource; +- (ADJActivityPackage *)buildInfoPackage:(NSString *)infoSource; + (void)parameters:(NSMutableDictionary *)parameters setDictionary:(NSDictionary *)dictionary forKey:(NSString *)key; + (void)parameters:(NSMutableDictionary *)parameters setString:(NSString *)value forKey:(NSString *)key; diff --git a/Adjust/ADJPackageBuilder.m b/Adjust/ADJPackageBuilder.m index a1fe38c14..53d45773a 100644 --- a/Adjust/ADJPackageBuilder.m +++ b/Adjust/ADJPackageBuilder.m @@ -125,7 +125,6 @@ - (ADJActivityPackage *)buildClickPackage:(NSString *)clickSource { } [ADJPackageBuilder parameters:parameters setDictionary:self.iadDetails forKey:@"details"]; [ADJPackageBuilder parameters:parameters setString:self.deeplink forKey:@"deeplink"]; - [ADJPackageBuilder parameters:parameters setString:self.deviceToken forKey:@"push_token"]; ADJActivityPackage *clickPackage = [self defaultActivityPackage]; clickPackage.path = @"/sdk_click"; @@ -136,6 +135,22 @@ - (ADJActivityPackage *)buildClickPackage:(NSString *)clickSource { return clickPackage; } +- (ADJActivityPackage *)buildInfoPackage:(NSString *)infoSource { + NSMutableDictionary *parameters = [self idsParameters]; + + [ADJPackageBuilder parameters:parameters setString:infoSource forKey:@"source"]; + + [ADJPackageBuilder parameters:parameters setString:self.deviceToken forKey:@"push_token"]; + + ADJActivityPackage *infoPackage = [self defaultActivityPackage]; + infoPackage.path = @"/sdk_info"; + infoPackage.activityKind = ADJActivityKindInfo; + infoPackage.suffix = @""; + infoPackage.parameters = parameters; + + return infoPackage; +} + - (ADJActivityPackage *)buildAttributionPackage { NSMutableDictionary *parameters = [self idsParameters]; @@ -208,6 +223,7 @@ - (void) injectDeviceInfo:(ADJDeviceInfo *)deviceInfo [ADJPackageBuilder parameters:parameters setString:deviceInfo.machineModel forKey:@"hardware_name"]; [ADJPackageBuilder parameters:parameters setString:deviceInfo.cpuSubtype forKey:@"cpu_type"]; [ADJPackageBuilder parameters:parameters setString:deviceInfo.installReceiptBase64 forKey:@"install_receipt"]; + [ADJPackageBuilder parameters:parameters setString:deviceInfo.osBuild forKey:@"os_build"]; } - (void)injectConfig:(ADJConfig*) adjustConfig @@ -225,7 +241,7 @@ - (void) injectActivityState:(ADJActivityState *)activityState [ADJPackageBuilder parameters:parameters setInt:activityState.subsessionCount forKey:@"subsession_count"]; [ADJPackageBuilder parameters:parameters setDuration:activityState.sessionLength forKey:@"session_length"]; [ADJPackageBuilder parameters:parameters setDuration:activityState.timeSpent forKey:@"time_spent"]; - [ADJPackageBuilder parameters:parameters setString:activityState.uuid forKey:@"ios_uuid"]; + [ADJPackageBuilder parameters:parameters setString:activityState.deviceToken forKey:@"push_token"]; // Check if UUID was persisted or not. // If yes, assign it to persistent_ios_uuid parameter. @@ -235,7 +251,6 @@ - (void) injectActivityState:(ADJActivityState *)activityState } else { [ADJPackageBuilder parameters:parameters setString:activityState.uuid forKey:@"ios_uuid"]; } - } - (NSString *)eventSuffix:(ADJEvent *)event { diff --git a/Adjust/ADJResponseData.h b/Adjust/ADJResponseData.h index aa785850b..bbd57d7f0 100644 --- a/Adjust/ADJResponseData.h +++ b/Adjust/ADJResponseData.h @@ -63,11 +63,3 @@ @property (nonatomic, strong) NSURL * deeplink; @end - -@interface ADJClickResponseData : ADJResponseData - -@end - -@interface ADJUnknowResponseData : ADJResponseData - -@end diff --git a/Adjust/ADJResponseData.m b/Adjust/ADJResponseData.m index 316389c8b..1de828156 100644 --- a/Adjust/ADJResponseData.m +++ b/Adjust/ADJResponseData.m @@ -23,31 +23,31 @@ - (id)init { } + (id)buildResponseData:(ADJActivityPackage *)activityPackage { + ADJActivityKind activityKind; if (activityPackage == nil) { - return [[ADJUnknowResponseData alloc] init]; + activityKind = ADJActivityKindUnknown; + } else { + activityKind = activityPackage.activityKind; } ADJResponseData * responseData = nil; - switch (activityPackage.activityKind) { + switch (activityKind) { case ADJActivityKindSession: responseData = [[ADJSessionResponseData alloc] init]; break; case ADJActivityKindEvent: responseData = [[ADJEventResponseData alloc] initWithActivityPackage:activityPackage]; break; - case ADJActivityKindClick: - responseData = [[ADJClickResponseData alloc] init]; - break; case ADJActivityKindAttribution: responseData = [[ADJAttributionResponseData alloc] init]; break; default: - responseData = [[ADJUnknowResponseData alloc] init]; + responseData = [[ADJResponseData alloc] init]; break; } - responseData.activityKind = activityPackage.activityKind; + responseData.activityKind = activityKind; return responseData; } @@ -193,38 +193,4 @@ - (NSString *)description { } -@end - -@implementation ADJClickResponseData - -- (id)initWithActivityPackage:(ADJActivityPackage *)activityPackage { - self = [super init]; - if (self == nil) return nil; - - return self; -} - --(id)copyWithZone:(NSZone *)zone -{ - ADJClickResponseData* copy = [super copyWithZone:zone]; - return copy; -} - -@end - -@implementation ADJUnknowResponseData - -- (id)initWithActivityPackage:(ADJActivityPackage *)activityPackage { - self = [super init]; - if (self == nil) return nil; - - return self; -} - --(id)copyWithZone:(NSZone *)zone -{ - ADJUnknowResponseData* copy = [super copyWithZone:zone]; - return copy; -} - @end diff --git a/Adjust/ADJSystemProfile.h b/Adjust/ADJSystemProfile.h index b0779a896..280d2a1b6 100644 --- a/Adjust/ADJSystemProfile.h +++ b/Adjust/ADJSystemProfile.h @@ -33,5 +33,4 @@ + (long long) ramsize; + (NSString*) cpuType; + (NSString*) cpuSubtype; - @end diff --git a/Adjust/ADJSystemProfile.m b/Adjust/ADJSystemProfile.m index c3d4d8b7d..313174751 100644 --- a/Adjust/ADJSystemProfile.m +++ b/Adjust/ADJSystemProfile.m @@ -19,6 +19,8 @@ #import #import #import +#import "ADJAdjustFactory.h" +#import "ADJLogger.h" @implementation ADJSystemProfile @@ -52,7 +54,7 @@ + (NSString*) cpuFamily int error = sysctlbyname("hw.cpufamily", &cpufamily, &length, NULL, 0); if (error != 0) { - NSLog(@"Failed to obtain CPU family (%d)", error); + [ADJAdjustFactory.logger error:@"Failed to obtain CPU family (%d)", error]; return nil; } switch (cpufamily) @@ -167,10 +169,13 @@ + (NSString*) cpuFamily #endif } NSString * unknowCpuFamily = [NSString stringWithFormat:@"Unknown CPU family %d", cpufamily]; - NSLog(@"%@", unknowCpuFamily); + [ADJAdjustFactory.logger warn:@"%@", unknowCpuFamily]; return unknowCpuFamily; } - +/* + original function + operatingSystemVersionString should not be parsed + https://developer.apple.com/reference/foundation/nsprocessinfo/1408730-operatingsystemversionstring?language=objc + (NSString*) osVersion { NSProcessInfo *info = [NSProcessInfo processInfo]; @@ -185,7 +190,7 @@ + (NSString*) osVersion return version; } - +*/ + (int) cpuCount { int error = 0; @@ -194,7 +199,7 @@ + (int) cpuCount error = sysctlbyname("hw.ncpu", &value, &length, NULL, 0); if (error != 0) { - NSLog(@"Failed to obtain CPU count"); + [ADJAdjustFactory.logger error:@"Failed to obtain CPU count (%d)", error]; return 1; } @@ -203,27 +208,63 @@ + (int) cpuCount + (NSString*) machineArch { - return [ADJSystemProfile readSysctlbString:"hw.machinearch" errorLog:@"Failed to obtain machine arch"]; + return [ADJSystemProfile readSysctlbByNameString:"hw.machinearch" errorLog:@"Failed to obtain machine arch"]; } + (NSString*) machineModel { - return [ADJSystemProfile readSysctlbString:"hw.model" errorLog:@"Failed to obtain machine model"]; + return [ADJSystemProfile readSysctlbByNameString:"hw.model" errorLog:@"Failed to obtain machine model"]; } + (NSString*) cpuBrand { - return [ADJSystemProfile readSysctlbString:"machdep.cpu.brand_string" errorLog:@"Failed to obtain CPU brand"]; + return [ADJSystemProfile readSysctlbByNameString:"machdep.cpu.brand_string" errorLog:@"Failed to obtain CPU brand"]; } + (NSString*) cpuFeatures { - return [ADJSystemProfile readSysctlbString:"machdep.cpu.features" errorLog:@"Failed to obtain CPU features"]; + return [ADJSystemProfile readSysctlbByNameString:"machdep.cpu.features" errorLog:@"Failed to obtain CPU features"]; } + (NSString*) cpuVendor { - return [ADJSystemProfile readSysctlbString:"machdep.cpu.vendor" errorLog:@"Failed to obtain CPU vendor"]; + return [ADJSystemProfile readSysctlbByNameString:"machdep.cpu.vendor" errorLog:@"Failed to obtain CPU vendor"]; +} + ++ (NSString*) osVersion +{ + return [ADJSystemProfile readSysctlbByNameString:"kern.osversion" errorLog:@"Failed to obtain OS version"]; +} + ++ (NSString*) readSysctlbByNameString:(const char *)name + errorLog:(NSString*)errorLog +{ + int error = 0; + size_t length = 0; + error = sysctlbyname(name, NULL, &length, NULL, 0); + + if (error != 0) { + [ADJAdjustFactory.logger error:@"%@ (%d)", errorLog, error]; + return nil; + } + + char *p = malloc(sizeof(char) * length); + if (p) { + error = sysctlbyname(name, p, &length, NULL, 0); + } + + if (error != 0) { + [ADJAdjustFactory.logger error:@"%@ (%d)", errorLog, error]; + free(p); + return nil; + } + + NSString * result = [NSString stringWithUTF8String:p]; + + free(p); + + return result; + } + (NSString*) appleLanguage @@ -232,7 +273,7 @@ + (NSString*) appleLanguage NSArray *languages = [defs objectForKey:@"AppleLanguages"]; if ([languages count] == 0) { - NSLog(@"Failed to obtain preferred language"); + [ADJAdjustFactory.logger error:@"Failed to obtain preferred language"]; return nil; } @@ -252,7 +293,7 @@ + (long long) cpuSpeed error = sysctl(mib, 2, &hertz, &size, NULL, 0); if (error) { - NSLog(@"Failed to obtain CPU speed"); + [ADJAdjustFactory.logger error:@"Failed to obtain CPU speed (%d)", error]; return -1; } @@ -271,7 +312,7 @@ + (long long) ramsize error = sysctlbyname("hw.memsize", &value, &length, NULL, 0); if (error) { - NSLog(@"Failed to obtain RAM size"); + [ADJAdjustFactory.logger error:@"Failed to obtain RAM size (%d)", error]; return -1; } const int64_t kBytesPerMebibyte = 1024*1024; @@ -290,7 +331,7 @@ + (NSString*) cpuType error = sysctlbyname("hw.cputype", &cputype, &length, NULL, 0); if (error != 0) { - NSLog(@"Failed to obtain CPU type"); + [ADJAdjustFactory.logger error:@"Failed to obtain CPU type (%d)", error]; return nil; } @@ -301,7 +342,7 @@ + (NSString*) cpuType } NSString * unknowCpuType = [NSString stringWithFormat:@"Unknown CPU type %d", cputype]; - NSLog(@"%@", unknowCpuType); + [ADJAdjustFactory.logger warn:@"%@", unknowCpuType]; return unknowCpuType; } @@ -314,7 +355,7 @@ + (NSString*) cpuSubtype error = sysctlbyname("hw.cputype", &cputype, &length, NULL, 0); if (error != 0) { - NSLog(@"Failed to obtain CPU type"); + [ADJAdjustFactory.logger error:@"Failed to obtain CPU type (%d)", error]; return nil; } @@ -323,7 +364,7 @@ + (NSString*) cpuSubtype error = sysctlbyname("hw.cpusubtype", &cpuSubtype, &length, NULL, 0); if (error != 0) { - NSLog(@"Failed to obtain CPU subtype"); + [ADJAdjustFactory.logger error:@"Failed to obtain CPU subtype (%d)", error]; return nil; } @@ -335,12 +376,10 @@ + (NSString*) cpuSubtype } NSString * unknowCpuSubtype = [NSString stringWithFormat:@"Unknown CPU subtype %d", cpuSubtype]; - NSLog(@"%@", unknowCpuSubtype); + [ADJAdjustFactory.logger warn:@"%@", unknowCpuSubtype]; return unknowCpuSubtype; } - - + (NSString*) readCpuTypeSubtype:(int)cputype readSubType:(BOOL)readSubType cpusubtype:(int)cpusubtype @@ -776,35 +815,4 @@ + (NSString*) readCpuTypeSubtype:(int)cputype return nil; } -+ (NSString*) readSysctlbString:(const char *)name - errorLog:(NSString*)errorLog -{ - int error = 0; - size_t length = 0; - error = sysctlbyname(name, NULL, &length, NULL, 0); - - if (error != 0) { - NSLog(@"%@", errorLog); - return nil; - } - - char *p = malloc(sizeof(char) * length); - if (p) { - error = sysctlbyname(name, p, &length, NULL, 0); - } - - if (error != 0) { - NSLog(@"%@", errorLog); - free(p); - return nil; - } - - NSString * result = [NSString stringWithUTF8String:p]; - - free(p); - - return result; - -} - @end diff --git a/Adjust/ADJUtil.h b/Adjust/ADJUtil.h index 3d521b81d..62cd39e91 100644 --- a/Adjust/ADJUtil.h +++ b/Adjust/ADJUtil.h @@ -85,4 +85,5 @@ responseDataHandler:(void (^) (ADJResponseData * responseData))responseDataHandl + (BOOL)deleteFile:(NSString *)filename; + (void)launchDeepLinkMain:(NSURL *)deepLinkUrl; ++ (NSString*)convertDeviceToken:(NSData*)deviceToken; @end diff --git a/Adjust/ADJUtil.m b/Adjust/ADJUtil.m index 5d89567d6..1cf9372cc 100644 --- a/Adjust/ADJUtil.m +++ b/Adjust/ADJUtil.m @@ -26,7 +26,7 @@ static NSRegularExpression *optionalRedirectRegex = nil; static NSNumberFormatter * secondsNumberFormatter = nil; -static NSString * const kClientSdk = @"ios4.10.2"; +static NSString * const kClientSdk = @"ios4.10.3"; static NSURLSessionConfiguration * urlSessionConfiguration = nil; static NSString * userAgent = nil; static NSString * const kDeeplinkParam = @"deep_link="; @@ -899,4 +899,19 @@ + (void)launchDeepLinkMain:(NSURL *)deepLinkUrl { } } ++ (NSString*)convertDeviceToken:(NSData*)deviceToken { + if (deviceToken == nil) { + return nil;; + } + NSString *deviceTokenString = [deviceToken.description stringByTrimmingCharactersInSet: + [NSCharacterSet characterSetWithCharactersInString:@"<>"]]; + if (deviceTokenString == nil) { + return nil;; + } + + deviceTokenString = [deviceTokenString stringByReplacingOccurrencesOfString:@" " withString:@""]; + + return deviceTokenString; +} + @end diff --git a/Adjust/Adjust.h b/Adjust/Adjust.h index 0e1d6fb4b..4143e7b5a 100644 --- a/Adjust/Adjust.h +++ b/Adjust/Adjust.h @@ -2,6 +2,7 @@ // Adjust.h // Adjust // +// V4.10.3 // Created by Christian Wellenbrock on 2012-07-23. // Copyright (c) 2012-2014 adjust GmbH. All rights reserved. // diff --git a/Adjust/Adjust.m b/Adjust/Adjust.m index bba969b4c..72aabb397 100644 --- a/Adjust/Adjust.m +++ b/Adjust/Adjust.m @@ -25,6 +25,7 @@ @interface Adjust() @property (nonatomic, weak) id logger; @property (nonatomic, strong) id activityHandler; @property (nonatomic, strong) NSMutableArray *sessionParametersActionsArray; +@property (nonatomic, copy) NSData *deviceTokenData; @end @@ -138,7 +139,8 @@ - (void)appDidLaunch:(ADJConfig *)adjustConfig { } self.activityHandler = [ADJAdjustFactory activityHandlerWithConfig:adjustConfig - sessionParametersActionsArray:self.sessionParametersActionsArray]; + sessionParametersActionsArray:self.sessionParametersActionsArray + deviceToken:self.deviceTokenData]; } - (void)trackEvent:(ADJEvent *)event { @@ -172,8 +174,10 @@ - (void)appWillOpenUrl:(NSURL *)url { } - (void)setDeviceToken:(NSData *)deviceToken { - if (![self checkActivityHandler]) return; - [self.activityHandler setDeviceToken:deviceToken]; + self.deviceTokenData = deviceToken; + if (self.activityHandler != nil) { + [self.activityHandler setDeviceToken:deviceToken]; + } } - (void)setOfflineMode:(BOOL)enabled { diff --git a/AdjustBridge/AdjustBridge.h b/AdjustBridge/AdjustBridge.h index ae66381ac..e10420273 100644 --- a/AdjustBridge/AdjustBridge.h +++ b/AdjustBridge/AdjustBridge.h @@ -11,11 +11,15 @@ #import #import "WKWebViewJavascriptBridge.h" +#import "WebViewJavascriptBridge.h" @interface AdjustBridge : NSObject -- (void)loadUIWebViewBridge:(UIWebView *)webView; -- (void)loadWKWebViewBridge:(WKWebView *)webView; +- (void)loadUIWebViewBridge:(WVJB_WEBVIEW_TYPE *)webView; +- (void)loadWKWebViewBridge:(WKWebView *)wkWebView; +- (void)loadUIWebViewBridge:(WVJB_WEBVIEW_TYPE *)webView webViewDelegate:(WVJB_WEBVIEW_DELEGATE_TYPE *)webViewDelegate; +- (void)loadWKWebViewBridge:(WKWebView *)wkWebView wkWebViewDelegate:(id)wkWebViewDelegate; + - (void)sendDeeplinkToWebView:(NSURL *)deeplink; @end diff --git a/AdjustBridge/AdjustBridge.m b/AdjustBridge/AdjustBridge.m index f001d5d38..306fdea52 100644 --- a/AdjustBridge/AdjustBridge.m +++ b/AdjustBridge/AdjustBridge.m @@ -157,23 +157,39 @@ - (BOOL)adjustDeeplinkResponse:(NSURL *)deeplink { #pragma mark - Public methods -- (void)loadUIWebViewBridge:(UIWebView *)uiWebView { +- (void)loadUIWebViewBridge:(WVJB_WEBVIEW_TYPE *)webView { + [self loadUIWebViewBridge:webView webViewDelegate:nil]; +} + +- (void)loadWKWebViewBridge:(WKWebView *)wkWebView { + [self loadWKWebViewBridge:wkWebView wkWebViewDelegate:nil]; +} + +- (void)loadUIWebViewBridge:(WVJB_WEBVIEW_TYPE *)webView + webViewDelegate:(WVJB_WEBVIEW_DELEGATE_TYPE *)webViewDelegate { if (self.bridgeRegister != nil) { // WebViewBridge already loaded. return; } - self.bridgeRegister = [AdjustUIBridgeRegister bridgeRegisterWithUIWebView:uiWebView]; + AdjustUIBridgeRegister *uiBridgeRegister = [AdjustUIBridgeRegister bridgeRegisterWithUIWebView:webView]; + [uiBridgeRegister setWebViewDelegate:webViewDelegate]; + + self.bridgeRegister = uiBridgeRegister; [self loadWebViewBridge]; } -- (void)loadWKWebViewBridge:(WKWebView *)wkWebView { +- (void)loadWKWebViewBridge:(WKWebView *)wkWebView + wkWebViewDelegate:(id)wkWebViewDelegate { if (self.bridgeRegister != nil) { // WebViewBridge already loaded. return; } - self.bridgeRegister = [AdjustWKBridgeRegister bridgeRegisterWithWKWebView:wkWebView]; + AdjustWKBridgeRegister *wkBridgeRegister = [AdjustWKBridgeRegister bridgeRegisterWithWKWebView:wkWebView]; + [wkBridgeRegister setWebViewDelegate:wkWebViewDelegate]; + + self.bridgeRegister = wkBridgeRegister; [self loadWebViewBridge]; } diff --git a/AdjustBridge/AdjustBridgeRegister.h b/AdjustBridge/AdjustBridgeRegister.h index 76a55ca87..f1531109b 100644 --- a/AdjustBridge/AdjustBridgeRegister.h +++ b/AdjustBridge/AdjustBridgeRegister.h @@ -20,11 +20,13 @@ @interface AdjustUIBridgeRegister : NSObject + (id)bridgeRegisterWithUIWebView:(WVJB_WEBVIEW_TYPE *)webView; +- (void)setWebViewDelegate:(WVJB_WEBVIEW_DELEGATE_TYPE *)webViewDelegate; @end @interface AdjustWKBridgeRegister : NSObject + (id)bridgeRegisterWithWKWebView:(WKWebView *)webView; +- (void)setWebViewDelegate:(id)webViewDelegate; @end diff --git a/AdjustBridge/AdjustBridgeRegister.m b/AdjustBridge/AdjustBridgeRegister.m index 069da8a6d..06a52083a 100644 --- a/AdjustBridge/AdjustBridgeRegister.m +++ b/AdjustBridge/AdjustBridgeRegister.m @@ -34,6 +34,10 @@ - (id)initWithUIWebView:(WVJB_WEBVIEW_TYPE *)uiWebView { return self; } +- (void)setWebViewDelegate:(WVJB_WEBVIEW_DELEGATE_TYPE *)webViewDelegate { + [self.uiBridge setWebViewDelegate:webViewDelegate]; +} + - (void)registerHandler:(NSString *)handlerName handler:(WVJBHandler)handler { if ([handlerName hasPrefix:kHandlerPrefix] == NO) { return; @@ -76,6 +80,10 @@ - (id)initWithWKWebView:(WKWebView *)wkWebView { return self; } +- (void)setWebViewDelegate:(id)webViewDelegate { + [self.wkBridge setWebViewDelegate:webViewDelegate]; +} + - (void)registerHandler:(NSString *)handlerName handler:(WVJBHandler)handler { if ([handlerName hasPrefix:kHandlerPrefix] == NO) { return; diff --git a/AdjustBridge/adjust_config.js b/AdjustBridge/adjust_config.js index 44de54ac8..4a2ac0d06 100644 --- a/AdjustBridge/adjust_config.js +++ b/AdjustBridge/adjust_config.js @@ -3,7 +3,7 @@ function AdjustConfig(bridge, appToken, environment) { this.appToken = appToken; this.environment = environment; - this.sdkPrefix = 'web-bridge4.8.0'; + this.sdkPrefix = 'web-bridge4.9.0'; this.logLevel = null; this.defaultTracker = null; diff --git a/AdjustTests/ADJPackageFields.m b/AdjustTests/ADJPackageFields.m index aa4298b8d..f3b5cbe1f 100644 --- a/AdjustTests/ADJPackageFields.m +++ b/AdjustTests/ADJPackageFields.m @@ -16,7 +16,7 @@ - (id) init { // default values self.appToken = @"qwerty123456"; - self.clientSdk = @"ios4.10.2"; + self.clientSdk = @"ios4.10.3"; self.suffix = @""; self.environment = @"sandbox"; diff --git a/CHANGELOG.md b/CHANGELOG.md index ef87bbbfb..29e677829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,37 @@ -### Version 4.10.2 (30th September 2016) +### Version 4.10.3 (18th November 2016) +#### Added +- Added sending of `os_build` parameter. +- Added adjust SDK version information to `Adjust.h` header file. + #### Fixed -- Check if all CPU families are defined +- Replaced `NSLog` in `ADJSystemProfile` with the adjust logger. +- It is no longer necessary to have attribution delegate implemented to get deferred deep links. +- Sending `os_build` or permenent version, not both. -- +### Version 4.10.2 (30th September 2016) +#### Fixed +- Added checks if all CPU families are defined. + +--- + ### Version 4.10.1 (12th September 2016) #### Changed -- Revert deployment target to iOs 6.0 +- Reverted deployment target to `iOS 6.0`. #### Fixed -- Remove NSURLSessionConfiguration with backgroundSessionConfigurationWithIdentifier +- Removed `NSURLSessionConfiguration` with `backgroundSessionConfigurationWithIdentifier`. --- +--- ### Version 4.10.0 (8th September 2016) #### Changed - SDK updated due to an update to the Apple App Store Review Guidelines (https://developer.apple.com/app-store/review/guidelines/ chapter 5.1.1 iv). - Removed functionality of `sendAdWordsRequest` method because of the reason mentioned above. +--- + ### Version 4.9.0 (7th September 2016) #### Added - Added `ADJLogLevelSuppress` to disable all log output messages. @@ -47,7 +61,7 @@ - Replace strong references with weak when possible. - Use background session configuration for `NSURLSession` when the option is set. --- +--- ### Version 4.8.5 (30th August 2016) #### Fixed @@ -528,7 +542,7 @@ ### Version 3.2.1 (9th April 2014) #### Changed -- Dependency to `AdSupport.framework` is now set to `weak`. +- Changed `AdSupport.framework` dependency to `weak`. --- diff --git a/README.md b/README.md index ea25f2eba..06c3b3d22 100644 --- a/README.md +++ b/README.md @@ -87,13 +87,13 @@ If you're using [CocoaPods][cocoapods], you can add the following line to your ` [this step](#sdk-integrate): ```ruby -pod 'Adjust', '~> 4.10.2' +pod 'Adjust', '~> 4.10.3' ``` or: ```ruby -pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.10.2' +pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v4.10.3' ``` -- diff --git a/VERSION b/VERSION index 0216ba384..8540cb180 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.10.2 +4.10.3 diff --git a/doc/english/web_views.md b/doc/english/web_views.md index 603089ac0..41021c027 100644 --- a/doc/english/web_views.md +++ b/doc/english/web_views.md @@ -68,8 +68,13 @@ the `viewDidLoad` or `viewWillAppear` method of your Web View Delegate add the f AdjustBridge *adjustBridge = [[AdjustBridge alloc] init]; [adjustBridge loadUIWebViewBridge:webView]; + // optionally you can add a web view delegate so that you can also capture its events + // [adjustBridge loadUIWebViewBridge:webView webViewDelegate:(UIWebViewDelegate*)self]; + // or with WKWebView: // [adjustBridge loadWKWebViewBridge:webView]; + // optionally you can add a web view delegate so that you can also capture its events + // [adjustBridge loadWKWebViewBridge:webView wkWebViewDelegate:(id)self]; } // ... diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj index 4dab0284d..2a4538ee5 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj @@ -117,11 +117,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0730; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = "adjust GmbH"; TargetAttributes = { 9DF7A9C11CB4ECA600D3591F = { CreatedOnToolsVersion = 7.3; + DevelopmentTeam = QGUGW9AUMK; LastSwiftMigration = 0800; }; }; @@ -203,8 +204,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -248,8 +251,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -268,6 +273,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -277,6 +283,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/AdjustExample-Swift/Adjust", @@ -285,7 +292,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.example; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "AdjustExample-Swift/AdjustExample-Swift-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -298,6 +305,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/AdjustExample-Swift/Adjust", @@ -306,7 +314,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.example; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "AdjustExample-Swift/AdjustExample-Swift-Bridging-Header.h"; SWIFT_VERSION = 3.0; diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk b/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk index b731fe87f..5f70e085c 100644 Binary files a/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk and b/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk differ diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h b/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h index 1774c80c7..7f5f97155 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h +++ b/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h @@ -171,7 +171,6 @@ @property (nonatomic, copy) NSString *userAgent; @property (nonatomic, assign, readonly) BOOL hasResponseDelegate; -@property (nonatomic, assign, readonly) BOOL hasAttributionChangedDelegate; - (BOOL) isValid; @end diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h b/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h index 0e1d6fb4b..4143e7b5a 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h +++ b/examples/AdjustExample-Swift/AdjustExample-Swift/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h @@ -2,6 +2,7 @@ // Adjust.h // Adjust // +// V4.10.3 // Created by Christian Wellenbrock on 2012-07-23. // Copyright (c) 2012-2014 adjust GmbH. All rights reserved. // diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/AppDelegate.swift b/examples/AdjustExample-Swift/AdjustExample-Swift/AppDelegate.swift index 49f0162b0..25139c4ef 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift/AppDelegate.swift +++ b/examples/AdjustExample-Swift/AdjustExample-Swift/AppDelegate.swift @@ -12,8 +12,8 @@ import UIKit class AppDelegate: UIResponder, UIApplicationDelegate, AdjustDelegate { var window: UIWindow? - func application(_application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - let appToken = "{YourAppToken}" + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + let appToken = "2fm9gkqubvpc" let environment = ADJEnvironmentSandbox let adjustConfig = ADJConfig(appToken: appToken, environment: environment) @@ -69,25 +69,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate, AdjustDelegate { return true } - func applicationWillResignActive(_application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } - - func applicationDidEnterBackground(_application: UIApplication) { + + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - - func applicationWillEnterForeground(_application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } - - func applicationDidBecomeActive(_application: UIApplication) { + + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - - func applicationWillTerminate(_application: UIApplication) { + + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } } diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/Base.lproj/Main.storyboard b/examples/AdjustExample-Swift/AdjustExample-Swift/Base.lproj/Main.storyboard index 0fad17876..8bc65e6fb 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift/Base.lproj/Main.storyboard +++ b/examples/AdjustExample-Swift/AdjustExample-Swift/Base.lproj/Main.storyboard @@ -1,9 +1,13 @@ - - + + + + + - + + @@ -15,101 +19,102 @@ - + - + diff --git a/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift b/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift index eefb5d6b9..caeb6c40f 100644 --- a/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift +++ b/examples/AdjustExample-Swift/AdjustExample-Swift/ViewControllerSwift.swift @@ -28,20 +28,20 @@ class ViewControllerSwift: UIViewController { } @IBAction func btnTrackEventSimpleTapped(_sender: UIButton) { - let event = ADJEvent(eventToken: "{YourEventToken}"); + let event = ADJEvent(eventToken: "g3mfiw"); Adjust.trackEvent(event); } @IBAction func btnTrackEventRevenueTapped(_sender: UIButton) { - let event = ADJEvent(eventToken: "{YourEventToken}"); + let event = ADJEvent(eventToken: "a4fd35"); event?.setRevenue(0.99, currency: "EUR"); Adjust.trackEvent(event); } @IBAction func btnTrackEventCallbackTapped(_sender: UIButton) { - let event = ADJEvent(eventToken: "{YourEventToken}"); + let event = ADJEvent(eventToken: "34vgg9"); event?.addCallbackParameter("foo", value: "bar"); event?.addCallbackParameter("key", value: "value"); @@ -49,7 +49,7 @@ class ViewControllerSwift: UIViewController { } @IBAction func btnTrackEventPartnerTapped(_sender: UIButton) { - let event = ADJEvent(eventToken: "{YourEventToken}"); + let event = ADJEvent(eventToken: "w788qs"); event?.addPartnerParameter("foo", value: "bar"); event?.addPartnerParameter("key", value: "value"); @@ -76,22 +76,8 @@ class ViewControllerSwift: UIViewController { let isSDKEnabled = Adjust.isEnabled(); if (isSDKEnabled) { - // let alert = UIAlertController(title: "Is SDK Enabled?", - // message: "SDK is ENABLED!", - // preferredStyle: UIAlertControllerStyle.Alert) - // - // alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil)) - // self.present(alert, animated: true, completion: nil) - NSLog("SDK is enabled!"); } else { - // let alert = UIAlertController(title: "Is SDK Enabled?", - // message: "SDK is DISABLED!", - // preferredStyle: UIAlertControllerStyle.Alert) - // - // alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil)) - // self.present(alert, animated: true, completion: nil) - NSLog("SDK is disabled"); } } diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj b/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj index d6eb2c3df..19390bf42 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj @@ -211,6 +211,7 @@ TargetAttributes = { 9D1082A31CFDAF8E0050568B = { CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = QGUGW9AUMK; }; }; }; @@ -356,6 +357,7 @@ 9D1082BC1CFDAF8E0050568B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/AdjustExample-WebView/Adjust", @@ -363,7 +365,7 @@ INFOPLIST_FILE = "AdjustExample-WebView/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.example; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -372,6 +374,7 @@ 9D1082BD1CFDAF8E0050568B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/AdjustExample-WebView/Adjust", @@ -379,7 +382,7 @@ INFOPLIST_FILE = "AdjustExample-WebView/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.example; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk b/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk index b731fe87f..5f70e085c 100644 Binary files a/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk and b/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk differ diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h b/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h index 1774c80c7..7f5f97155 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h @@ -171,7 +171,6 @@ @property (nonatomic, copy) NSString *userAgent; @property (nonatomic, assign, readonly) BOOL hasResponseDelegate; -@property (nonatomic, assign, readonly) BOOL hasAttributionChangedDelegate; - (BOOL) isValid; @end diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h b/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h index 0e1d6fb4b..4143e7b5a 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h @@ -2,6 +2,7 @@ // Adjust.h // Adjust // +// V4.10.3 // Created by Christian Wellenbrock on 2012-07-23. // Copyright (c) 2012-2014 adjust GmbH. All rights reserved. // diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/AdjustExample-WebView.html b/examples/AdjustExample-WebView/AdjustExample-WebView/AdjustExample-WebView.html index 7555176ef..adb3e702f 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/AdjustExample-WebView.html +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/AdjustExample-WebView.html @@ -39,7 +39,7 @@

Adjust Web View Demo

alert('Deeplink:\n' + data) }) - var adjustConfig = new AdjustConfig(bridge, '{YourAppToken}', AdjustConfig.EnvironmentSandbox) + var adjustConfig = new AdjustConfig(bridge, '2fm9gkqubvpc', AdjustConfig.EnvironmentSandbox) adjustConfig.setLogLevel(AdjustConfig.LogLevelVerbose) adjustConfig.setOpenDeferredDeeplink(true) // Just for test, is true by default. @@ -86,7 +86,7 @@

Adjust Web View Demo

btnTrackSimpleEvent.onclick = function(e) { e.preventDefault() - var adjustEvent = new AdjustEvent('{YourEventToken}') + var adjustEvent = new AdjustEvent('g3mfiw') Adjust.trackEvent(adjustEvent) } @@ -94,7 +94,7 @@

Adjust Web View Demo

btnTrackRevenueEvent.onclick = function(e) { e.preventDefault() - var adjustEvent = new AdjustEvent('{YourAppToken}') + var adjustEvent = new AdjustEvent('a4fd35') adjustEvent.setRevenue(0.01, 'EUR') Adjust.trackEvent(adjustEvent) } @@ -105,7 +105,7 @@

Adjust Web View Demo

e.preventDefault() - var adjustEvent = new AdjustEvent('{YourAppToken}') + var adjustEvent = new AdjustEvent('34vgg9') adjustEvent.addCallbackParameter('key', 'value') adjustEvent.addCallbackParameter('x', 'y') adjustEvent.addCallbackParameter('key', 'lock') @@ -116,7 +116,7 @@

Adjust Web View Demo

btnTrackPartnerEvent.onclick = function(e) { e.preventDefault() - var adjustEvent = new AdjustEvent('{YourAppToken}') + var adjustEvent = new AdjustEvent('w788qs') adjustEvent.addPartnerParameter('foo', 'bar') adjustEvent.addPartnerParameter('x', 'y') adjustEvent.addPartnerParameter('foo', 'foot') diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/Info.plist b/examples/AdjustExample-WebView/AdjustExample-WebView/Info.plist index 2145b2d66..866573564 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/Info.plist +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/Info.plist @@ -22,7 +22,7 @@ CFBundleURLName - com.adjust.example + com.adjust.examples CFBundleURLSchemes adjustExample diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/UIWebViewController.m b/examples/AdjustExample-WebView/AdjustExample-WebView/UIWebViewController.m index 1c84aa524..b0257ea8e 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/UIWebViewController.m +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/UIWebViewController.m @@ -31,7 +31,7 @@ - (void)loadUIWebView { [self.view addSubview:uiWebView]; _adjustBridge = [[AdjustBridge alloc] init]; - [_adjustBridge loadUIWebViewBridge:uiWebView]; + [_adjustBridge loadUIWebViewBridge:uiWebView webViewDelegate:self]; NSString *htmlPath = [[NSBundle mainBundle] pathForResource:@"AdjustExample-WebView" ofType:@"html"]; NSString *appHtml = [NSString stringWithContentsOfFile:htmlPath encoding:NSUTF8StringEncoding error:nil]; diff --git a/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.m b/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.m index d34b670a8..7dc840bbb 100644 --- a/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.m +++ b/examples/AdjustExample-WebView/AdjustExample-WebView/WKWebViewController.m @@ -32,7 +32,7 @@ - (void)loadWKWebView { [self.view addSubview:webView]; _adjustBridge = [[AdjustBridge alloc] init]; - [_adjustBridge loadWKWebViewBridge:webView]; + [_adjustBridge loadWKWebViewBridge:webView wkWebViewDelegate:self]; NSString *htmlPath = [[NSBundle mainBundle] pathForResource:@"AdjustExample-WebView" ofType:@"html"]; NSString *appHtml = [NSString stringWithContentsOfFile:htmlPath encoding:NSUTF8StringEncoding error:nil]; diff --git a/examples/AdjustExample-iOS/AdjustExample-iOS.xcodeproj/project.pbxproj b/examples/AdjustExample-iOS/AdjustExample-iOS.xcodeproj/project.pbxproj index 7ab5536e4..89750f5ec 100644 --- a/examples/AdjustExample-iOS/AdjustExample-iOS.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-iOS/AdjustExample-iOS.xcodeproj/project.pbxproj @@ -40,6 +40,7 @@ 9DC95F251C104CEF00138E4B /* ViewControlleriOS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewControlleriOS.m; sourceTree = ""; }; 9DC95F281C10515300138E4B /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; 9DC95F291C10515300138E4B /* Constants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Constants.m; sourceTree = ""; }; + 9DCA5CF01DD5B6BE000296B2 /* AdjustExample-iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "AdjustExample-iOS.entitlements"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -76,6 +77,7 @@ 9639093E1BCBFCF300A2E8A4 /* AdjustExample-iOS */ = { isa = PBXGroup; children = ( + 9DCA5CF01DD5B6BE000296B2 /* AdjustExample-iOS.entitlements */, 9DC95F281C10515300138E4B /* Constants.h */, 9DC95F291C10515300138E4B /* Constants.m */, 963909421BCBFCF300A2E8A4 /* AppDelegate.h */, @@ -139,11 +141,18 @@ 963909341BCBFCF300A2E8A4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = adjust; TargetAttributes = { 9639093B1BCBFCF300A2E8A4 = { CreatedOnToolsVersion = 7.1; + DevelopmentTeam = QGUGW9AUMK; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.SafariKeychain = { + enabled = 1; + }; + }; }; }; }; @@ -226,8 +235,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -270,8 +281,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -300,7 +313,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = BrandAsset; + CODE_SIGN_ENTITLEMENTS = "AdjustExample-iOS/AdjustExample-iOS.entitlements"; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/AdjustExample-iOS/Adjust", @@ -309,7 +325,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.example; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -319,7 +335,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = BrandAsset; + CODE_SIGN_ENTITLEMENTS = "AdjustExample-iOS/AdjustExample-iOS.entitlements"; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/AdjustExample-iOS/Adjust", @@ -328,7 +347,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.example; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; diff --git a/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk b/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk index b731fe87f..5f70e085c 100644 Binary files a/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk and b/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk differ diff --git a/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h b/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h index 1774c80c7..7f5f97155 100644 --- a/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h +++ b/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h @@ -171,7 +171,6 @@ @property (nonatomic, copy) NSString *userAgent; @property (nonatomic, assign, readonly) BOOL hasResponseDelegate; -@property (nonatomic, assign, readonly) BOOL hasAttributionChangedDelegate; - (BOOL) isValid; @end diff --git a/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h b/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h index 0e1d6fb4b..4143e7b5a 100644 --- a/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h +++ b/examples/AdjustExample-iOS/AdjustExample-iOS/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h @@ -2,6 +2,7 @@ // Adjust.h // Adjust // +// V4.10.3 // Created by Christian Wellenbrock on 2012-07-23. // Copyright (c) 2012-2014 adjust GmbH. All rights reserved. // diff --git a/examples/AdjustExample-iOS/AdjustExample-iOS/AdjustExample-iOS.entitlements b/examples/AdjustExample-iOS/AdjustExample-iOS/AdjustExample-iOS.entitlements new file mode 100644 index 000000000..c7476a337 --- /dev/null +++ b/examples/AdjustExample-iOS/AdjustExample-iOS/AdjustExample-iOS.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.developer.associated-domains + + applinks:f6wc.adj.st + + + diff --git a/examples/AdjustExample-iOS/AdjustExample-iOS/AppDelegate.m b/examples/AdjustExample-iOS/AdjustExample-iOS/AppDelegate.m index 974af2db5..b53fbc191 100644 --- a/examples/AdjustExample-iOS/AdjustExample-iOS/AppDelegate.m +++ b/examples/AdjustExample-iOS/AdjustExample-iOS/AppDelegate.m @@ -34,14 +34,32 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // Send in the background. // [adjustConfig setSendInBackground:YES]; + + // Add session callback parameters. + [Adjust addSessionCallbackParameter:@"sp_foo" value:@"sp_bar"]; + [Adjust addSessionCallbackParameter:@"sp_key" value:@"sp_value"]; + + // Add session partner parameters. + [Adjust addSessionPartnerParameter:@"sp_foo" value:@"sp_bar"]; + [Adjust addSessionPartnerParameter:@"sp_key" value:@"sp_value"]; + + // Remove session callback parameter. + [Adjust removeSessionCallbackParameter:@"sp_key"]; + + // Remove session partner parameter. + [Adjust removeSessionPartnerParameter:@"sp_foo"]; + + // Remove all session callback parameters. + // [Adjust resetSessionCallbackParameters]; + + // Remove all session partner parameters. + // [Adjust resetSessionPartnerParameters]; // Set an attribution delegate. [adjustConfig setDelegate:self]; - // delay the first session of the SDK - //[adjustConfig setDelayStart:7]; - - // set an attribution delegate + // Delay the first session of the SDK. + // [adjustConfig setDelayStart:7]; // Initialise the SDK. [Adjust appDidLaunch:adjustConfig]; @@ -51,12 +69,15 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // Disable the SDK. // [Adjust setEnabled:NO]; - + + // Interrupt delayed start set with setDelayStart: method. + // [Adjust sendFirstPackages]; + return YES; } - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { - NSLog(@"application openURL %@", url); + NSLog(@"openURL method called with URL: %@", url); [Adjust appWillOpenUrl:url]; @@ -65,7 +86,8 @@ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceAppl - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler { if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) { - NSLog(@"application continueUserActivity %@", [userActivity webpageURL]); + NSLog(@"continueUserActivity method called with URL: %@", [userActivity webpageURL]); + [Adjust convertUniversalLink:[userActivity webpageURL] scheme:@"adjustExample"]; [Adjust appWillOpenUrl:[userActivity webpageURL]]; } @@ -73,27 +95,35 @@ - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserAct } - (void)adjustAttributionChanged:(ADJAttribution *)attribution { - NSLog(@"adjust attribution %@", attribution); + NSLog(@"Attribution callback called!"); + NSLog(@"Attribution: %@", attribution); } - (void)adjustEventTrackingSucceeded:(ADJEventSuccess *)eventSuccessResponseData { - NSLog(@"adjust event success %@", eventSuccessResponseData); + NSLog(@"Event success callback called!"); + NSLog(@"Event success data: %@", eventSuccessResponseData); } - (void)adjustEventTrackingFailed:(ADJEventFailure *)eventFailureResponseData { - NSLog(@"adjust event failure %@", eventFailureResponseData); + NSLog(@"Event failure callback called!"); + NSLog(@"Event failure data: %@", eventFailureResponseData); } - (void)adjustSessionTrackingSucceeded:(ADJSessionSuccess *)sessionSuccessResponseData { - NSLog(@"adjust session success %@", sessionSuccessResponseData); + NSLog(@"Session success callback called!"); + NSLog(@"Session success data: %@", sessionSuccessResponseData); } - (void)adjustSessionTrackingFailed:(ADJSessionFailure *)sessionFailureResponseData { - NSLog(@"adjust session failure %@", sessionFailureResponseData); + NSLog(@"Session failure callback called!"); + NSLog(@"Session failure data: %@", sessionFailureResponseData); } // Evaluate deeplink to be launched. - (BOOL)adjustDeeplinkResponse:(NSURL *)deeplink { + NSLog(@"Deferred deep link callback called!"); + NSLog(@"Deferred deep link URL: %@", [deeplink absoluteString]); + return YES; } diff --git a/examples/AdjustExample-iOS/AdjustExample-iOS/Constants.m b/examples/AdjustExample-iOS/AdjustExample-iOS/Constants.m index 2e6cb129f..ddd109aa6 100644 --- a/examples/AdjustExample-iOS/AdjustExample-iOS/Constants.m +++ b/examples/AdjustExample-iOS/AdjustExample-iOS/Constants.m @@ -12,8 +12,8 @@ NSString * const kParamAppToken = @"app_token"; NSString * const kBaseForgetUrl = @"https://app.adjust.com/forget_device"; -NSString * const kAppToken = @"{YourAppToken}"; -NSString * const kEventToken1 = @"{YourEventToken}"; -NSString * const kEventToken2 = @"{YourEventToken}"; -NSString * const kEventToken3 = @"{YourEventToken}"; -NSString * const kEventToken4 = @"{YourEventToken}"; +NSString * const kAppToken = @"2fm9gkqubvpc"; +NSString * const kEventToken1 = @"g3mfiw"; +NSString * const kEventToken2 = @"a4fd35"; +NSString * const kEventToken3 = @"34vgg9"; +NSString * const kEventToken4 = @"w788qs"; diff --git a/examples/AdjustExample-iOS/AdjustExample-iOS/Info.plist b/examples/AdjustExample-iOS/AdjustExample-iOS/Info.plist index 29c46b24c..00117477d 100644 --- a/examples/AdjustExample-iOS/AdjustExample-iOS/Info.plist +++ b/examples/AdjustExample-iOS/AdjustExample-iOS/Info.plist @@ -22,7 +22,7 @@ CFBundleURLName - com.adjust.example + com.adjust.examples CFBundleURLSchemes adjustExample diff --git a/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk b/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk index b731fe87f..5f70e085c 100644 Binary files a/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk and b/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/AdjustSdk differ diff --git a/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h b/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h index 1774c80c7..7f5f97155 100644 --- a/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h +++ b/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/Headers/ADJConfig.h @@ -171,7 +171,6 @@ @property (nonatomic, copy) NSString *userAgent; @property (nonatomic, assign, readonly) BOOL hasResponseDelegate; -@property (nonatomic, assign, readonly) BOOL hasAttributionChangedDelegate; - (BOOL) isValid; @end diff --git a/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h b/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h index 0e1d6fb4b..4143e7b5a 100644 --- a/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h +++ b/examples/AdjustExample-iWatch/AdjustExample-iWatch/Adjust/AdjustSdk.framework/Versions/A/Headers/Adjust.h @@ -2,6 +2,7 @@ // Adjust.h // Adjust // +// V4.10.3 // Created by Christian Wellenbrock on 2012-07-23. // Copyright (c) 2012-2014 adjust GmbH. All rights reserved. // diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj b/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj index 73b8d71d2..510a90ec5 100644 --- a/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj +++ b/examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj @@ -15,9 +15,24 @@ 963909D01BCC0DA600A2E8A4 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963909CF1BCC0DA600A2E8A4 /* AdSupport.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 9DC95F2F1C10596500138E4B /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DC95F2E1C10596500138E4B /* Constants.m */; }; 9DC95F321C105B4C00138E4B /* URLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DC95F311C105B4C00138E4B /* URLRequest.m */; }; - 9DFB060A1D746FB9006D48FC /* AdjustSdkTV.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DFB06091D746FB9006D48FC /* AdjustSdkTV.framework */; }; + 9DEFCE661DD5CCDE006A10E6 /* AdjustSdkTV.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DFB06091D746FB9006D48FC /* AdjustSdkTV.framework */; }; + 9DEFCE671DD5CCDE006A10E6 /* AdjustSdkTV.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9DFB06091D746FB9006D48FC /* AdjustSdkTV.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ +/* Begin PBXCopyFilesBuildPhase section */ + 9DEFCE681DD5CCDE006A10E6 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 9DEFCE671DD5CCDE006A10E6 /* AdjustSdkTV.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 963909B21BCC0D8300A2E8A4 /* AdjustExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AdjustExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 963909B61BCC0D8300A2E8A4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -41,8 +56,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 9DEFCE661DD5CCDE006A10E6 /* AdjustSdkTV.framework in Frameworks */, 963909D01BCC0DA600A2E8A4 /* AdSupport.framework in Frameworks */, - 9DFB060A1D746FB9006D48FC /* AdjustSdkTV.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -112,6 +127,7 @@ 963909AE1BCC0D8300A2E8A4 /* Sources */, 963909AF1BCC0D8300A2E8A4 /* Frameworks */, 963909B01BCC0D8300A2E8A4 /* Resources */, + 9DEFCE681DD5CCDE006A10E6 /* Embed Frameworks */, ); buildRules = ( ); @@ -128,11 +144,12 @@ 963909AA1BCC0D8300A2E8A4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0710; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = adjust; TargetAttributes = { 963909B11BCC0D8300A2E8A4 = { CreatedOnToolsVersion = 7.1; + DevelopmentTeam = QGUGW9AUMK; }; }; }; @@ -206,8 +223,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -250,8 +269,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -281,13 +302,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/AdjustExample-tvOS/Adjust", ); INFOPLIST_FILE = "AdjustExample-tvOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.example; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -299,13 +321,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = QGUGW9AUMK; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/AdjustExample-tvOS/Adjust", ); INFOPLIST_FILE = "AdjustExample-tvOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.example; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; TVOS_DEPLOYMENT_TARGET = 9.0; }; diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/AdjustSdkTV b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/AdjustSdkTV index c5846b216..9f821fa1d 100755 Binary files a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/AdjustSdkTV and b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/AdjustSdkTV differ diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Headers/ADJConfig.h b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Headers/ADJConfig.h index 1774c80c7..7f5f97155 100644 --- a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Headers/ADJConfig.h +++ b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Headers/ADJConfig.h @@ -171,7 +171,6 @@ @property (nonatomic, copy) NSString *userAgent; @property (nonatomic, assign, readonly) BOOL hasResponseDelegate; -@property (nonatomic, assign, readonly) BOOL hasAttributionChangedDelegate; - (BOOL) isValid; @end diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Headers/Adjust.h b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Headers/Adjust.h index 0e1d6fb4b..4143e7b5a 100644 --- a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Headers/Adjust.h +++ b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Headers/Adjust.h @@ -2,6 +2,7 @@ // Adjust.h // Adjust // +// V4.10.3 // Created by Christian Wellenbrock on 2012-07-23. // Copyright (c) 2012-2014 adjust GmbH. All rights reserved. // diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Info.plist b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Info.plist index 7c5ec3d14..c413ff200 100644 Binary files a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Info.plist and b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Adjust/AdjustSdkTV.framework/Info.plist differ diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Constants.m b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Constants.m index 9b1405814..56f26ce53 100644 --- a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Constants.m +++ b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Constants.m @@ -12,8 +12,8 @@ NSString * const kParamAppToken = @"app_token"; NSString * const kBaseForgetUrl = @"https://app.adjust.com/forget_device"; -NSString * const kAppToken = @"{YourAppToken}"; -NSString * const kEventToken1 = @"{YourEventToken}"; -NSString * const kEventToken2 = @"{YourEventToken}"; -NSString * const kEventToken3 = @"{YourEventToken}"; -NSString * const kEventToken4 = @"{YourEventToken}"; \ No newline at end of file +NSString * const kAppToken = @"2fm9gkqubvpc"; +NSString * const kEventToken1 = @"g3mfiw"; +NSString * const kEventToken2 = @"a4fd35"; +NSString * const kEventToken3 = @"34vgg9"; +NSString * const kEventToken4 = @"w788qs"; diff --git a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Info.plist b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Info.plist index e08bbfd4f..025034504 100644 --- a/examples/AdjustExample-tvOS/AdjustExample-tvOS/Info.plist +++ b/examples/AdjustExample-tvOS/AdjustExample-tvOS/Info.plist @@ -22,10 +22,10 @@ CFBundleURLName - com.adjust.AdjustExample-tvOS + com.adjust.examples CFBundleURLSchemes - adjustexampletvos + adjustExample