Skip to content

Commit 7f68b70

Browse files
authored
Merge pull request #70 from adjust/v4181
Version 4.18.1
2 parents 557c5b7 + 669b5a9 commit 7f68b70

File tree

9 files changed

+179
-188
lines changed

9 files changed

+179
-188
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[submodule "ext/android/sdk"]
22
path = ext/android/sdk
3-
url = git@github.com:adjust/android_sdk.git
3+
url = https://github.com/adjust/android_sdk.git
44
branch = master
55
[submodule "ext/ios/sdk"]
66
path = ext/ios/sdk
7-
url = git@github.com:adjust/ios_sdk.git
7+
url = https://github.com/adjust/ios_sdk.git
88
branch = master

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
### Version 4.18.1 (2nd July 2019)
2+
#### Fixed
3+
- Fixed compile errors when trying to use Adjust SDK with TypeScript 2.9 and higher (thanks to @rawrmaan).
4+
5+
#### Changed
6+
- Changed submodule endpoints from `SSH` to `HTTPS` (thanks to @rawrmaan).
7+
8+
#### Native SDKs
9+
- [[email protected]][ios_sdk_v4.18.0]
10+
- [[email protected]][android_sdk_v4.18.0]
11+
12+
---
13+
114
### Version 4.18.0 (1st July 2019)
215
#### Added
316
- Added `trackAdRevenue` method to `Adjust` interface to allow tracking of ad revenue. With this release added support for `MoPub` ad revenue tracking.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.18.0
1+
4.18.1

android/src/main/java/com/adjust/sdk/Adjust.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public void trackAdRevenue(String source, String payload) {
389389
try {
390390
JSONObject jsonPayload = new JSONObject(payload);
391391
com.adjust.sdk.Adjust.trackAdRevenue(source, jsonPayload);
392-
}catch (JSONException err){
392+
} catch (JSONException err) {
393393
Log.d(TAG, "Give ad revenue payload is not a valid JSON string");
394394
}
395395
}

index.d.ts

