Skip to content

Commit

Permalink
Merge pull request #136 from adjust/v4141
Browse files Browse the repository at this point in the history
Version 4.14.1
  • Loading branch information
uerceg authored Jun 18, 2018
2 parents 80dd9c0 + cdb817a commit f8c6246
Show file tree
Hide file tree
Showing 73 changed files with 372 additions and 81 deletions.
30 changes: 21 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
[submodule "ext/Android/sdk"]
path = ext/Android/sdk
[submodule "ext/android/sdk"]
path = ext/android/sdk
url = [email protected]:adjust/android_sdk.git
branch = master
[submodule "ext/iOS/sdk"]
path = ext/iOS/sdk
branch = master
[submodule "ext/ios/sdk"]
path = ext/ios/sdk
url = [email protected]:adjust/ios_sdk.git
branch = master
[submodule "ext/Windows/sdk"]
path = ext/Windows/sdk
branch = master
[submodule "ext/windows/sdk"]
path = ext/windows/sdk
url = [email protected]:adjust/windows_sdk.git
branch = master
branch = master
[submodule "ext/android/sdk-dev"]
path = ext/android/sdk-dev
url = [email protected]:adjust/android_sdk_dev.git
branch = master
[submodule "ext/ios/sdk-dev"]
path = ext/ios/sdk-dev
url = [email protected]:adjust/ios_sdk_dev.git
branch = master
[submodule "ext/windows/sdk-dev"]
path = ext/windows/sdk-dev
url = [email protected]:adjust/windows_sdk_dev.git
branch = master
2 changes: 1 addition & 1 deletion Assets/Adjust/Android/AdjustAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace com.adjust.sdk
#if UNITY_ANDROID
public class AdjustAndroid
{
private const string sdkPrefix = "unity4.14.0";
private const string sdkPrefix = "unity4.14.1";
private static bool launchDeferredDeeplink = true;

private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
Expand Down
6 changes: 3 additions & 3 deletions Assets/Adjust/Test/TestApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ public class TestApp : MonoBehaviour
public static readonly string TAG = "[TestApp]";

#if (UNITY_WSA || UNITY_WP8)
public const string CLIENT_SDK = "unity4.14.0@wuap4.14.0";
public const string CLIENT_SDK = "unity4.14.1@wuap4.14.0";
private const string PORT = ":8080";
private const string PROTOCOL = "http://";
private const string BASE_URL = PROTOCOL + "localhost" + PORT; // Windows simulator
#elif UNITY_ANDROID
public const string CLIENT_SDK = "unity4.14.0@android4.14.0";
public const string CLIENT_SDK = "unity4.14.1@android4.14.0";
private const string PORT = ":8443";
private const string PROTOCOL = "https://";
private const string BASE_URL = PROTOCOL + "10.0.2.2" + PORT; // Android simulator
#elif UNITY_IOS
public const string CLIENT_SDK = "unity4.14.0@ios4.14.0";
public const string CLIENT_SDK = "unity4.14.1@ios4.14.1";
private const string PORT = ":8080";
private const string PROTOCOL = "http://";
private const string BASE_URL = PROTOCOL + "127.0.0.1" + PORT; // iOS simulator
Expand Down
2 changes: 1 addition & 1 deletion Assets/Adjust/Windows/AdjustWindows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace com.adjust.sdk
{
public class AdjustWindows
{
private const string sdkPrefix = "unity4.14.0";
private const string sdkPrefix = "unity4.14.1";
private static bool appLaunched = false;

public static void Start(AdjustConfig adjustConfig)
Expand Down
14 changes: 12 additions & 2 deletions Assets/Adjust/iOS/Adjust.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Adjust.h
// Adjust
//
// V4.14.0
// V4.14.1
// Created by Christian Wellenbrock (wellle) on 23rd July 2013.
// Copyright © 2012-2017 Adjust GmbH. All rights reserved.
//
Expand Down Expand Up @@ -105,10 +105,18 @@ extern NSString * __nonnull const ADJEnvironmentProduction;
/**
* @brief Set the device token used by push notifications.
*
* @param deviceToken Apple push notification token for iOS device.
* @param deviceToken Apple push notification token for iOS device as NSData.
*/
+ (void)setDeviceToken:(nonnull NSData *)deviceToken;

/**
* @brief Set the device token used by push notifications.
* This method is only used by Adjust non native SDKs. Don't use it anywhere else.
*
* @param pushToken Apple push notification token for iOS device as NSString.
*/
+ (void)setPushToken:(nonnull NSString *)pushToken;

/**
* @brief Enable or disable offline mode. Activities won't be sent but they are saved when
* offline mode is disabled. This feature is not saved for future sessions.
Expand Down Expand Up @@ -234,6 +242,8 @@ extern NSString * __nonnull const ADJEnvironmentProduction;

- (void)setDeviceToken:(nonnull NSData *)deviceToken;

- (void)setPushToken:(nonnull NSString *)pushToken;

- (void)sendFirstPackages;

- (void)trackSubsessionEnd;
Expand Down
Binary file modified Assets/Adjust/iOS/AdjustSdk.a
Binary file not shown.
Binary file modified Assets/Adjust/iOS/AdjustTestLibrary.a
Binary file not shown.
2 changes: 1 addition & 1 deletion Assets/Adjust/iOS/AdjustUnity.mm
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void _AdjustSetOfflineMode(int enabled) {

void _AdjustSetDeviceToken(const char* deviceToken) {
NSString *stringDeviceToken = [NSString stringWithUTF8String:deviceToken];
[Adjust setDeviceToken:[stringDeviceToken dataUsingEncoding:NSUTF8StringEncoding]];
[Adjust setPushToken:stringDeviceToken];
}

void _AdjustAppWillOpenUrl(const char* url) {
Expand Down
2 changes: 1 addition & 1 deletion Assets/Adjust/iOS/AdjustiOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace com.adjust.sdk
#if UNITY_IOS
public class AdjustiOS
{
private const string sdkPrefix = "unity4.14.0";
private const string sdkPrefix = "unity4.14.1";

[DllImport("__Internal")]
private static extern void _AdjustLaunchApp(
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
### Version 4.14.1 (18th June 2018)
#### Changed
- Updated the way how iOS native bridge handles push tokens from Unity interface - they are now being passed directly as strings to native iOS SDK.

#### Native SDKs
- [[email protected]][ios_sdk_v4.14.1]
- [[email protected]][android_sdk_v4.14.0]
- [[email protected]][windows_sdk_v4.14.0]

---

### Version 4.14.0 (8th June 2018)
#### Added
- Added deep link caching in case `appWillOpenUrl`/`AppWillOpenUrl` method is called natively before SDK is initialised.
Expand Down Expand Up @@ -496,6 +507,7 @@
[ios_sdk_v4.12.3]: https://github.com/adjust/ios_sdk/tree/v4.12.3
[ios_sdk_v4.13.0]: https://github.com/adjust/ios_sdk/tree/v4.13.0
[ios_sdk_v4.14.0]: https://github.com/adjust/ios_sdk/tree/v4.14.0
[ios_sdk_v4.14.1]: https://github.com/adjust/ios_sdk/tree/v4.14.1

[android_sdk_v3.5.0]: https://github.com/adjust/android_sdk/tree/v3.5.0
[android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.14.0
4.14.1
4 changes: 2 additions & 2 deletions doc/migrate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Migrate your Adjust SDK for Unity3d to 4.14.0 from 3.4.4
## Migrate your Adjust SDK for Unity3d to 4.14.1 from 3.4.4

### Migration procedure

Expand All @@ -9,7 +9,7 @@ keeping in `Assets/Plugins` folder.

For migration purposes, we have prepared the Adjust SDK uninstall script written in Python (`adjust_uninstall.py`).

Migration to version 4.14.0 of our SDK requires the following steps:
Migration to version 4.14.1 of our SDK requires the following steps:

1. Copy the `adjust_uninstall.py` script to your root Unity project directory and run it. This script should
delete all adjust source files from the previous SDK version you had.
Expand Down
16 changes: 0 additions & 16 deletions ext/Android/build.sh

This file was deleted.

26 changes: 0 additions & 26 deletions ext/Android/build_test_ci.sh

This file was deleted.

36 changes: 36 additions & 0 deletions ext/android/build-dev-sdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash

set -e

# ======================================== #

# Colors for output
NC='\033[0m'
RED='\033[0;31m'
CYAN='\033[1;36m'
GREEN='\033[0;32m'

# ======================================== #

# Set directories of interest for the script
MVNDIR=./sdk-dev/Adjust
JARINDIR=./sdk-dev/Adjust/target
JAROUTDIR=../../Assets/Adjust/Android
(cd $MVNDIR; mvn clean)
(cd $MVNDIR; mvn package)

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-DEV-SDK]:${GREEN} Previous SDK JAR cleanup and generating new one ... ${NC}"
rm -v $JAROUTDIR/adjust-android*
cp -v $JARINDIR/adjust-android-*.*.*.jar $JAROUTDIR
rm -v $JAROUTDIR/*-javadoc.jar
rm -v $JAROUTDIR/*-sources.jar
mv -v $JAROUTDIR/adjust-android-*.*.*.jar $JAROUTDIR/adjust-android.jar
echo -e "${CYAN}[ADJUST][ANDROID][BUILD-DEV-SDK]:${GREEN} Done! ${NC}"

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-DEV-SDK]:${GREEN} Script completed! ${NC}"

# ======================================== #
41 changes: 41 additions & 0 deletions ext/android/build-dev-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

set -e

# ======================================== #

# Colors for output
NC='\033[0m'
RED='\033[0;31m'
CYAN='\033[1;36m'
GREEN='\033[0;32m'

# ======================================== #

# Set directories of interest for the script
SDK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SDK_DIR="$(dirname "$SDK_DIR")"
SDK_DIR="$(dirname "$SDK_DIR")"
BUILD_DIR=sdk-dev/Adjust
JAR_IN_DIR=testlibrary/build/outputs
JAR_OUT_DIR=Assets/Adjust/Android
cd $(dirname $0)

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-DEV-TEST]:${GREEN} Running Gradle tasks: clean makeJar ... ${NC}"
cd $BUILD_DIR
./gradlew clean :testlibrary:makeJar
echo -e "${CYAN}[ADJUST][ANDROID][BUILD-DEV-TEST]:${GREEN} Done! ${NC}"

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-DEV-TEST]:${GREEN} Moving test library JAR from ${JAR_IN_DIR} to ${JAR_OUT_DIR} ... ${NC}"
mv -v ${JAR_IN_DIR}/*.jar ${SDK_DIR}/${JAR_OUT_DIR}/adjust-testing.jar
echo -e "${CYAN}[ADJUST][ANDROID][BUILD-DEV-TEST]:${GREEN} Done! ${NC}"

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-DEV-TEST]:${GREEN} Script completed! ${NC}"

# ======================================== #
36 changes: 36 additions & 0 deletions ext/android/build-sdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash

set -e

# ======================================== #

# Colors for output
NC='\033[0m'
RED='\033[0;31m'
CYAN='\033[1;36m'
GREEN='\033[0;32m'

# ======================================== #

# Set directories of interest for the script
MVNDIR=./sdk/Adjust
JARINDIR=./sdk/Adjust/target
JAROUTDIR=../../Assets/Adjust/Android
(cd $MVNDIR; mvn clean)
(cd $MVNDIR; mvn package)

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-SDK]:${GREEN} Previous SDK JAR cleanup and generating new one ... ${NC}"
rm -v $JAROUTDIR/adjust-android*
cp -v $JARINDIR/adjust-android-*.*.*.jar $JAROUTDIR
rm -v $JAROUTDIR/*-javadoc.jar
rm -v $JAROUTDIR/*-sources.jar
mv -v $JAROUTDIR/adjust-android-*.*.*.jar $JAROUTDIR/adjust-android.jar
echo -e "${CYAN}[ADJUST][ANDROID][BUILD-SDK]:${GREEN} Done! ${NC}"

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-SDK]:${GREEN} Script completed! ${NC}"

# ======================================== #
41 changes: 41 additions & 0 deletions ext/android/build-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

set -e

# ======================================== #

# Colors for output
NC='\033[0m'
RED='\033[0;31m'
CYAN='\033[1;36m'
GREEN='\033[0;32m'

# ======================================== #

# Set directories of interest for the script
SDK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SDK_DIR="$(dirname "$SDK_DIR")"
SDK_DIR="$(dirname "$SDK_DIR")"
BUILD_DIR=sdk/Adjust
JAR_IN_DIR=testlibrary/build/outputs
JAR_OUT_DIR=Assets/Adjust/Android
cd $(dirname $0)

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-TEST]:${GREEN} Running Gradle tasks: clean makeJar ... ${NC}"
cd $BUILD_DIR
./gradlew clean :testlibrary:makeJar
echo -e "${CYAN}[ADJUST][ANDROID][BUILD-TEST]:${GREEN} Done! ${NC}"

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-TEST]:${GREEN} Moving test library JAR from ${JAR_IN_DIR} to ${JAR_OUT_DIR} ... ${NC}"
mv -v ${JAR_IN_DIR}/*.jar ${SDK_DIR}/${JAR_OUT_DIR}/adjust-testing.jar
echo -e "${CYAN}[ADJUST][ANDROID][BUILD-TEST]:${GREEN} Done! ${NC}"

# ======================================== #

echo -e "${CYAN}[ADJUST][ANDROID][BUILD-TEST]:${GREEN} Script completed! ${NC}"

# ======================================== #
1 change: 1 addition & 0 deletions ext/android/sdk-dev
Submodule sdk-dev added at f0cc6c
17 changes: 0 additions & 17 deletions ext/iOS/build.sh

This file was deleted.

1 change: 0 additions & 1 deletion ext/iOS/sdk
Submodule sdk deleted from 4c9d7b
Loading

0 comments on commit f8c6246

Please sign in to comment.