Skip to content

Commit

Permalink
Release 14.3.0 (#426)
Browse files Browse the repository at this point in the history
* Update to latest SDKs

* Use new preference center config method

* Update changelog
  • Loading branch information
rlepinski authored May 4, 2022
1 parent bc8f7c9 commit 6e17c3c
Show file tree
Hide file tree
Showing 22 changed files with 579 additions and 556 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# React Native Module Changelog

## Version 14.3.0 - May 4, 2022
Minor release that updates Airship Android SDK to 16.4.0, and iOS SDK to 16.6.0. These SDK releases fix several issues with Scenes and Surveys. Apps using Scenes & Surveys should update.

- Added support for randomizing Survey responses.
- Added subscription list action.
- Updated localizations. All strings within the SDK are now localized in 48 different languages.
- Improved accessibility with OOTB Message Center UI.
- In-App rules will now attempt to refresh before displaying. This change should reduce the chances of showing out of data or cancelled in-app automations, scenes, or surveys when background refresh is disabled.
- Fixed reporting issue with a single page Scene.
- Fixed rendering issues for Scenes & Surveys.
- Fixed deep links that contain invalid characters by encoding those deep links.
- Fixed crash on Android 8 with Scenes & Surveys.
- Fixed Survey attribute storage on Android.


## Version 14.2.1 - April 26, 2022
Patch release that fixes a bug with notification response callback.

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ end
target 'ServiceExtension' do
platform :ios, '11.0'
# Pods for Service Extension
pod 'AirshipServiceExtension', '~> 16.5.1'
pod 'AirshipServiceExtension', '~> 16.6.0'
end

# https://github.com/software-mansion/react-native-screens/issues/842
Expand Down
66 changes: 33 additions & 33 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
PODS:
- Airship (16.5.1):
- Airship/Automation (= 16.5.1)
- Airship/Basement (= 16.5.1)
- Airship/Core (= 16.5.1)
- Airship/ExtendedActions (= 16.5.1)
- Airship/MessageCenter (= 16.5.1)
- Airship/Accengage (16.5.1):
- Airship (16.6.0):
- Airship/Automation (= 16.6.0)
- Airship/Basement (= 16.6.0)
- Airship/Core (= 16.6.0)
- Airship/ExtendedActions (= 16.6.0)
- Airship/MessageCenter (= 16.6.0)
- Airship/Accengage (16.6.0):
- Airship/Core
- Airship/Automation (16.5.1):
- Airship/Automation (16.6.0):
- Airship/Core
- Airship/Basement (16.5.1)
- Airship/Chat (16.5.1):
- Airship/Basement (16.6.0)
- Airship/Chat (16.6.0):
- Airship/Core
- Airship/Core (16.5.1):
- Airship/Core (16.6.0):
- Airship/Basement
- Airship/ExtendedActions (16.5.1):
- Airship/ExtendedActions (16.6.0):
- Airship/Core
- Airship/MessageCenter (16.5.1):
- Airship/MessageCenter (16.6.0):
- Airship/Core
- Airship/PreferenceCenter (16.5.1):
- Airship/PreferenceCenter (16.6.0):
- Airship/Core
- AirshipServiceExtension (16.5.1)
- AirshipServiceExtension (16.6.0)
- boost-for-react-native (1.63.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.64.0)
Expand Down Expand Up @@ -299,24 +299,24 @@ PODS:
- React-Core
- RNScreens (2.18.1):
- React-Core
- urbanairship-accengage-react-native (14.2.1):
- Airship/Accengage (= 16.5.1)
- urbanairship-accengage-react-native (14.3.0):
- Airship/Accengage (= 16.6.0)
- React-Core
- urbanairship-chat-react-native (14.2.1):
- Airship/Chat (= 16.5.1)
- urbanairship-chat-react-native (14.3.0):
- Airship/Chat (= 16.6.0)
- React-Core
- urbanairship-react-native
- urbanairship-preference-center-react-native (14.2.1):
- Airship/PreferenceCenter (= 16.5.1)
- urbanairship-preference-center-react-native (14.3.0):
- Airship/PreferenceCenter (= 16.6.0)
- React-Core
- urbanairship-react-native
- urbanairship-react-native (14.2.1):
- Airship (= 16.5.1)
- urbanairship-react-native (14.3.0):
- Airship (= 16.6.0)
- React-Core
- Yoga (1.14.0)

DEPENDENCIES:
- AirshipServiceExtension (~> 16.5.1)
- AirshipServiceExtension (~> 16.6.0)
- DoubleConversion (from `../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../../node_modules/react-native/React/FBReactNativeSpec`)
Expand Down Expand Up @@ -440,12 +440,12 @@ EXTERNAL SOURCES:
:path: "../../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
Airship: bf52d0e97be1c974ec021a5ed9b195ce0ef1b195
AirshipServiceExtension: 1990e8e5be8710ee2b37d4937d83eef60b584b9f
Airship: 976707cd192aebead4fde4246bcf86229078bae6
AirshipServiceExtension: 36efe25642746cc030844116d59fb366b26da76f
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 49cbe4b43e445b06bf29199b6ad2057649e4c8f5
FBReactNativeSpec: 2323ee42e2adfca409ee74ca1d9c914ff6f2eb2d
FBReactNativeSpec: 58cfc0f9b7f9454a6308e786859e74cdec2d7965
glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c
RCTRequired: 2f8cb5b7533219bf4218a045f92768129cf7050a
Expand Down Expand Up @@ -475,12 +475,12 @@ SPEC CHECKSUMS:
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNReanimated: c1b56d030d1616239861534d9adb531f8cffab68
RNScreens: f7ad633b2e0190b77b6a7aab7f914fad6f198d8d
urbanairship-accengage-react-native: 51f898060a246227640de02aff7bc10ae69e5c0e
urbanairship-chat-react-native: fa302be338ebaaf42bf93e5bf7a4c50cdc5adfe3
urbanairship-preference-center-react-native: 3d48c416fc940d3c1dc2e76ef2d51ce319638280
urbanairship-react-native: 68be482450ed56e00b91bd27f1c51f4f1969f742
urbanairship-accengage-react-native: ddd5c01429223e5767e8d10e6afbf3dd01028aae
urbanairship-chat-react-native: f2abec1031277cd7464071c062f8681d8993a72a
urbanairship-preference-center-react-native: c41d7d845cf7424d7bb3cc160be49be8665f76d6
urbanairship-react-native: b19a4dacfc547239783cbb89b32bb691c424c7c6
Yoga: 8c8436d4171c87504c648ae23b1d81242bdf3bbf

PODFILE CHECKSUM: 467e5bcc1f28b13a37798d5457a30ec70e3072b6
PODFILE CHECKSUM: 0ac33f74cca01098af99ab55a29cc63c7ef373f6

COCOAPODS: 1.11.2
COCOAPODS: 1.11.3
2 changes: 1 addition & 1 deletion urbanairship-accengage-react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
import groovy.json.JsonSlurper

ext {
airshipVersion = "16.3.3"
airshipVersion = "16.4.0"
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#import "AirshipAccengageReactModuleVersion.h"

NSString *const moduleVersionString = @"14.2.1";
NSString *const moduleVersionString = @"14.3.0";

@implementation AirshipAccengageReactModuleVersion

Expand Down
2 changes: 1 addition & 1 deletion urbanairship-accengage-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urbanairship-accengage-react-native",
"version": "14.2.1",
"version": "14.3.0",
"description": "Airship accengage module for React Native apps.",
"author": "Airship",
"homepage": "https://github.com/urbanairship/react-native-module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.dependency "React-Core"
s.dependency "Airship/Accengage", "16.5.1"
s.dependency "Airship/Accengage", "16.6.0"

end

2 changes: 1 addition & 1 deletion urbanairship-chat-react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
import groovy.json.JsonSlurper

ext {
airshipVersion = "16.3.3"
airshipVersion = "16.4.0"
}

android {
Expand Down
2 changes: 1 addition & 1 deletion urbanairship-chat-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urbanairship-chat-react-native",
"version": "14.2.1",
"version": "14.3.0",
"description": "Airship chat module for React Native apps.",
"author": "Airship",
"homepage": "https://github.com/urbanairship/react-native-module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.dependency "React-Core"
s.dependency "Airship/Chat", "16.5.1"
s.dependency "Airship/Chat", "16.6.0"
s.dependency "urbanairship-react-native"
end

2 changes: 1 addition & 1 deletion urbanairship-hms-react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
import groovy.json.JsonSlurper

ext {
airshipVersion = "16.3.3"
airshipVersion = "16.4.0"
}

android {
Expand Down
2 changes: 1 addition & 1 deletion urbanairship-hms-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urbanairship-hms-react-native",
"version": "14.2.1",
"version": "14.3.0",
"description": "Airship HMS module for React Native apps.",
"author": "Airship",
"homepage": "https://github.com/urbanairship/react-native-module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
import groovy.json.JsonSlurper

ext {
airshipVersion = "16.3.3"
airshipVersion = "16.4.0"
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,15 @@

package com.urbanairship.reactnative.preferenceCenter;

import android.annotation.SuppressLint;
import android.preference.PreferenceManager;

import androidx.annotation.NonNull;

import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.module.annotations.ReactModule;
import com.urbanairship.PendingResult;
import com.urbanairship.UAirship;
import com.urbanairship.json.JsonList;
import com.urbanairship.json.JsonMap;
import com.urbanairship.json.JsonValue;
import com.urbanairship.preferencecenter.PreferenceCenter;
import com.urbanairship.reactive.Observable;
import com.urbanairship.reactive.Subscriber;
import com.urbanairship.reactnative.Event;
import com.urbanairship.reactnative.EventEmitter;
import com.urbanairship.reactnative.ReactAirshipPreferences;
Expand Down Expand Up @@ -69,7 +60,7 @@ public void getConfiguration(String preferenceCenterId, final Promise promise) {
return;
}

getConfigJson(preferenceCenterId).addResultCallback(result -> {
PreferenceCenter.shared().getJsonConfig(preferenceCenterId).addResultCallback(result -> {
if (result == null) {
promise.reject(new Exception("Failed to get preference center configuration."));
return;
Expand All @@ -83,33 +74,4 @@ public void getConfiguration(String preferenceCenterId, final Promise promise) {
public void setUseCustomPreferenceCenterUi(boolean useCustomUI, String preferenceID) {
preferences.setAutoLaunchPreferenceCenter(preferenceID, !useCustomUI);
}

@SuppressLint("RestrictedApi")
private PendingResult<JsonValue> getConfigJson(final String prefCenterId) {
PendingResult<JsonValue> result = new PendingResult<>();

UAirship.shared().getRemoteData().payloadsForType("preference_forms")
.flatMap((payload) -> {
JsonList forms = payload.getData().opt("preference_forms").optList();
for (JsonValue formJson : forms) {
JsonMap formMap = formJson.optMap().opt("form").optMap();
if (formMap.opt("id").optString().equals(prefCenterId)) {
return Observable.just(formMap.toJsonValue());
}
}
return Observable.empty();
}).distinctUntilChanged()
.subscribe(new Subscriber<JsonValue>() {
@Override
public void onNext(@NonNull JsonValue value) {
result.setResult(value);
}

@Override
public void onError(@NonNull Exception e) {
result.setResult(null);
}
});
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,11 @@ - (instancetype)init {
return;
}

UARemoteDataManager *remoteData = (UARemoteDataManager *)[UAirship componentForClassName:@"UARemoteDataManager"];

__block UADisposable *disposable = [remoteData subscribeWithTypes:@[@"preference_forms"] block:^(NSArray<UARemoteDataPayload *> *payloads) {
NSArray *forms = [payloads firstObject].data[@"preference_forms"];

id result;
for (id form in forms) {
NSString *formID = form[@"form"][@"id"];
if ([formID isEqualToString:preferenceCenterId]) {
result = form[@"form"];
break;
}
}

[disposable dispose];
resolve(result);
[[UAPreferenceCenter shared] jsonConfigForPreferenceCenterID:preferenceCenterId completionHandler:^(NSDictionary *config) {
resolve(config);
}];
}


- (void)onAirshipReady {
[UAPreferenceCenter shared].openDelegate = self;
}
Expand Down
2 changes: 1 addition & 1 deletion urbanairship-preference-center-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urbanairship-preference-center-react-native",
"version": "14.2.1",
"version": "14.3.0",
"description": "Airship preference center module for React Native apps.",
"author": "Airship",
"homepage": "https://github.com/urbanairship/react-native-module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.dependency "React-Core"
s.dependency "Airship/PreferenceCenter", "16.5.1"
s.dependency "Airship/PreferenceCenter", "16.6.0"
s.dependency "urbanairship-react-native"
end
2 changes: 1 addition & 1 deletion urbanairship-react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
import groovy.json.JsonSlurper

ext {
airshipVersion = "16.3.3"
airshipVersion = "16.4.0"
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@implementation UARCTModuleVersion

NSString *const airshipModuleVersionString = @"14.2.1";
NSString *const airshipModuleVersionString = @"14.3.0";

+ (nonnull NSString *)get {
return airshipModuleVersionString;
Expand Down
2 changes: 1 addition & 1 deletion urbanairship-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urbanairship-react-native",
"version": "14.2.1",
"version": "14.3.0",
"description": "Airship plugin for React Native apps.",
"author": "Airship",
"homepage": "https://github.com/urbanairship/react-native-module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ require "json"
s.source = { :git => "https://github.com/urbanairship/react-native-module.git", :tag => "{s.version}" }
s.source_files = "ios/**/*.{h,m}"
s.dependency "React-Core"
s.dependency "Airship", "16.5.1"
s.dependency "Airship", "16.6.0"
end
Loading

0 comments on commit 6e17c3c

Please sign in to comment.