Skip to content

Commit

Permalink
Merge pull request #575 from urbanairship/MOBILE-4605
Browse files Browse the repository at this point in the history
[MOBILE-4605] Prepare minor version 19.1.0
  • Loading branch information
Ulrico972 authored Jul 17, 2024
2 parents 6df75ed + f53b634 commit 54b186b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion ios/AirshipReactNative.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
24 changes: 20 additions & 4 deletions src/AirshipPrivacyManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export class AirshipPrivacyManager {
* @returns A promise.
*/
public setEnabledFeatures(features: Feature[]): Promise<void> {
return this.module.privacyManagerSetEnabledFeatures(features);
return this.module.privacyManagerSetEnabledFeatures(
features.filter(feature =>
feature !== Feature.Location && feature !== Feature.Chat
)
);
}
/**
* Gets the current enabled features.
Expand All @@ -28,7 +32,11 @@ export class AirshipPrivacyManager {
* @returns A promise.
*/
public enableFeatures(features: Feature[]): Promise<void> {
return this.module.privacyManagerEnableFeature(features);
return this.module.privacyManagerEnableFeature(
features.filter(feature =>
feature !== Feature.Location && feature !== Feature.Chat
)
);
}

/**
Expand All @@ -37,7 +45,11 @@ export class AirshipPrivacyManager {
* @returns A promise.
*/
public disableFeatures(features: Feature[]): Promise<void> {
return this.module.privacyManagerDisableFeature(features);
return this.module.privacyManagerDisableFeature(
features.filter(feature =>
feature !== Feature.Location && feature !== Feature.Chat
)
);
}

/**
Expand All @@ -46,6 +58,10 @@ export class AirshipPrivacyManager {
* @returns A promise with the result.
*/
public isFeaturesEnabled(features: Feature[]): Promise<void> {
return this.module.privacyManagerIsFeatureEnabled(features);
return this.module.privacyManagerIsFeatureEnabled(
features.filter(feature =>
feature !== Feature.Location && feature !== Feature.Chat
)
);
}
}
11 changes: 6 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 54b186b

Please sign in to comment.