Skip to content

Commit

Permalink
Merge pull request #360 from adjust/v4170
Browse files Browse the repository at this point in the history
Version 4.17.0
  • Loading branch information
uerceg authored Dec 4, 2018
2 parents 7c2d055 + b86dbbe commit a7bee4b
Show file tree
Hide file tree
Showing 34 changed files with 445 additions and 397 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.16.0"
s.version = "4.17.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" => "welle@adjust.com" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.16.0" }
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.17.0" }
s.ios.deployment_target = '6.0'
s.tvos.deployment_target = '9.0'
s.framework = 'SystemConfiguration'
Expand Down
2 changes: 2 additions & 0 deletions Adjust.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3063,6 +3063,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
Expand All @@ -3083,6 +3084,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
Expand Down
6 changes: 0 additions & 6 deletions Adjust/ADJReachability.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ typedef enum : NSInteger {
ADJReachableViaWWAN
} ADJNetworkStatus;

#pragma mark IPv6 Support
//Reachability fully support IPv6. For full details, see ReadMe.md.


extern NSString *kADJReachabilityChangedNotification;


@interface ADJReachability : NSObject

Expand Down
19 changes: 1 addition & 18 deletions Adjust/ADJReachability.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@

#import "ADJReachability.h"

#pragma mark IPv6 Support

NSString *kADJReachabilityChangedNotification = @"kNetworkReachabilityChangedNotification";

#pragma mark - Supporting functions

#define kShouldPrintReachabilityFlags 1
Expand All @@ -43,19 +39,6 @@ static void PrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char*
#endif
}


static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info)
{
#pragma unused (target, flags)
NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback");
NSCAssert([(__bridge NSObject*) info isKindOfClass: [ADJReachability class]], @"info was wrong class in ReachabilityCallback");

ADJReachability* noteObject = (__bridge ADJReachability *)info;
// Post a notification to notify the client that the network reachability changed.
[[NSNotificationCenter defaultCenter] postNotificationName: kADJReachabilityChangedNotification object: noteObject];
}


#pragma mark - Reachability implementation

@implementation ADJReachability
Expand Down Expand Up @@ -121,7 +104,7 @@ - (BOOL)startNotifier
BOOL returnValue = NO;
SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};

if (SCNetworkReachabilitySetCallback(_reachabilityRef, ReachabilityCallback, &context))
if (SCNetworkReachabilitySetCallback(_reachabilityRef, NULL, &context))
{
if (SCNetworkReachabilityScheduleWithRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode))
{
Expand Down
2 changes: 2 additions & 0 deletions Adjust/ADJUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ typedef void (^isInactiveInjected)(BOOL);

+ (BOOL)isDeeplinkValid:(NSURL *)url;

+ (NSString *)sdkVersion;

#if !TARGET_OS_TV
+ (NSString *)readMCC;

Expand Down
6 changes: 5 additions & 1 deletion Adjust/ADJUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
static CTTelephonyNetworkInfo *networkInfo = nil;
#endif

static NSString * const kClientSdk = @"ios4.16.0";
static NSString * const kClientSdk = @"ios4.17.0";
static NSString * const kDeeplinkParam = @"deep_link=";
static NSString * const kSchemeDelimiter = @"://";
static NSString * const kDefaultScheme = @"AdjustUniversalScheme";
Expand Down Expand Up @@ -1303,6 +1303,10 @@ + (BOOL)isDeeplinkValid:(NSURL *)url {
return YES;
}

+ (NSString *)sdkVersion {
return kClientSdk;
}

#if !TARGET_OS_TV
+ (NSString *)readMCC {
if (carrier == nil) {
Expand Down
11 changes: 10 additions & 1 deletion Adjust/Adjust.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Adjust.h
// Adjust
//
// V4.16.0
// V4.17.0
// Created by Christian Wellenbrock (wellle) on 23rd July 2013.
// Copyright © 2012-2017 Adjust GmbH. All rights reserved.
//
Expand Down Expand Up @@ -152,6 +152,13 @@ extern NSString * __nonnull const ADJEnvironmentProduction;
*/
+ (nullable ADJAttribution *)attribution;

/**
* @brief Get current Adjust SDK version string.
*
* @return Adjust SDK version string (iosX.Y.Z).
*/
+ (nullable NSString *)sdkVersion;

/**
* @brief Convert a universal link style URL to a deeplink style URL with the corresponding scheme.
*
Expand Down Expand Up @@ -271,6 +278,8 @@ extern NSString * __nonnull const ADJEnvironmentProduction;

- (nullable NSString *)idfa;

- (nullable NSString *)sdkVersion;

- (nullable ADJAttribution *)attribution;

- (nullable NSURL *)convertUniversalLink:(nonnull NSURL *)url scheme:(nonnull NSString *)scheme;
Expand Down
8 changes: 8 additions & 0 deletions Adjust/Adjust.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ + (NSString *)idfa {
return [[Adjust getInstance] idfa];
}

+ (NSString *)sdkVersion {
return [[Adjust getInstance] sdkVersion];
}

+ (NSURL *)convertUniversalLink:(NSURL *)url scheme:(NSString *)scheme {
return [[Adjust getInstance] convertUniversalLink:url scheme:scheme];
}
Expand Down Expand Up @@ -398,6 +402,10 @@ - (NSString *)adid {
return [self.activityHandler adid];
}

- (NSString *)sdkVersion {
return [ADJUtil sdkVersion];
}

- (void)teardown {
if (self.activityHandler == nil) {
[self.logger error:@"Adjust already down or not initialized"];
Expand Down
10 changes: 10 additions & 0 deletions AdjustBridge/AdjustBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,16 @@ - (void)loadWebViewBridge:(id)webView webViewDelegate:(id)webViewDelegate {
[Adjust setOfflineMode:[(NSNumber *)data boolValue]];
}];

[self.bridgeRegister registerHandler:@"adjust_sdkVersion" handler:^(id data, WVJBResponseCallback responseCallback) {
if (responseCallback == nil) {
return;
}

NSString *sdkPrefix = (NSString *)data;
NSString *sdkVersion = [NSString stringWithFormat:@"%@@%@", sdkPrefix, [Adjust sdkVersion]];
responseCallback(sdkVersion);
}];

[self.bridgeRegister registerHandler:@"adjust_idfa" handler:^(id data, WVJBResponseCallback responseCallback) {
if (responseCallback == nil) {
return;
Expand Down
Loading

0 comments on commit a7bee4b

Please sign in to comment.