Skip to content

Commit d0577a5

Browse files
authored
Merge pull request #11 from adjust/v4112
Version 4.11.2
2 parents 76797f1 + 05ea980 commit d0577a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1735
-1181
lines changed

CHANGELOG.md

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,87 @@
1+
### Version 4.11.2 (24th April 2017)
2+
#### Added
3+
- **[iOS]** Added nullability annotations to public headers for Swift 3.0 compatibility.
4+
- **[iOS]** Added `BITCODE_GENERATION_MODE` to iOS framework for `Carthage` support.
5+
- **[iOS]** Added support for iOS 10.3.
6+
- **[iOS][AND]** Added sending of the app's install time.
7+
- **[iOS][AND]** Added sending of the app's update time.
8+
9+
#### Fixed
10+
- **[iOS]** Fixed not processing of `sdk_info` package type causing logs not to print proper package name once tracked.
11+
- **[AND]** Fixed query string parsing.
12+
- **[AND]** Fixed issue of creating and destroying lots of threads on certain Android API levels (https://github.com/adjust/android_sdk/issues/265).
13+
- **[AND]** Protected `Package Manager` from throwing unexpected exceptions (https://github.com/adjust/android_sdk/issues/266).
14+
15+
#### Changed
16+
- **[AND]** Refactored native networking code.
17+
- **[iOS]** Updated native iOS SDK to version **4.11.3**.
18+
- **[AND]** Updated native Android SDK to version **4.11.3**.
19+
- **[REPO]** Introduced `[iOS]`, `[AND]`, `[WIN]` and `[REPO]` tags to `CHANGELOG` to highlight the platform the change is referring to.
20+
- **[REPO]** Updated example app.
21+
22+
#### Native SDKs
23+
- **[iOS]** [[email protected]][ios_sdk_v4.11.3]
24+
- **[AND]** [[email protected]][android_sdk_v4.11.3]
25+
26+
---
27+
128
### Version 4.11.1 (21st February 2017)
229
#### Added
3-
- Added support for React Native `0.40.0`++ (thanks to @philipheinser, @philipshurpik and @dhorelik)
30+
- **[REPO]** Added support for React Native `0.40.0`++ (thanks to @philipheinser, @philipshurpik and @dhorelik)
431

532
#### Fixed
6-
- Fixed `Duplicate interface definition for class` error messages.
33+
- **[iOS]** Fixed `Duplicate interface definition for class` error messages.
734

835
#### Changed
9-
- Updated iOS and Android example apps build scripts.
36+
- **[REPO]** Updated iOS and Android example apps build scripts.
1037

1138
#### Native SDKs
12-
- [[email protected]][ios_sdk_v4.11.0]
13-
- [[email protected]][android_sdk_v4.11.0]
39+
- **[iOS]** [[email protected]][ios_sdk_v4.11.0]
40+
- **[AND]** [[email protected]][android_sdk_v4.11.0]
1441

1542
---
1643

1744
### Version 4.11.0 (13th February 2017)
1845
#### Added
19-
- Added `adid` property to the attribution callback response.
20-
- Added `getIdfa` method to the `Adjust` instance to be able to obtain iOS advertising identifier (IDFA).
21-
- Added `getGoogleAdId` method to the `Adjust` instance to be able to obtain Google Play Services advertising identifier.
22-
- 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.
23-
- 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.
24-
- Added sending of **Amazon Fire Advertising Identifier** for Android platform.
25-
- 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).
46+
- **[iOS][AND]** Added `adid` property to the attribution callback response.
47+
- **[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.
48+
- **[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.
49+
- **[iOS]** Added `getIdfa` method to the `Adjust` instance to be able to obtain iOS advertising identifier (IDFA).
50+
- **[AND]** Added `getGoogleAdId` method to the `Adjust` instance to be able to obtain Google Play Services advertising identifier.
51+
- **[AND]** Added sending of **Amazon Fire Advertising Identifier** for Android platform.
52+
- **[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).
2653

2754
#### Fixed
28-
- Now reading push token value from activity state file when sending package.
29-
- Fixed memory leak by closing network session for iOS platform.
30-
- Fixed `TARGET_OS_TV` pre-processor check for iOS platform.
55+
- **[iOS][AND]** Now reading push token value from activity state file when sending package.
56+
- **[iOS]** Fixed memory leak by closing network session for iOS platform.
57+
- **[iOS]** Fixed `TARGET_OS_TV` pre-processor check for iOS platform.
3158

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

4066
#### Native SDKs
41-
- [[email protected]][ios_sdk_v4.11.0]
42-
- [[email protected]][android_sdk_v4.11.0]
67+
- **[iOS]** [[email protected]][ios_sdk_v4.11.0]
68+
- **[AND]** [[email protected]][android_sdk_v4.11.0]
4369

4470
---
4571

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

5076
#### Native SDKs
51-
- [[email protected]][ios_sdk_v4.10.3]
52-
- [[email protected]][android_sdk_v4.10.4]
77+
- **[iOS]** [[email protected]][ios_sdk_v4.10.3]
78+
- **[AND]** [[email protected]][android_sdk_v4.10.4]
5379

5480
[ios_sdk_v4.10.3]: https://github.com/adjust/ios_sdk/tree/v4.10.3
5581
[ios_sdk_v4.11.0]: https://github.com/adjust/ios_sdk/tree/v4.11.0
82+
[ios_sdk_v4.11.3]: https://github.com/adjust/ios_sdk/tree/v4.11.3
5683

5784
[android_sdk_v4.10.4]: https://github.com/adjust/android_sdk/tree/v4.10.4
5885
[android_sdk_v4.11.0]: https://github.com/adjust/android_sdk/tree/v4.11.0
86+
[android_sdk_v4.11.1]: https://github.com/adjust/android_sdk/tree/v4.11.1
87+
[android_sdk_v4.11.3]: https://github.com/adjust/android_sdk/tree/v4.11.3

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This is the React Native SDK of Adjust™. You can read more about Adjust™ at
88
* [Example app](#example-app)
99
* [Basic integration](#basic-integration)
1010
* [Get the SDK](#sdk-get)
11+
* [Add the AdSupport and iAd framework](#sdk-frameworks)
1112
* [Integrate the SDK into your app](#sdk-integrate)
1213
* [Adjust logging](#adjust-logging)
1314
* [Adjust project settings](#adjust-project-settings)
@@ -103,6 +104,10 @@ protected List<ReactPackage> getPackages() {
103104
import com.adjust.nativemodule.AdjustPackage;
104105
```
105106

107+
### <a id="sdk-frameworks"></a>Add the AdSupport and iAd framework
108+
109+
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`.
110+
106111
### <a id="sdk-integrate"></a>Integrate the SDK into your app
107112

108113
You should use the following import statement on top of your `.js` file

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.11.1
1+
4.11.2

android/libs/adjust-android.jar

2.66 KB
Binary file not shown.

example/Screen1.js

Lines changed: 63 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,7 @@
66

77
import React, { Component } from 'react';
88
import { Adjust, AdjustEvent, AdjustConfig } from 'react-native-adjust';
9-
import {
10-
AppRegistry,
11-
StyleSheet,
12-
Text,
13-
TouchableHighlight,
14-
View,
15-
Linking,
16-
Navigator
17-
} from 'react-native';
9+
import { AppRegistry, StyleSheet, Text, TouchableHighlight, View, Linking, Navigator } from 'react-native';
1810

1911
export default class Screen1 extends Component {
2012
componentDidMount() {
@@ -35,6 +27,8 @@ export default class Screen1 extends Component {
3527
this._onPress_toggleSdk = this._onPress_toggleSdk.bind(this);
3628
this._onPress_isSdkEnabled = this._onPress_isSdkEnabled.bind(this);
3729
this._onPress_jumpToNextPage = this._onPress_jumpToNextPage.bind(this);
30+
this._onPress_getIds = this._onPress_getIds.bind(this);
31+
this._onPress_sendPushToken = this._onPress_sendPushToken.bind(this);
3832

3933
this.isOffline = false;
4034

@@ -118,22 +112,7 @@ export default class Screen1 extends Component {
118112
// Adjust.resetSessionCallbackParameters();
119113
// Adjust.resetSessionPartnerParameters();
120114

121-
Adjust.getAttribution((attribution) => {
122-
console.log("Tracker token = " + attribution.trackerToken);
123-
console.log("Tracker name = " + attribution.trackerName);
124-
console.log("Network = " + attribution.network);
125-
console.log("Campaign = " + attribution.campaign);
126-
console.log("Adgroup = " + attribution.adgroup);
127-
console.log("Creative = " + attribution.creative);
128-
console.log("Click label = " + attribution.clickLabel);
129-
console.log("Adid = " + attribution.adid);
130-
});
131-
132-
Adjust.getAdid((adid) => {
133-
console.log("Adid = " + adid);
134-
});
135-
136-
Adjust.setPushToken("bunny_foo_foo");
115+
// Adjust.setPushToken("bunny_foo_foo");
137116

138117
Adjust.create(adjustConfig);
139118

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

179+
<TouchableHighlight
180+
style={styles.buttons}
181+
onPress={this._onPress_sendPushToken}>
182+
<Text>Send Push Token</Text>
183+
</TouchableHighlight>
184+
185+
<TouchableHighlight
186+
style={styles.buttons}
187+
onPress={this._onPress_getIds}>
188+
<Text>Get Ids</Text>
189+
</TouchableHighlight>
190+
200191
<TouchableHighlight
201192
style={styles.buttons}
202193
onPress={this._onPress_jumpToNextPage}>
@@ -209,18 +200,6 @@ export default class Screen1 extends Component {
209200
_onPress_trackSimpleEvent() {
210201
Adjust.isEnabled((isEnabled) => {
211202
if (isEnabled) {
212-
Adjust.getAdid((adid) => {
213-
console.log("Adid = " + adid);
214-
});
215-
216-
Adjust.getIdfa((idfa) => {
217-
console.log("IDFA = " + idfa);
218-
});
219-
220-
Adjust.getGoogleAdId((googleAdId) => {
221-
console.log("Google Ad Id = " + googleAdId);
222-
});
223-
224203
var adjustEvent = new AdjustEvent("g3mfiw");
225204
Adjust.trackEvent(adjustEvent);
226205
} else {
@@ -232,19 +211,11 @@ export default class Screen1 extends Component {
232211
_onPress_trackRevenueEvent() {
233212
Adjust.isEnabled((isEnabled) => {
234213
if (isEnabled) {
235-
Adjust.getAttribution((attribution) => {
236-
console.log("Tracker token = " + attribution.trackerToken);
237-
console.log("Tracker name = " + attribution.trackerName);
238-
console.log("Network = " + attribution.network);
239-
console.log("Campaign = " + attribution.campaign);
240-
console.log("Adgroup = " + attribution.adgroup);
241-
console.log("Creative = " + attribution.creative);
242-
console.log("Click label = " + attribution.clickLabel);
243-
console.log("Adid = " + attribution.adid);
244-
});
245-
246214
var adjustEvent = new AdjustEvent("a4fd35");
215+
247216
adjustEvent.setRevenue(10.0, "USD");
217+
adjustEvent.setTransactionId("DUMMY_TRANSACTION_ID");
218+
248219
Adjust.trackEvent(adjustEvent);
249220
} else {
250221
console.log(">>> SDK is disabled");
@@ -315,6 +286,48 @@ export default class Screen1 extends Component {
315286
});
316287
}
317288

289+
_onPress_sendPushToken() {
290+
Adjust.isEnabled((isEnabled) => {
291+
if (isEnabled) {
292+
Adjust.setPushToken("bunny_foo_foo");
293+
} else {
294+
console.log(">>> SDK is disabled");
295+
}
296+
});
297+
}
298+
299+
_onPress_getIds() {
300+
Adjust.isEnabled((isEnabled) => {
301+
if (isEnabled) {
302+
Adjust.getAdid((adid) => {
303+
console.log(">>> Adid = " + adid);
304+
});
305+
306+
Adjust.getIdfa((idfa) => {
307+
console.log(">>> IDFA = " + idfa);
308+
});
309+
310+
Adjust.getGoogleAdId((googleAdId) => {
311+
console.log(">>> Google Ad Id = " + googleAdId);
312+
});
313+
314+
Adjust.getAttribution((attribution) => {
315+
console.log(">>> Attribution:");
316+
console.log("Tracker token = " + attribution.trackerToken);
317+
console.log("Tracker name = " + attribution.trackerName);
318+
console.log("Network = " + attribution.network);
319+
console.log("Campaign = " + attribution.campaign);
320+
console.log("Adgroup = " + attribution.adgroup);
321+
console.log("Creative = " + attribution.creative);
322+
console.log("Click label = " + attribution.clickLabel);
323+
console.log("Adid = " + attribution.adid);
324+
});
325+
} else {
326+
console.log(">>> SDK is disabled");
327+
}
328+
});
329+
}
330+
318331
_onPress_jumpToNextPage() {
319332
this.props.navigator.push({
320333
name: 'screen_2',
@@ -341,7 +354,7 @@ const styles = StyleSheet.create({
341354
marginBottom: 5,
342355
},
343356
buttons: {
344-
margin: 10,
345-
padding: 10
357+
margin: 5,
358+
padding: 5
346359
}
347360
});

example/Screen2.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
'use strict';
22

3-
import React, {
4-
Component
5-
} from 'react';
6-
7-
import {
8-
StyleSheet,
9-
View,
10-
Text,
11-
TouchableHighlight,
12-
} from 'react-native';
3+
import React, { Component } from 'react';
4+
import { Adjust, AdjustEvent, AdjustConfig } from 'react-native-adjust';
5+
import { StyleSheet, View, Text, TouchableHighlight } from 'react-native';
136

147
export default class Screen2 extends Component {
158

169
constructor(props) {
1710
super(props);
1811

1912
this._onPress = this._onPress.bind(this);
13+
14+
Adjust.isEnabled((isEnabled) => {
15+
if (isEnabled) {
16+
var adjustEvent = new AdjustEvent("g3mfiw");
17+
Adjust.trackEvent(adjustEvent);
18+
} else {
19+
console.log(">>> SDK is disabled");
20+
}
21+
});
2022
}
2123

2224
render() {

example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ dependencies {
130130
compile fileTree(dir: "libs", include: ["*.jar"])
131131
compile "com.android.support:appcompat-v7:23.0.1"
132132
compile "com.facebook.react:react-native:+" // From node_modules
133+
compile 'com.google.android.gms:play-services-analytics:10.2.1'
133134
}
134135

135136
// Run this once to be able to run the application with BUCK

example/android/app/src/main/AndroidManifest.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@
2424
<action android:name="android.intent.action.MAIN" />
2525
<category android:name="android.intent.category.LAUNCHER" />
2626
</intent-filter>
27+
<intent-filter>
28+
<action android:name="android.intent.action.VIEW" />
29+
30+
<category android:name="android.intent.category.DEFAULT" />
31+
<category android:name="android.intent.category.BROWSABLE" />
32+
<data android:scheme="adjustExample" />
33+
</intent-filter>
2734
</activity>
35+
2836
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
2937
</application>
30-
3138
</manifest>

example/index.android.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
'use strict';
22

33
import React, { Component } from 'react';
4-
import {
5-
AppRegistry,
6-
StyleSheet,
7-
Text,
8-
View,
9-
Navigator,
10-
TouchableHighlight
11-
} from 'react-native';
4+
import { AppRegistry, StyleSheet, Text, View, Navigator, TouchableHighlight } from 'react-native';
125

136
import Screen1 from './Screen1';
147
import Screen2 from './Screen2';

0 commit comments

Comments
 (0)