Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ build/
.jira-url
atlassian-ide-plugin.xml

# node 5
package-lock.json

# exceptions
!*adjust-android.jar
!android/libs/adjust*.jar
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
### Version 4.11.6 (28th September 2017)
#### Added
- **[iOS]** Improved iOS 11 support.

#### Changed
- **[iOS]** Removed iOS connection validity checks.
- **[iOS]** Updated native iOS SDK to version **4.11.5**.

#### Native SDKs
- **[iOS]** [[email protected]][ios_sdk_v4.11.5]
- **[AND]** [[email protected]][android_sdk_v4.11.4]

---

### Version 4.11.5 (22nd August 2017)
#### Added
- **[iOS]** Added `Podspec` file for Cocoapods support (thanks to @pietropizzi, @tecbot and @dan-manges).
Expand Down Expand Up @@ -118,6 +132,7 @@
[ios_sdk_v4.11.0]: https://github.com/adjust/ios_sdk/tree/v4.11.0
[ios_sdk_v4.11.3]: https://github.com/adjust/ios_sdk/tree/v4.11.3
[ios_sdk_v4.11.4]: https://github.com/adjust/ios_sdk/tree/v4.11.4
[ios_sdk_v4.11.5]: https://github.com/adjust/ios_sdk/tree/v4.11.5

