Skip to content

Commit 2ffe5fa

Browse files
authored
Merge pull request #490 from Countly/sdk-updates
Sdk version updates
2 parents ad62fef + 095177e commit 2ffe5fa

File tree

60 files changed

+3384
-446
lines changed

Some content is hidden

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

60 files changed

+3384
-446
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ countly-sdk-react-native-bridge-*.tgz
2222
example/AwesomeProject
2323
coverage/
2424
package-lock.json
25+
example/AwesomeProject/*
26+
example/ExpoProject/*

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": true
3+
"source.fixAll.eslint": "explicit"
44
},
55
"editor.defaultFormatter": "esbenp.prettier-vscode",
66
"editor.formatOnSave": true,

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## 25.4.0
2+
* ! Minor breaking change ! The SDK now exclusively uses random UUIDs for device id generation instead of platform specific OpenUDID or IDFV.
3+
* ! Minor breaking change ! Server Configuration is now enabled by default. Changes made on SDK Manager > SDK Configuration on your server will affect SDK behavior directly.
4+
5+
* Added `refreshContentZone()` method for manual refresh of content zone
6+
* Added `disableBackoffMechanism()` init config method for disabling request backoff logic
7+
* Added `disableSDKBehaviorSettingsUpdates()` init config method for disabling server config sync requests
8+
* Added `setSDKBehaviorSettings(settingsObject: object)` init config method for providing server config settings
9+
* Added New Architecture (Turbo Modules) support
10+
* Added fullscreen support for feedback widgets
11+
* Added support for SDK health checks in iOS
12+
* Added a built-in backoff mechanism when server responses are slow
13+
14+
* Mitigated an issue that caused PN message data collision if two message with same ID was received in Android
15+
* Mitigated an issue that could occur while serializing events to improve stability, performance and memory usage in iOS
16+
* Mitigated an issue where the safe area resolution was not correctly calculated for the content zone on certain iOS devices.
17+
18+
* Updated the underlying Android SDK version to 25.4.2
19+
* Updated the underlying iOS SDK version to 25.4.3
20+
121
## 25.1.2
222
* Mitigated an issue where the visibility tracking could have been enabled by default
323

Countly.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ declare module "countly-sdk-react-native-bridge" {
211211
*/
212212
export function enterContentZone(): void;
213213

214+
/**
215+
* Refreshes the content zone.
216+
*/
217+
export function refreshContentZone(): void;
218+
214219
/**
215220
* Opt out user from the content fetching and updates
216221
*/
@@ -1454,6 +1459,26 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
14541459
* @param {object} attributionValues attribution values
14551460
*/
14561461
recordIndirectAttribution(attributionValues: object): CountlyConfig;
1462+
1463+
/**
1464+
* Method to disable SDK behavior settings updates requests.
1465+
* @return {CountlyConfig}
1466+
*/
1467+
disableSDKBehaviorSettingsUpdates(): CountlyConfig;
1468+
1469+
/**
1470+
* Method to disable backoff mechanism for requests.
1471+
* @return {CountlyConfig}
1472+
*/
1473+
disableBackoffMechanism(): CountlyConfig;
1474+
1475+
/**
1476+
* Method to set SDK behavior settings.
1477+
*
1478+
* @param {object} settingsObject settings object
1479+
* @return {CountlyConfig}
1480+
*/
1481+
setSDKBehaviorSettings(settingsObject: object): CountlyConfig;
14571482
}
14581483

14591484
export default CountlyConfig;

Countly.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,6 @@ Countly.setCustomMetrics = async function (customMetric) {
22042204
/**
22052205
* Opt in user for the content fetching and updates
22062206
*
2207-
* NOTE: This is an EXPERIMENTAL feature, and it can have breaking changes
22082207
*/
22092208
Countly.content.enterContentZone = function() {
22102209
L.i("enterContentZone, opting for content fetching.");
@@ -2216,10 +2215,22 @@ Countly.content.enterContentZone = function() {
22162215
CountlyNativeModule.enterContentZone();
22172216
};
22182217

2218+
/**
2219+
* Refreshes the content zone.
2220+
*/
2221+
Countly.content.refreshContentZone = function() {
2222+
L.i("refreshContentZone, refreshing content zone.");
2223+
if (!_state.isInitialized) {
2224+
const message = "'init' must be called before 'refreshContentZone'";
2225+
L.e(`refreshContentZone, ${message}`);
2226+
return;
2227+
}
2228+
CountlyNativeModule.refreshContentZone();
2229+
};
2230+
22192231
/**
22202232
* Opt out user from the content fetching and updates
22212233
*
2222-
* NOTE: This is an EXPERIMENTAL feature, and it can have breaking changes
22232234
*/
22242235
Countly.content.exitContentZone = function() {
22252236
L.i("exitContentZone, opting out from content fetching.");

CountlyConfig.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,17 @@ import CountlyConfigContent from "./lib/configuration_interfaces/countly_config_
1818
*/
1919
class CountlyConfig {
2020
#crashReporting = false;
21+
2122
#apmLegacy = false;
23+
2224
#disableIntentRedirectionCheck = false;
25+
26+
#disableSDKBehaviorSettingsUpdates = false;
27+
28+
#disableBackoff = false;
29+
30+
#sdkBehaviorSettings;
31+
2332
constructor(serverURL, appKey) {
2433
this.serverURL = serverURL;
2534
this.appKey = appKey;
@@ -69,6 +78,18 @@ class CountlyConfig {
6978
return this.#disableIntentRedirectionCheck;
7079
}
7180

81+
get _disableSDKBehaviorSettingsUpdates() {
82+
return this.#disableSDKBehaviorSettingsUpdates;
83+
}
84+
85+
get _disableBackoff() {
86+
return this.#disableBackoff;
87+
}
88+
89+
get _sdkBehaviorSettings() {
90+
return this.#sdkBehaviorSettings;
91+
}
92+
7293
/**
7394
* Method to set the server url
7495
*
@@ -191,6 +212,31 @@ class CountlyConfig {
191212
return this;
192213
}
193214

215+
/**
216+
* Disables SDK behavior settings update requests.
217+
*/
218+
disableSDKBehaviorSettingsUpdates() {
219+
this.#disableSDKBehaviorSettingsUpdates = true;
220+
return this;
221+
}
222+
223+
/**
224+
* Disables the request backoff mechanism.
225+
*/
226+
disableBackoffMechanism() {
227+
this.#disableBackoff = true;
228+
return this;
229+
}
230+
231+
/**
232+
* Sets the SDK behavior settings.
233+
* @param {Object} settingsObject - SDK behavior settings object you can get from Countly server
234+
*/
235+
setSDKBehaviorSettings(settingsObject) {
236+
this.#sdkBehaviorSettings = settingsObject;
237+
return this;
238+
}
239+
194240
/**
195241
* Method to set the push token type
196242
* @deprecated

CountlyReactNative.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'CountlyReactNative'
3-
s.version = '25.1.2'
3+
s.version = '25.4.0'
44
s.license = {
55
:type => 'COMMUNITY',
66
:text => <<-LICENSE

0 commit comments

Comments
 (0)