diff --git a/CHANGELOG.md b/CHANGELOG.md index d53382a5..57010af0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # React Native Module Changelog +## Version 19.1.0 - July 17, 2024 +Minor release that fixes enabling or disabling all Airship features using `FEATURES_ALL` and adds possibility to enable and disable `Feature.FeatureFlags`. + +### Changes +- Fixed enabling or disabling features using `FEATURE_ALL`. +- Added possibility to enable and disable `Feature.FeatureFlags` using the privacy manager. + ## Version 19.0.0 - July 9, 2024 Major release that updates the Android Airship SDK to 18. diff --git a/ios/AirshipReactNative.swift b/ios/AirshipReactNative.swift index a57d82b6..c6f732ec 100644 --- a/ios/AirshipReactNative.swift +++ b/ios/AirshipReactNative.swift @@ -36,7 +36,7 @@ public class AirshipReactNative: NSObject { AirshipProxy.shared } - public static let version: String = "19.0.0" + public static let version: String = "19.1.0" private let eventNotifier = EventNotifier() diff --git a/package.json b/package.json index 61f8fcff..3df9b11e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ua/react-native-airship", - "version": "19.0.0", + "version": "19.1.0", "description": "Airship plugin for React Native apps.", "main": "lib/commonjs/index", "module": "lib/module/index", diff --git a/src/AirshipPrivacyManager.ts b/src/AirshipPrivacyManager.ts index 77d16e2f..00a887bb 100644 --- a/src/AirshipPrivacyManager.ts +++ b/src/AirshipPrivacyManager.ts @@ -12,7 +12,11 @@ export class AirshipPrivacyManager { * @returns A promise. */ public setEnabledFeatures(features: Feature[]): Promise { - return this.module.privacyManagerSetEnabledFeatures(features); + return this.module.privacyManagerSetEnabledFeatures( + features.filter(feature => + feature !== Feature.Location && feature !== Feature.Chat + ) + ); } /** * Gets the current enabled features. @@ -28,7 +32,11 @@ export class AirshipPrivacyManager { * @returns A promise. */ public enableFeatures(features: Feature[]): Promise { - return this.module.privacyManagerEnableFeature(features); + return this.module.privacyManagerEnableFeature( + features.filter(feature => + feature !== Feature.Location && feature !== Feature.Chat + ) + ); } /** @@ -37,7 +45,11 @@ export class AirshipPrivacyManager { * @returns A promise. */ public disableFeatures(features: Feature[]): Promise { - return this.module.privacyManagerDisableFeature(features); + return this.module.privacyManagerDisableFeature( + features.filter(feature => + feature !== Feature.Location && feature !== Feature.Chat + ) + ); } /** @@ -46,6 +58,10 @@ export class AirshipPrivacyManager { * @returns A promise with the result. */ public isFeaturesEnabled(features: Feature[]): Promise { - return this.module.privacyManagerIsFeatureEnabled(features); + return this.module.privacyManagerIsFeatureEnabled( + features.filter(feature => + feature !== Feature.Location && feature !== Feature.Chat + ) + ); } } diff --git a/src/types.ts b/src/types.ts index 3c7f93b4..ae7da1f6 100644 --- a/src/types.ts +++ b/src/types.ts @@ -540,19 +540,20 @@ export enum Feature { InAppAutomation = 'in_app_automation', MessageCenter = 'message_center', Push = 'push', - // No longer used - Chat = 'chat', Analytics = 'analytics', TagsAndAttributes = 'tags_and_attributes', Contacts = 'contacts', - // No longer used - Location = 'location', + FeatureFlags = 'feature_flags', + Location = 'location', // No longer used. To be removed in version 20.0.0. + Chat = 'chat', // No longer used. To be removed in version 20.0.0. } /** * All available features. */ -export const FEATURES_ALL = Object.values(Feature); +export const FEATURES_ALL = Object.values(Feature).filter(feature => + feature !== Feature.Location && feature !== Feature.Chat +); /** * Subscription Scope types.