Skip to content

Commit

Permalink
Merge pull request #11 from adjust/v4112
Browse files Browse the repository at this point in the history
Version 4.11.2
  • Loading branch information
uerceg authored Apr 24, 2017
2 parents 76797f1 + 05ea980 commit d0577a5
Show file tree
Hide file tree
Showing 56 changed files with 1,735 additions and 1,181 deletions.
81 changes: 55 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,87 @@
### Version 4.11.2 (24th April 2017)
#### Added
- **[iOS]** Added nullability annotations to public headers for Swift 3.0 compatibility.
- **[iOS]** Added `BITCODE_GENERATION_MODE` to iOS framework for `Carthage` support.
- **[iOS]** Added support for iOS 10.3.
- **[iOS][AND]** Added sending of the app's install time.
- **[iOS][AND]** Added sending of the app's update time.

#### Fixed
- **[iOS]** Fixed not processing of `sdk_info` package type causing logs not to print proper package name once tracked.
- **[AND]** Fixed query string parsing.
- **[AND]** Fixed issue of creating and destroying lots of threads on certain Android API levels (https://github.com/adjust/android_sdk/issues/265).
- **[AND]** Protected `Package Manager` from throwing unexpected exceptions (https://github.com/adjust/android_sdk/issues/266).

#### Changed
- **[AND]** Refactored native networking code.
- **[iOS]** Updated native iOS SDK to version **4.11.3**.
- **[AND]** Updated native Android SDK to version **4.11.3**.
- **[REPO]** Introduced `[iOS]`, `[AND]`, `[WIN]` and `[REPO]` tags to `CHANGELOG` to highlight the platform the change is referring to.
- **[REPO]** Updated example app.

#### Native SDKs
- **[iOS]** [iOS@v4.11.3][ios_sdk_v4.11.3]
- **[AND]** [Android@v4.11.3][android_sdk_v4.11.3]

---

### Version 4.11.1 (21st February 2017)
#### Added
- Added support for React Native `0.40.0`++ (thanks to @philipheinser, @philipshurpik and @dhorelik)
- **[REPO]** Added support for React Native `0.40.0`++ (thanks to @philipheinser, @philipshurpik and @dhorelik)

#### Fixed
- Fixed `Duplicate interface definition for class` error messages.
- **[iOS]** Fixed `Duplicate interface definition for class` error messages.

#### Changed
- Updated iOS and Android example apps build scripts.
- **[REPO]** Updated iOS and Android example apps build scripts.

#### Native SDKs
- [iOS@v4.11.0][ios_sdk_v4.11.0]
- [Android@v4.11.0][android_sdk_v4.11.0]
- **[iOS]** [iOS@v4.11.0][ios_sdk_v4.11.0]
- **[AND]** [Android@v4.11.0][android_sdk_v4.11.0]

---

### Version 4.11.0 (13th February 2017)
#### Added
- Added `adid` property to the attribution callback response.
- Added `getIdfa` method to the `Adjust` instance to be able to obtain iOS advertising identifier (IDFA).
- Added `getGoogleAdId` method to the `Adjust` instance to be able to obtain Google Play Services advertising identifier.
- Added `getAdid` method to the `Adjust` instance to be able to get adid value at any time after obtaining it, not only when session/event callbacks have been triggered.
- Added `getAttribution` method to the `Adjust` instance to be able to get current attribution value at any time after obtaining it, not only when an attribution callback has been triggered.
- Added sending of **Amazon Fire Advertising Identifier** for Android platform.
- Added possibility to set default tracker for the app by adding `adjust_config.properties` file to the `assets` folder of your Android app. Mostly meant to be used by the `Adjust Store & Pre-install Tracker Tool` (https://github.com/adjust/android_sdk/blob/master/doc/english/pre_install_tracker_tool.md).
- **[iOS][AND]** Added `adid` property to the attribution callback response.
- **[iOS][AND]** Added `getAdid` method to the `Adjust` instance to be able to get adid value at any time after obtaining it, not only when session/event callbacks have been triggered.
- **[iOS][AND]** Added `getAttribution` method to the `Adjust` instance to be able to get current attribution value at any time after obtaining it, not only when an attribution callback has been triggered.
- **[iOS]** Added `getIdfa` method to the `Adjust` instance to be able to obtain iOS advertising identifier (IDFA).
- **[AND]** Added `getGoogleAdId` method to the `Adjust` instance to be able to obtain Google Play Services advertising identifier.
- **[AND]** Added sending of **Amazon Fire Advertising Identifier** for Android platform.
- **[AND]** Added possibility to set default tracker for the app by adding `adjust_config.properties` file to the `assets` folder of your Android app. Mostly meant to be used by the `Adjust Store & Pre-install Tracker Tool` (https://github.com/adjust/android_sdk/blob/master/doc/english/pre_install_tracker_tool.md).

#### Fixed
- Now reading push token value from activity state file when sending package.
- Fixed memory leak by closing network session for iOS platform.
- Fixed `TARGET_OS_TV` pre-processor check for iOS platform.
- **[iOS][AND]** Now reading push token value from activity state file when sending package.
- **[iOS]** Fixed memory leak by closing network session for iOS platform.
- **[iOS]** Fixed `TARGET_OS_TV` pre-processor check for iOS platform.

#### Changed
- Firing attribution request as soon as install has been tracked, regardless of presence of attribution callback implementation in user's app.
- Saving iAd/AdSearch details to prevent sending duplicated `sdk_click` packages for iOS platform.
- Updated docs.
- Updated native iOS SDK to version **4.11.0**.
- Updated native Android SDK to version **4.11.0**.
- Native SDKs stability updates and improvements.
- **[iOS][AND]** Firing attribution request as soon as install has been tracked, regardless of presence of attribution callback implementation in user's app.
- **[iOS]** Saving iAd/AdSearch details to prevent sending duplicated `sdk_click` packages for iOS platform.
- **[iOS]** Updated native iOS SDK to version **4.11.0**.
- **[AND]** Updated native Android SDK to version **4.11.0**.
- **[REPO]** Updated docs.

#### Native SDKs
- [iOS@v4.11.0][ios_sdk_v4.11.0]
- [Android@v4.11.0][android_sdk_v4.11.0]
- **[iOS]** [iOS@v4.11.0][ios_sdk_v4.11.0]
- **[AND]** [Android@v4.11.0][android_sdk_v4.11.0]

---

### Version 4.10.0 (1st December 2016)
#### Added
- Initial release of the adjust SDK for React Native.
- **[iOS][AND]** Initial release of the adjust SDK for React Native. Supported platforms: `iOS` and `Android`.

#### Native SDKs
- [iOS@v4.10.3][ios_sdk_v4.10.3]
- [Android@v4.10.4][android_sdk_v4.10.4]
- **[iOS]** [iOS@v4.10.3][ios_sdk_v4.10.3]
- **[AND]** [Android@v4.10.4][android_sdk_v4.10.4]

[ios_sdk_v4.10.3]: https://github.com/adjust/ios_sdk/tree/v4.10.3
[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

[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
[android_sdk_v4.11.1]: https://github.com/adjust/android_sdk/tree/v4.11.1
[android_sdk_v4.11.3]: https://github.com/adjust/android_sdk/tree/v4.11.3
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This is the React Native SDK of Adjust™. You can read more about Adjust™ at
* [Example app](#example-app)
* [Basic integration](#basic-integration)
* [Get the SDK](#sdk-get)
* [Add the AdSupport and iAd framework](#sdk-frameworks)
* [Integrate the SDK into your app](#sdk-integrate)
* [Adjust logging](#adjust-logging)
* [Adjust project settings](#adjust-project-settings)
Expand Down Expand Up @@ -103,6 +104,10 @@ protected List<ReactPackage> getPackages() {
import com.adjust.nativemodule.AdjustPackage;
```

### <a id="sdk-frameworks"></a>Add the AdSupport and iAd framework

Select your project in the Project Navigator. In the left hand side of the main view, select your target. In the tab `Build Phases`, expand the group `Link Binary with Libraries`. On the bottom of that section click on the `+` button. Select the `AdSupport.framework` and click the `Add` button. Unless you are using tvOS, repeat the same steps to add the `iAd.framework`. Change the `Status` of both frameworks to `Optional`.

### <a id="sdk-integrate"></a>Integrate the SDK into your app

You should use the following import statement on top of your `.js` file
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.11.1
4.11.2
Binary file modified android/libs/adjust-android.jar
Binary file not shown.
113 changes: 63 additions & 50 deletions example/Screen1.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@

import React, { Component } from 'react';
import { Adjust, AdjustEvent, AdjustConfig } from 'react-native-adjust';
import {
AppRegistry,
StyleSheet,
Text,
TouchableHighlight,
View,
Linking,
Navigator
} from 'react-native';
import { AppRegistry, StyleSheet, Text, TouchableHighlight, View, Linking, Navigator } from 'react-native';

export default class Screen1 extends Component {
componentDidMount() {
Expand All @@ -35,6 +27,8 @@ export default class Screen1 extends Component {
this._onPress_toggleSdk = this._onPress_toggleSdk.bind(this);
this._onPress_isSdkEnabled = this._onPress_isSdkEnabled.bind(this);
this._onPress_jumpToNextPage = this._onPress_jumpToNextPage.bind(this);
this._onPress_getIds = this._onPress_getIds.bind(this);
this._onPress_sendPushToken = this._onPress_sendPushToken.bind(this);

this.isOffline = false;

Expand Down Expand Up @@ -118,22 +112,7 @@ export default class Screen1 extends Component {
// Adjust.resetSessionCallbackParameters();
// Adjust.resetSessionPartnerParameters();

Adjust.getAttribution((attribution) => {
console.log("Tracker token = " + attribution.trackerToken);
console.log("Tracker name = " + attribution.trackerName);
console.log("Network = " + attribution.network);
console.log("Campaign = " + attribution.campaign);
console.log("Adgroup = " + attribution.adgroup);
console.log("Creative = " + attribution.creative);
console.log("Click label = " + attribution.clickLabel);
console.log("Adid = " + attribution.adid);
});

Adjust.getAdid((adid) => {
console.log("Adid = " + adid);
});

Adjust.setPushToken("bunny_foo_foo");
// Adjust.setPushToken("bunny_foo_foo");

Adjust.create(adjustConfig);

Expand Down Expand Up @@ -197,6 +176,18 @@ export default class Screen1 extends Component {
<Text>is SDK Enabled?</Text>
</TouchableHighlight>

<TouchableHighlight
style={styles.buttons}
onPress={this._onPress_sendPushToken}>
<Text>Send Push Token</Text>
</TouchableHighlight>

<TouchableHighlight
style={styles.buttons}
onPress={this._onPress_getIds}>
<Text>Get Ids</Text>
</TouchableHighlight>

<TouchableHighlight
style={styles.buttons}
onPress={this._onPress_jumpToNextPage}>
Expand All @@ -209,18 +200,6 @@ export default class Screen1 extends Component {
_onPress_trackSimpleEvent() {
Adjust.isEnabled((isEnabled) => {
if (isEnabled) {
Adjust.getAdid((adid) => {
console.log("Adid = " + adid);
});

Adjust.getIdfa((idfa) => {
console.log("IDFA = " + idfa);
});

Adjust.getGoogleAdId((googleAdId) => {
console.log("Google Ad Id = " + googleAdId);
});

var adjustEvent = new AdjustEvent("g3mfiw");
Adjust.trackEvent(adjustEvent);
} else {
Expand All @@ -232,19 +211,11 @@ export default class Screen1 extends Component {
_onPress_trackRevenueEvent() {
Adjust.isEnabled((isEnabled) => {
if (isEnabled) {
Adjust.getAttribution((attribution) => {
console.log("Tracker token = " + attribution.trackerToken);
console.log("Tracker name = " + attribution.trackerName);
console.log("Network = " + attribution.network);
console.log("Campaign = " + attribution.campaign);
console.log("Adgroup = " + attribution.adgroup);
console.log("Creative = " + attribution.creative);
console.log("Click label = " + attribution.clickLabel);
console.log("Adid = " + attribution.adid);
});

var adjustEvent = new AdjustEvent("a4fd35");

adjustEvent.setRevenue(10.0, "USD");
adjustEvent.setTransactionId("DUMMY_TRANSACTION_ID");

Adjust.trackEvent(adjustEvent);
} else {
console.log(">>> SDK is disabled");
Expand Down Expand Up @@ -315,6 +286,48 @@ export default class Screen1 extends Component {
});
}

_onPress_sendPushToken() {
Adjust.isEnabled((isEnabled) => {
if (isEnabled) {
Adjust.setPushToken("bunny_foo_foo");
} else {
console.log(">>> SDK is disabled");
}
});
}

_onPress_getIds() {
Adjust.isEnabled((isEnabled) => {
if (isEnabled) {
Adjust.getAdid((adid) => {
console.log(">>> Adid = " + adid);
});

Adjust.getIdfa((idfa) => {
console.log(">>> IDFA = " + idfa);
});

Adjust.getGoogleAdId((googleAdId) => {
console.log(">>> Google Ad Id = " + googleAdId);
});

Adjust.getAttribution((attribution) => {
console.log(">>> Attribution:");
console.log("Tracker token = " + attribution.trackerToken);
console.log("Tracker name = " + attribution.trackerName);
console.log("Network = " + attribution.network);
console.log("Campaign = " + attribution.campaign);
console.log("Adgroup = " + attribution.adgroup);
console.log("Creative = " + attribution.creative);
console.log("Click label = " + attribution.clickLabel);
console.log("Adid = " + attribution.adid);
});
} else {
console.log(">>> SDK is disabled");
}
});
}

_onPress_jumpToNextPage() {
this.props.navigator.push({
name: 'screen_2',
Expand All @@ -341,7 +354,7 @@ const styles = StyleSheet.create({
marginBottom: 5,
},
buttons: {
margin: 10,
padding: 10
margin: 5,
padding: 5
}
});
22 changes: 12 additions & 10 deletions example/Screen2.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
'use strict';

import React, {
Component
} from 'react';

import {
StyleSheet,
View,
Text,
TouchableHighlight,
} from 'react-native';
import React, { Component } from 'react';
import { Adjust, AdjustEvent, AdjustConfig } from 'react-native-adjust';
import { StyleSheet, View, Text, TouchableHighlight } from 'react-native';

export default class Screen2 extends Component {

constructor(props) {
super(props);

this._onPress = this._onPress.bind(this);

Adjust.isEnabled((isEnabled) => {
if (isEnabled) {
var adjustEvent = new AdjustEvent("g3mfiw");
Adjust.trackEvent(adjustEvent);
} else {
console.log(">>> SDK is disabled");
}
});
}

render() {
Expand Down
1 change: 1 addition & 0 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile 'com.google.android.gms:play-services-analytics:10.2.1'
}

// Run this once to be able to run the application with BUCK
Expand Down
9 changes: 8 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="adjustExample" />
</intent-filter>
</activity>

<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>

</manifest>
9 changes: 1 addition & 8 deletions example/index.android.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
'use strict';

import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Navigator,
TouchableHighlight
} from 'react-native';
import { AppRegistry, StyleSheet, Text, View, Navigator, TouchableHighlight } from 'react-native';

import Screen1 from './Screen1';
import Screen2 from './Screen2';
Expand Down
Loading

0 comments on commit d0577a5

Please sign in to comment.