Skip to content

Commit 54b186b

Browse files
authored
Merge pull request #575 from urbanairship/MOBILE-4605
[MOBILE-4605] Prepare minor version 19.1.0
2 parents 6df75ed + f53b634 commit 54b186b

File tree

5 files changed

+35
-11
lines changed

5 files changed

+35
-11
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# React Native Module Changelog
22

3+
## Version 19.1.0 - July 17, 2024
4+
Minor release that fixes enabling or disabling all Airship features using `FEATURES_ALL` and adds possibility to enable and disable `Feature.FeatureFlags`.
5+
6+
### Changes
7+
- Fixed enabling or disabling features using `FEATURE_ALL`.
8+
- Added possibility to enable and disable `Feature.FeatureFlags` using the privacy manager.
9+
310
## Version 19.0.0 - July 9, 2024
411
Major release that updates the Android Airship SDK to 18.
512

ios/AirshipReactNative.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class AirshipReactNative: NSObject {
3636
AirshipProxy.shared
3737
}
3838

39-
public static let version: String = "19.0.0"
39+
public static let version: String = "19.1.0"
4040

4141
private let eventNotifier = EventNotifier()
4242

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ua/react-native-airship",
3-
"version": "19.0.0",
3+
"version": "19.1.0",
44
"description": "Airship plugin for React Native apps.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

src/AirshipPrivacyManager.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ export class AirshipPrivacyManager {
1212
* @returns A promise.
1313
*/
1414
public setEnabledFeatures(features: Feature[]): Promise<void> {
15-
return this.module.privacyManagerSetEnabledFeatures(features);
15+
return this.module.privacyManagerSetEnabledFeatures(
16+
features.filter(feature =>
17+
feature !== Feature.Location && feature !== Feature.Chat
18+
)
19+
);
1620
}
1721
/**
1822
* Gets the current enabled features.
@@ -28,7 +32,11 @@ export class AirshipPrivacyManager {
2832
* @returns A promise.
2933
*/
3034
public enableFeatures(features: Feature[]): Promise<void> {
31-
return this.module.privacyManagerEnableFeature(features);
35+
return this.module.privacyManagerEnableFeature(
36+
features.filter(feature =>
37+
feature !== Feature.Location && feature !== Feature.Chat
38+
)
39+
);
3240
}
3341

3442
/**
@@ -37,7 +45,11 @@ export class AirshipPrivacyManager {
3745
* @returns A promise.
3846
*/
3947
public disableFeatures(features: Feature[]): Promise<void> {
40-
return this.module.privacyManagerDisableFeature(features);
48+
return this.module.privacyManagerDisableFeature(
49+
features.filter(feature =>
50+
feature !== Feature.Location && feature !== Feature.Chat
51+
)
52+
);
4153
}
4254

4355
/**
@@ -46,6 +58,10 @@ export class AirshipPrivacyManager {
4658
* @returns A promise with the result.
4759
*/
4860
public isFeaturesEnabled(features: Feature[]): Promise<void> {
49-
return this.module.privacyManagerIsFeatureEnabled(features);
61+
return this.module.privacyManagerIsFeatureEnabled(
62+
features.filter(feature =>
63+
feature !== Feature.Location && feature !== Feature.Chat
64+
)
65+
);
5066
}
5167
}

src/types.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -540,19 +540,20 @@ export enum Feature {
540540
InAppAutomation = 'in_app_automation',
541541
MessageCenter = 'message_center',
542542
Push = 'push',
543-
// No longer used
544-
Chat = 'chat',
545543
Analytics = 'analytics',
546544
TagsAndAttributes = 'tags_and_attributes',
547545
Contacts = 'contacts',
548-
// No longer used
549-
Location = 'location',
546+
FeatureFlags = 'feature_flags',
547+
Location = 'location', // No longer used. To be removed in version 20.0.0.
548+
Chat = 'chat', // No longer used. To be removed in version 20.0.0.
550549
}
551550

552551
/**
553552
* All available features.
554553
*/
555-
export const FEATURES_ALL = Object.values(Feature);
554+
export const FEATURES_ALL = Object.values(Feature).filter(feature =>
555+
feature !== Feature.Location && feature !== Feature.Chat
556+
);
556557

557558
/**
558559
* Subscription Scope types.

0 commit comments

Comments
 (0)