[android_sdk_v4.10.4]: https://github.com/adjust/android_sdk/tree/v4.10.4
[android_sdk_v4.11.0]: https://github.com/adjust/android_sdk/tree/v4.11.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.11.5
4.11.6
9 changes: 9 additions & 0 deletions example/ios/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* exampleTests */,
83CBBA001A601CBA00E9B192 /* Products */,
9DDA88861F7A61A200C66612 /* Recovered References */,
);
indentWidth = 2;
sourceTree = "<group>";
Expand All @@ -527,6 +528,14 @@
name = Products;
sourceTree = "<group>";
};
9DDA88861F7A61A200C66612 /* Recovered References */ = {
isa = PBXGroup;
children = (
BFC922DBF74D4E2EB5C22FAE /* libAdjustSdk.a */,
);
name = "Recovered References";
sourceTree = "<group>";
};
9DEF02161F33221100B0FA1B /* Products */ = {
isa = PBXGroup;
children = (
Expand Down
2 changes: 1 addition & 1 deletion ext/iOS/sdk
Submodule sdk updated 39 files
+2 −2 Adjust.podspec
+0 −24 Adjust.xcodeproj/project.pbxproj
+27 −65 Adjust/ADJActivityState.m
+0 −19 Adjust/ADJConnectionValidator.h
+0 −88 Adjust/ADJConnectionValidator.m
+2 −2 Adjust/ADJKeychain.h
+36 −40 Adjust/ADJKeychain.m
+0 −3 Adjust/ADJPackageBuilder.m
+0 −18 Adjust/ADJRequestHandler.m
+0 −2 Adjust/ADJResponseData.h
+0 −1 Adjust/ADJResponseData.m
+2 −28 Adjust/ADJUtil.m
+1 −1 Adjust/Adjust.h
+1 −3 AdjustBridge/WebViewJavascriptBridge/WKWebViewJavascriptBridge.m
+1 −1 AdjustBridge/adjust_config.js
+1 −1 AdjustTests/ADJPackageFields.m
+9 −0 CHANGELOG.md
+7 −3 README.md
+1 −1 VERSION
+27 −0 doc/english/batch.md
+1 −1 doc/english/migrate.md
+1 −1 doc/japanese/migrate_ja.md
+1 −1 doc/migrate.md
+0 −6 examples/AdjustExample-Swift/AdjustExample-Swift.xcodeproj/project.pbxproj
+0 −6 examples/AdjustExample-WebView/AdjustExample-WebView.xcodeproj/project.pbxproj
+5 −0 examples/AdjustExample-WebView/AdjustExample-WebView/Assets.xcassets/AppIcon.appiconset/Contents.json
+0 −12 examples/AdjustExample-iOS/AdjustExample-iOS.xcodeproj/project.pbxproj
+38 −48 examples/AdjustExample-iOS/AdjustExample-iOS/Base.lproj/Main.storyboard
+0 −17 examples/AdjustExample-iOS/AdjustExample-iOS/URLRequest.h
+0 −71 examples/AdjustExample-iOS/AdjustExample-iOS/URLRequest.m
+0 −35 examples/AdjustExample-iOS/AdjustExample-iOS/ViewControlleriOS.m
+0 −6 examples/AdjustExample-iWatch/AdjustExample-iWatch.xcodeproj/project.pbxproj
+0 −12 examples/AdjustExample-tvOS/AdjustExample-tvOS.xcodeproj/project.pbxproj
+7 −1 .../AdjustExample-tvOS/AdjustExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json
+12 −0 ...ple-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json
+31 −45 examples/AdjustExample-tvOS/AdjustExample-tvOS/Base.lproj/Main.storyboard
+0 −17 examples/AdjustExample-tvOS/AdjustExample-tvOS/URLRequest.h
+0 −71 examples/AdjustExample-tvOS/AdjustExample-tvOS/URLRequest.m
+0 −38 examples/AdjustExample-tvOS/AdjustExample-tvOS/ViewControllertvOS.m
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var AdjustConfig = function(appToken, environment) {
this.appToken = appToken;
this.environment = environment;

this.sdkPrefix = "react_native4.11.5";
this.sdkPrefix = "react_native4.11.6";
this.logLevel = null;

this.eventBufferingEnabled = null;
Expand Down
92 changes: 27 additions & 65 deletions ios/Adjust/ADJActivityState.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,35 +82,40 @@ - (BOOL)findTransactionId:(NSString *)transactionId {
#pragma mark - Private & helper methods

- (void)assignUuid:(NSString *)uuid {
// First check if there's any UUID written in keychain.
// If yes, use keychain value and flag it.
// If not, use given UUID and store it to keychain.
// If successfully written, flag it.
// If writing failed, don't flat it.
// Small addition as of iOS 10.3:
// Keychain needs to be written in different way in order to persist value between (un)installs.

// Check if device supports new writing method.
// kSecAttrAccessGroupToken available since iOS 10.0.
if (NULL == &kSecAttrAccessGroupToken) {
// This device's iOS version doesn't support new writing method.
[self assignUuidOldMethod:uuid];
return;
} else {
// This device's iOS version supports new writing method.
[self assignUuidNewMethod:uuid];
return;
// 1. Check if UUID is written to keychain in v2 way.
// 1.1 If yes, take stored UUID and send it to v1 check.
// 1.2 If not, take given UUID and send it to v1 check.
// v1 check:
// 2.1 If given UUID is found in v1 way, use it.
// 2.2 If given UUID is not found in v1 way, write it in v1 way and use it.

// First check if we have the key written with app's unique key name.
NSString *uniqueKey = [self generateUniqueKey];
NSString *persistedUuidUnique = [ADJKeychain valueForKeychainKeyV2:uniqueKey service:@"deviceInfo"];

if (persistedUuidUnique != nil) {
// Check if value has UUID format.
if ((bool)[[NSUUID alloc] initWithUUIDString:persistedUuidUnique]) {
[[ADJAdjustFactory logger] verbose:@"Value found and read from the keychain v2 way"];

// If we read the key with v2 way, write it back in v1 way since in iOS 11, that's the only one that it works.
[self assignUuidOldMethod:persistedUuidUnique];
}
}

// At this point, UUID was not persisted in v2 way or if persisted, didn't have proper UUID format.
// Try the v1 way with given UUID.
[self assignUuidOldMethod:uuid];
}

- (void)assignUuidOldMethod:(NSString *)uuid {
NSString *persistedUuid = [ADJKeychain valueForKeychainKeyOld:@"adjust_persisted_uuid" service:@"deviceInfo"];
NSString *persistedUuid = [ADJKeychain valueForKeychainKeyV1:@"adjust_persisted_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 found and read from the keychain old way"];
[[ADJAdjustFactory logger] verbose:@"Value found and read from the keychain v1 way"];

// Value written in keychain seems to have UUID format.
self.uuid = persistedUuid;
Expand All @@ -120,10 +125,10 @@ - (void)assignUuidOldMethod:(NSString *)uuid {
}
}

// At this point, UUID was not persisted or if persisted, didn't have proper UUID format.
// At this point, UUID was not persisted in v1 way 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 and flag if successfully written.
// Try to save that value to the keychain in v1 way and flag if successfully written.
self.uuid = uuid;
self.isPersisted = [ADJKeychain setValue:self.uuid forKeychainKey:@"adjust_persisted_uuid" inService:@"deviceInfo"];
}
Expand All @@ -144,49 +149,6 @@ - (NSString *)generateUniqueKey {
return [joinedKey adjSha1];
}

- (void)assignUuidNewMethod:(NSString *)uuid {
// First check if we have the key written with app's unique key name.
NSString *uniqueKey = [self generateUniqueKey];
NSString *persistedUuidUnique = [ADJKeychain valueForKeychainKeyNew:uniqueKey service:@"deviceInfo"];

if (persistedUuidUnique != nil) {
// Check if value has UUID format.
if ((bool)[[NSUUID alloc] initWithUUIDString:persistedUuidUnique]) {
[[ADJAdjustFactory logger] verbose:@"Value found and read from the keychain new way"];

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

return;
}
}

// At this point, UUID was not persisted with unique key or if persisted, didn't have proper UUID format.

// Check if it's still saved in the keychain with old writing method.
NSString *persistedUuidOld = [ADJKeychain valueForKeychainKeyOld:@"adjust_persisted_uuid" service:@"deviceInfo"];

if (persistedUuidOld != nil) {
// Check if value has UUID format.
if ((bool)[[NSUUID alloc] initWithUUIDString:persistedUuidOld]) {
[[ADJAdjustFactory logger] verbose:@"Value found and read from the keychain old way"];

// Since we have the value in the keychain written with old method, we'll use it to save it with new one.
self.uuid = persistedUuidOld;
} else {
// Since found value in the keychain doesn't have propper UUID format, we'll use passed UUID value.
self.uuid = uuid;
}
} else {
// Since we didn't find anything in the keychain with old method as well, we'll use the passed UUID value.
self.uuid = uuid;
}

// Try to save that value to the keychain and flag if successfully written.
self.isPersisted = [ADJKeychain setValue:self.uuid forKeychainKey:uniqueKey inService:@"deviceInfo"];
}

- (NSString *)description {
return [NSString stringWithFormat:@"ec:%d sc:%d ssc:%d ask:%d sl:%.1f ts:%.1f la:%.1f dt:%@",
self.eventCount, self.sessionCount, self.subsessionCount, self.askingAttribution, self.sessionLength,
Expand Down
19 changes: 0 additions & 19 deletions ios/Adjust/ADJConnectionValidator.h

This file was deleted.

88 changes: 0 additions & 88 deletions ios/Adjust/ADJConnectionValidator.m

This file was deleted.

4 changes: 2 additions & 2 deletions ios/Adjust/ADJKeychain.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

@interface ADJKeychain : NSObject

+ (NSString *)valueForKeychainKeyOld:(NSString *)key service:(NSString *)service;
+ (NSString *)valueForKeychainKeyNew:(NSString *)key service:(NSString *)service;
+ (NSString *)valueForKeychainKeyV1:(NSString *)key service:(NSString *)service;
+ (NSString *)valueForKeychainKeyV2:(NSString *)key service:(NSString *)service;
+ (BOOL)setValue:(NSString *)value forKeychainKey:(NSString *)key inService:(NSString *)service;

@end
Loading