Lines changed: 154 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,177 +1,155 @@
1-
declare module "react-native-adjust" {
2-
type Environment = "sandbox" | "production";
3-
4-
enum LogLevel {
5-
Verbose,
6-
Debug,
7-
Info,
8-
Warn,
9-
Error,
10-
Assert,
11-
Suppress
12-
}
13-
14-
interface AdjustAttribution {
15-
trackerToken: string;
16-
trackerName: string;
17-
network: string;
18-
campaign: string;
19-
adgroup: string;
20-
creative: string;
21-
clickLabel: string;
22-
adid: string;
23-
}
24-
25-
interface AdjustEventTrackingSuccess {
26-
message: string;
27-
timestamp: string;
28-
adid: string;
29-
eventToken: string;
30-
callbackId: string;
31-
jsonResponse: string;
32-
}
33-
34-
interface AdjustEventTrackingFailure {
35-
message: string;
36-
timestamp: string;
37-
adid: string;
38-
eventToken: string;
39-
callbackId: string;
40-
willRetry: boolean;
41-
jsonResponse: string;
42-
}
43-
44-
interface AdjustSessionTrackingSuccess {
45-
message: string;
46-
timestamp: string;
47-
adid: string;
48-
jsonResponse: string;
49-
}
50-
51-
interface AdjustSessionTrackingFailure {
52-
message: string;
53-
timestamp: string;
54-
adid: string;
55-
willRetry: boolean;
56-
jsonResponse: string;
57-
}
58-
59-
interface AdjustUri {
60-
uri: string;
61-
}
62-
63-
export class AdjustConfig {
64-
constructor(appToken: string, environment: Environment) { }
65-
66-
public setLogLevel(level: LogLevel): void { }
67-
68-
public setEventBufferingEnabled(isEnabled: boolean): void { }
69-
70-
public setProcessName(processName: string): void { }
71-
72-
public setDefaultTracker(defaultTracked: string): void { }
73-
74-
public setUserAgent(userAgent: string): void { }
75-
76-
public setAppSecret(secretId: number, info1: number, info2: number, info3: number, info4: number): void { }
77-
78-
public setDelayStart(delayStart: number): void { }
79-
80-
public setSendInBackground(sendInBackground: boolean): void { }
81-
82-
public setDeviceKnown(isDeviceKnown: boolean): void { }
83-
84-
public setSdkPrefix(sdkPrefix: string): void { }
85-
86-
public setShouldLaunchDeeplink(shouldLaunchDeeplink: boolean): void { }
87-
88-
public setAttributionCallbackListener(callback: (attribution: AdjustAttribution) => void): void { }
89-
90-
public setEventTrackingSucceededCallbackListener(callback: (eventSuccess: AdjustEventTrackingSuccess) => void): void { }
91-
92-
public setEventTrackingFailedCallbackListener(callback: (eventFailed: AdjustEventTrackingFailure) => void): void { }
93-
94-
public setSessionTrackingSucceededCallbackListener(callback: (sessionSuccess: AdjustSessionTrackingSuccess) => void): void { }
95-
96-
public setSessionTrackingFailedCallbackListener(callback: (sessionFailed: AdjustSessionTrackingFailure) => void): void { }
97-
98-
public setDeferredDeeplinkCallbackListener(callback: (uri: AdjustUri) => void): void { }
99-
100-
static get LogLevelVerbose(): LogLevel {
101-
return LogLevel.Verbose;
102-
}
103-
104-
static get LogLevelDebug(): LogLevel {
105-
return LogLevel.Debug;
106-
}
107-
108-
static get LogLevelInfo(): LogLevel {
109-
return LogLevel.Info;
110-
}
111-
112-
static get LogLevelWarn(): LogLevel {
113-
return LogLevel.Warn;
114-
}
115-
116-
static get LogLevelError(): LogLevel {
117-
return LogLevel.Error;
118-
}
119-
120-
static get LogLevelAssert(): LogLevel {
121-
return LogLevel.Assert;
122-
}
123-
124-
static get LogLevelSuppress(): LogLevel {
125-
return LogLevel.Suppress;
126-
}
127-
128-
static get EnvironmentSandbox(): Environment {
129-
return "sandbox";
130-
}
131-
132-
static get EnvironmentProduction(): Environment {
133-
return "production";
134-
}
135-
}
136-
137-
export class AdjustEvent {
138-
constructor(eventToken: string) { }
139-
140-
public setRevenue(revenue: number, currency: string): void { }
141-
142-
public addCallbackParameter(key: string, value: string): void { }
143-
144-
public addPartnerParameter(key: string, value: string): void { }
145-
146-
public setTransactionId(transactionId: string): void { }
147-
148-
public setCallbackId(callbackId: string): void { }
149-
}
150-
151-
export const Adjust = {
152-
componentWillUnmount: (): void => { },
153-
create: (adjustConfig: AdjustConfig): void => { },
154-
trackEvent: (adjustEvent: AdjustEvent): void => { },
155-
setEnabled: (enabled: boolean): void => { },
156-
isEnabled: (callback: (enabled: boolean) => void): void => { },
157-
setOfflineMode: (enabled: boolean): void => { },
158-
setPushToken: (token: string): void => { },
159-
appWillOpenUrl: (url: string): void => { },
160-
sendFirstPackages: (): void => { },
161-
trackAdRevenue: (source: string, payload: string): void => { },
162-
addSessionCallbackParameter: (key: string, value: string): void => { },
163-
addSessionPartnerParameter: (key: string, value: string): void => { },
164-
removeSessionCallbackParameter: (key: string): void => { },
165-
removeSessionPartnerParameter: (key: string): void => { },
166-
resetSessionCallbackParameters: (): void => { },
167-
resetSessionPartnerParameters: (): void => { },
168-
gdprForgetMe: (): void => { },
169-
getIdfa: (callback: (idfa: string) => void): void => { },
170-
getGoogleAdId: (callback: (adid: string) => void): void => { },
171-
getAdid: (callback: (adid: string) => void): void => { },
172-
getAttribution: (callback: (attribution: AdjustAttribution) => void): void => { },
173-
getAmazonAdId: (callback: (adid: string) => void): void => { },
174-
getSdkVersion: (callback: (sdkVersion: string) => void): void => { },
175-
setReferrer: (referrer: string): void => { },
176-
};
1+
declare module 'react-native-adjust' {
2+
type Environment = 'sandbox' | 'production'
3+
type LogLevel = string
4+
5+
interface AdjustAttribution {
6+
trackerToken: string
7+
trackerName: string
8+
network: string
9+
campaign: string
10+
adgroup: string
11+
creative: string
12+
clickLabel: string
13+
adid: string
14+
}
15+
16+
interface AdjustEventTrackingSuccess {
17+
message: string
18+
timestamp: string
19+
adid: string
20+
eventToken: string
21+
callbackId: string
22+
jsonResponse: string
23+
}
24+
25+
interface AdjustEventTrackingFailure {
26+
message: string
27+
timestamp: string
28+
adid: string
29+
eventToken: string
30+
callbackId: string
31+
willRetry: boolean
32+
jsonResponse: string
33+
}
34+
35+
interface AdjustSessionTrackingSuccess {
36+
message: string
37+
timestamp: string
38+
adid: string
39+
jsonResponse: string
40+
}
41+
42+
interface AdjustSessionTrackingFailure {
43+
message: string
44+
timestamp: string
45+
adid: string
46+
willRetry: boolean
47+
jsonResponse: string
48+
}
49+
50+
interface AdjustUri {
51+
uri: string
52+
}
53+
54+
export class AdjustConfig {
55+
constructor(appToken: string, environment: Environment)
56+
57+
public setLogLevel(level: LogLevel): void
58+
59+
public setEventBufferingEnabled(isEnabled: boolean): void
60+
61+
public setProcessName(processName: string): void
62+
63+
public setDefaultTracker(defaultTracked: string): void
64+
65+
public setUserAgent(userAgent: string): void
66+
67+
public setAppSecret(
68+
secretId: number,
69+
info1: number,
70+
info2: number,
71+
info3: number,
72+
info4: number
73+
): void
74+
75+
public setDelayStart(delayStart: number): void
76+
77+
public setSendInBackground(sendInBackground: boolean): void
78+
79+
public setDeviceKnown(isDeviceKnown: boolean): void
80+
81+
public setSdkPrefix(sdkPrefix: string): void
82+
83+
public setShouldLaunchDeeplink(shouldLaunchDeeplink: boolean): void
84+
85+
public setAttributionCallbackListener(
86+
callback: (attribution: AdjustAttribution) => void
87+
): void
88+
89+
public setEventTrackingSucceededCallbackListener(
90+
callback: (eventSuccess: AdjustEventTrackingSuccess) => void
91+
): void
92+
93+
public setEventTrackingFailedCallbackListener(
94+
callback: (eventFailed: AdjustEventTrackingFailure) => void
95+
): void
96+
97+
public setSessionTrackingSucceededCallbackListener(
98+
callback: (sessionSuccess: AdjustSessionTrackingSuccess) => void
99+
): void
100+
101+
public setSessionTrackingFailedCallbackListener(
102+
callback: (sessionFailed: AdjustSessionTrackingFailure) => void
103+
): void
104+
105+
public setDeferredDeeplinkCallbackListener(
106+
callback: (uri: AdjustUri) => void
107+
): void
108+
109+
static LogLevelVerbose: LogLevel
110+
static LogLevelDebug: LogLevel
111+
static LogLevelInfo: LogLevel
112+
static LogLevelWarn: LogLevel
113+
static LogLevelError: LogLevel
114+
static LogLevelAssert: LogLevel
115+
static LogLevelSuppress: LogLevel
116+
static EnvironmentSandbox: Environment
117+
static EnvironmentProduction: Environment
118+
}
119+
120+
export class AdjustEvent {
121+
constructor(eventToken: string)
122+
public setRevenue(revenue: number, currency: string): void
123+
public addCallbackParameter(key: string, value: string): void
124+
public addPartnerParameter(key: string, value: string): void
125+
public setTransactionId(transactionId: string): void
126+
public setCallbackId(callbackId: string): void
127+
}
128+
129+
export const Adjust: {
130+
componentWillUnmount: () => void
131+
create: (adjustConfig: AdjustConfig) => void
132+
trackEvent: (adjustEvent: AdjustEvent) => void
133+
setEnabled: (enabled: boolean) => void
134+
isEnabled: (callback: (enabled: boolean) => void) => void
135+
setOfflineMode: (enabled: boolean) => void
136+
setPushToken: (token: string) => void
137+
appWillOpenUrl: (url: string) => void
138+
sendFirstPackages: () => void
139+
trackAdRevenue: (source: string, payload: string) => void
140+
addSessionCallbackParameter: (key: string, value: string) => void
141+
addSessionPartnerParameter: (key: string, value: string) => void
142+
removeSessionCallbackParameter: (key: string) => void
143+
removeSessionPartnerParameter: (key: string) => void
144+
resetSessionCallbackParameters: () => void
145+
resetSessionPartnerParameters: () => void
146+
gdprForgetMe: () => void
147+
getIdfa: (callback: (idfa: string) => void) => void
148+
getGoogleAdId: (callback: (adid: string) => void) => void
149+
getAdid: (callback: (adid: string) => void) => void
150+
getAttribution: (callback: (attribution: AdjustAttribution) => void) => void
151+
getAmazonAdId: (callback: (adid: string) => void) => void
152+
getSdkVersion: (callback: (sdkVersion: string) => void) => void
153+
setReferrer: (referrer: string) => void
154+
}
177155
}

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Adjust.getAmazonAdId = function(callback) {
110110
};
111111

112112
Adjust.getSdkVersion = function(callback) {
113-
module_adjust.getSdkVersion("react-native4.18.0", callback);
113+
module_adjust.getSdkVersion("react-native4.18.1", callback);
114114
}
115115

116116
Adjust.setReferrer = function(referrer) {
@@ -183,7 +183,7 @@ Adjust.onPause = function(testParam) {
183183
// AdjustConfig
184184

185185
var AdjustConfig = function(appToken, environment) {
186-
this.sdkPrefix = "react-native4.18.0";
186+
this.sdkPrefix = "react-native4.18.1";
187187
this.appToken = appToken;
188188
this.environment = environment;
189189
this.logLevel = null;

0 commit comments

Comments
 (0)