Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into embedded-poc
Browse files Browse the repository at this point in the history
# Conflicts:
#	android/gradle.properties
  • Loading branch information
rlepinski committed Aug 29, 2024
2 parents 47ebad4 + 75f68af commit 96527ff
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 38 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# React Native Module Changelog

## Version 19.2.1 - August 23, 2024
Patch release that fixes an issue with extras parsing on notifications

### Changes
- Allow JsonObject accept undefined values
- Adds support for dynamic frameworks on iOS

## Version 19.2.0 - August 13, 2024
Minor release that fixes test devices audience check, holdout group experiments displays and in-app experience displays when resuming from a paused state. Apps that use in-app experiences are encouraged to update.

### Changes
- Updated Android SDK to 18.1.6.
- Updated iOS SDK to 18.7.2.
- Fixed test devices audience check.
- Fixed holdout group experiments displays.
- Fixed in-app experience displays when resuming from a paused state.

## 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 android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Airship_minSdkVersion=21
Airship_targetSdkVersion=34
Airship_compileSdkVersion=34
Airship_ndkversion=26.1.10909125
Airship_airshipProxyVersion=7.1.0
Airship_airshipProxyVersion=7.1.2
46 changes: 23 additions & 23 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
PODS:
- Airship (18.5.0):
- Airship/Automation (= 18.5.0)
- Airship/Basement (= 18.5.0)
- Airship/Core (= 18.5.0)
- Airship/FeatureFlags (= 18.5.0)
- Airship/MessageCenter (= 18.5.0)
- Airship/PreferenceCenter (= 18.5.0)
- Airship/Automation (18.5.0):
- Airship (18.7.2):
- Airship/Automation (= 18.7.2)
- Airship/Basement (= 18.7.2)
- Airship/Core (= 18.7.2)
- Airship/FeatureFlags (= 18.7.2)
- Airship/MessageCenter (= 18.7.2)
- Airship/PreferenceCenter (= 18.7.2)
- Airship/Automation (18.7.2):
- Airship/Core
- Airship/Basement (18.5.0)
- Airship/Core (18.5.0):
- Airship/Basement (18.7.2)
- Airship/Core (18.7.2):
- Airship/Basement
- Airship/FeatureFlags (18.5.0):
- Airship/FeatureFlags (18.7.2):
- Airship/Core
- Airship/MessageCenter (18.5.0):
- Airship/MessageCenter (18.7.2):
- Airship/Core
- Airship/PreferenceCenter (18.5.0):
- Airship/PreferenceCenter (18.7.2):
- Airship/Core
- AirshipFrameworkProxy (7.0.0):
- Airship (= 18.5.0)
- AirshipServiceExtension (18.5.0)
- AirshipFrameworkProxy (7.1.2):
- Airship (= 18.7.2)
- AirshipServiceExtension (18.7.2)
- boost (1.83.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.73.4)
Expand Down Expand Up @@ -907,8 +907,8 @@ PODS:
- React-Mapbuffer (0.73.4):
- glog
- React-debug
- react-native-airship (19.0.0):
- AirshipFrameworkProxy (= 7.0.0)
- react-native-airship (19.2.0):
- AirshipFrameworkProxy (= 7.1.2)
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1279,9 +1279,9 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
Airship: d4f6f81bf746285112b266840c6a5057c1d50f13
AirshipFrameworkProxy: f5644d0d564a6b63ae39c88aae016a869949be2c
AirshipServiceExtension: b3dc262db467632dac6bd2c9f5f30efb2a751fb2
Airship: bb32ff2c5a811352da074480357d9f02dbb8f327
AirshipFrameworkProxy: dbd862dc6fb21b13e8b196458d626123e2a43a50
AirshipServiceExtension: 9c73369f426396d9fb9ff222d86d842fac76ba46
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
FBLazyVector: 84f6edbe225f38aebd9deaf1540a4160b1f087d7
Expand Down Expand Up @@ -1311,7 +1311,7 @@ SPEC CHECKSUMS:
React-jsinspector: 9ac353eccf6ab54d1e0a33862ba91221d1e88460
React-logger: 0a57b68dd2aec7ff738195f081f0520724b35dab
React-Mapbuffer: 63913773ed7f96b814a2521e13e6d010282096ad
react-native-airship: 9818f07914c2e760f18a83bbd990e2d79299e3c8
react-native-airship: 54a39240587b06b2f683769a2ab838b7ee25b2e6
react-native-safe-area-context: b97eb6f9e3b7f437806c2ce5983f479f8eb5de4b
React-nativeconfig: d7af5bae6da70fa15ce44f045621cf99ed24087c
React-NativeModulesApple: 0123905d5699853ac68519607555a9a4f5c7b3ac
Expand Down Expand Up @@ -1342,4 +1342,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: dbd88b0cf2e018eeff600431486ded3ce68933fb

COCOAPODS: 1.15.2
COCOAPODS: 1.12.1
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.2.1"

private let eventNotifier = EventNotifier()

Expand Down
4 changes: 4 additions & 0 deletions ios/MessageWebViewWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ class _MessageWebViewWrapper: NSObject, UANavigationDelegate, NativeBridgeDelega
self.nativeBridge.nativeBridgeDelegate = self
self.webView.navigationDelegate = self.nativeBridge
self.webView.configuration.dataDetectorTypes = .all

if #available(iOS 16.4, *) {
self.webView.isInspectable = Airship.isFlying && Airship.config.isWebViewInspectionEnabled
}
}

@MainActor
Expand Down
7 changes: 7 additions & 0 deletions ios/RTNAirshipMessageView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ @interface RTNAirshipMessageView()<RTNAirshipMessageWebViewWrapperDelegate>
@implementation RTNAirshipMessageView

#ifdef RCT_NEW_ARCH_ENABLED

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
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.2.1",
"description": "Airship plugin for React Native apps.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
2 changes: 1 addition & 1 deletion react-native-airship.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

s.dependency "AirshipFrameworkProxy", "7.0.0"
s.dependency "AirshipFrameworkProxy", "7.1.2"
end
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
)
);
}
}
19 changes: 12 additions & 7 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type JsonValue =
| JsonArray;

export type JsonObject = {
[key: string]: JsonValue;
[key: string]: JsonValue | undefined;
};

export type JsonArray = JsonValue[];
Expand Down Expand Up @@ -481,11 +481,15 @@ export interface AirshipConfig {
*/
itunesId?: string;


/**
* If set to `true`, the SDK will use the preferred locale. Otherwise it will use the app's locale.
*/
useUserPreferredLocale?: boolean;

/**
* Allows the WebViews to be inspected in Safari.
*/
isWebViewInspectionEnabled?: boolean;
};

/**
Expand Down Expand Up @@ -540,19 +544,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 96527ff

Please sign in to comment.