Skip to content

Commit

Permalink
Release 18.0.0 (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlepinski authored Apr 18, 2024
1 parent ebec0e5 commit 5bf050c
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 248 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# React Native Module Changelog

## Version 18.0.0 - April 18, 2024
Major release that updates the iOS SDK to 18.1.0 and updates CustomEvents to be an interface instead of a class.

### Changes
- Replaced CustomEvent with an interface
- Update iOS SDK to 18.1.0
- Updated Android SDK to 17.8.0

## Version 17.3.0 - April 9, 2024
Minor release that fixes running Airship actions, exposes more custom event fields, and updates the iOS SDK to 17.9.1 and the Android SDK to 17.7.4.

Expand Down
4 changes: 2 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Airship_targetSdkVersion=31
Airship_compileSdkVersion=31
Airship_ndkversion=21.4.7075529

Airship_airshipProxyVersion=5.4.2
Airship_airshipProxyVersion=6.0.0

# workaround for now, used for HMS
Airship_airshipVersion=17.7.4
Airship_airshipVersion=17.8.0

2 changes: 1 addition & 1 deletion example/ios/AirshipExtender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class AirshipExtender: NSObject {
if (Airship.isFlying) {
self.shared.airshipReady()
} else {
NotificationCenter.default.addObserver(forName: Airship.airshipReadyNotification, object: nil, queue: nil) { _ in
NotificationCenter.default.addObserver(forName: AirshipNotifications.AirshipReady.name, object: nil, queue: nil) { _ in
Task { @MainActor in
self.shared.airshipReady()
}
Expand Down
4 changes: 3 additions & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ prepare_react_native_project!
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
#flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
flipper_config = FlipperConfiguration.disabled


linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Expand Down
142 changes: 21 additions & 121 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
PODS:
- Airship (17.9.1):
- Airship/Automation (= 17.9.1)
- Airship/Basement (= 17.9.1)
- Airship/Core (= 17.9.1)
- Airship/FeatureFlags (= 17.9.1)
- Airship/MessageCenter (= 17.9.1)
- Airship/PreferenceCenter (= 17.9.1)
- Airship/Automation (17.9.1):
- Airship (18.1.0):
- Airship/Automation (= 18.1.0)
- Airship/Basement (= 18.1.0)
- Airship/Core (= 18.1.0)
- Airship/FeatureFlags (= 18.1.0)
- Airship/MessageCenter (= 18.1.0)
- Airship/PreferenceCenter (= 18.1.0)
- Airship/Automation (18.1.0):
- Airship/Core
- Airship/Basement (17.9.1)
- Airship/Core (17.9.1):
- Airship/Basement (18.1.0)
- Airship/Core (18.1.0):
- Airship/Basement
- Airship/FeatureFlags (17.9.1):
- Airship/FeatureFlags (18.1.0):
- Airship/Core
- Airship/MessageCenter (17.9.1):
- Airship/MessageCenter (18.1.0):
- Airship/Core
- Airship/PreferenceCenter (17.9.1):
- Airship/PreferenceCenter (18.1.0):
- Airship/Core
- AirshipFrameworkProxy (5.4.2):
- Airship (= 17.9.1)
- AirshipFrameworkProxy (6.0.0):
- Airship (= 18.1.0)
- boost (1.83.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- FBLazyVector (0.73.4)
- FBReactNativeSpec (0.73.4):
Expand All @@ -30,69 +29,12 @@ PODS:
- React-Core (= 0.73.4)
- React-jsi (= 0.73.4)
- ReactCommon/turbomodule/core (= 0.73.4)
- Flipper (0.201.0):
- Flipper-Folly (~> 2.6)
- Flipper-Boost-iOSX (1.76.0.1.11)
- Flipper-DoubleConversion (3.2.0.1)
- Flipper-Fmt (7.1.7)
- Flipper-Folly (2.6.10):
- Flipper-Boost-iOSX
- Flipper-DoubleConversion
- Flipper-Fmt (= 7.1.7)
- Flipper-Glog
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.1100)
- Flipper-Glog (0.5.0.5)
- Flipper-PeerTalk (0.0.4)
- FlipperKit (0.201.0):
- FlipperKit/Core (= 0.201.0)
- FlipperKit/Core (0.201.0):
- Flipper (~> 0.201.0)
- FlipperKit/CppBridge
- FlipperKit/FBCxxFollyDynamicConvert
- FlipperKit/FBDefines
- FlipperKit/FKPortForwarding
- SocketRocket (~> 0.6.0)
- FlipperKit/CppBridge (0.201.0):
- Flipper (~> 0.201.0)
- FlipperKit/FBCxxFollyDynamicConvert (0.201.0):
- Flipper-Folly (~> 2.6)
- FlipperKit/FBDefines (0.201.0)
- FlipperKit/FKPortForwarding (0.201.0):
- CocoaAsyncSocket (~> 7.6)
- Flipper-PeerTalk (~> 0.0.4)
- FlipperKit/FlipperKitHighlightOverlay (0.201.0)
- FlipperKit/FlipperKitLayoutHelpers (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutTextSearchable
- FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutHelpers
- FlipperKit/FlipperKitLayoutPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutHelpers
- FlipperKit/FlipperKitLayoutIOSDescriptors
- FlipperKit/FlipperKitLayoutTextSearchable
- FlipperKit/FlipperKitLayoutTextSearchable (0.201.0)
- FlipperKit/FlipperKitNetworkPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitReactPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/SKIOSNetworkPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitNetworkPlugin
- fmt (6.2.1)
- glog (0.3.5)
- hermes-engine (0.73.4):
- hermes-engine/Pre-built (= 0.73.4)
- hermes-engine/Pre-built (0.73.4)
- libevent (2.1.12)
- OpenSSL-Universal (1.1.1100)
- RCT-Folly (2022.05.16.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -964,8 +906,8 @@ PODS:
- React-Mapbuffer (0.73.4):
- glog
- React-debug
- react-native-airship (17.3.0):
- AirshipFrameworkProxy (= 5.4.2)
- react-native-airship (18.0.0):
- AirshipFrameworkProxy (= 6.0.0)
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1160,30 +1102,9 @@ DEPENDENCIES:
- 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`)
- Flipper (= 0.201.0)
- Flipper-Boost-iOSX (= 1.76.0.1.11)
- Flipper-DoubleConversion (= 3.2.0.1)
- Flipper-Fmt (= 7.1.7)
- Flipper-Folly (= 2.6.10)
- Flipper-Glog (= 0.5.0.5)
- Flipper-PeerTalk (= 0.0.4)
- FlipperKit (= 0.201.0)
- FlipperKit/Core (= 0.201.0)
- FlipperKit/CppBridge (= 0.201.0)
- FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0)
- FlipperKit/FBDefines (= 0.201.0)
- FlipperKit/FKPortForwarding (= 0.201.0)
- FlipperKit/FlipperKitHighlightOverlay (= 0.201.0)
- FlipperKit/FlipperKitLayoutPlugin (= 0.201.0)
- FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0)
- FlipperKit/FlipperKitNetworkPlugin (= 0.201.0)
- FlipperKit/FlipperKitReactPlugin (= 0.201.0)
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0)
- FlipperKit/SKIOSNetworkPlugin (= 0.201.0)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.1100)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
Expand All @@ -1192,7 +1113,6 @@ DEPENDENCIES:
- React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
- React-Codegen (from `build/generated/ios`)
- React-Core (from `../node_modules/react-native/`)
- React-Core/DevSupport (from `../node_modules/react-native/`)
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
Expand Down Expand Up @@ -1240,18 +1160,8 @@ SPEC REPOS:
trunk:
- Airship
- AirshipFrameworkProxy
- CocoaAsyncSocket
- Flipper
- Flipper-Boost-iOSX
- Flipper-DoubleConversion
- Flipper-Fmt
- Flipper-Folly
- Flipper-Glog
- Flipper-PeerTalk
- FlipperKit
- fmt
- libevent
- OpenSSL-Universal
- SocketRocket

EXTERNAL SOURCES:
Expand Down Expand Up @@ -1366,26 +1276,16 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
Airship: 930309dbea14bafe98a8fac8e3ab5bd90ab95501
AirshipFrameworkProxy: 9affee5911eeae2a780ecc7c3d854a5b38b0bfd3
Airship: e8909d114578d2261c35317dae00d28fb88ea13b
AirshipFrameworkProxy: 00ff8982696d9cf56c0988c188a592b360fa0fc5
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
FBLazyVector: 84f6edbe225f38aebd9deaf1540a4160b1f087d7
FBReactNativeSpec: d0086a479be91c44ce4687a962956a352d2dc697
Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
hermes-engine: b2669ce35fc4ac14f523b307aff8896799829fe2
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
RCTRequired: ab7f915c15569f04a49669e573e6e319a53f9faa
RCTTypeSafety: 63b97ced7b766865057e7154db0e81ce4ee6cf1e
Expand All @@ -1407,7 +1307,7 @@ SPEC CHECKSUMS:
React-jsinspector: 9ac353eccf6ab54d1e0a33862ba91221d1e88460
React-logger: 0a57b68dd2aec7ff738195f081f0520724b35dab
React-Mapbuffer: 63913773ed7f96b814a2521e13e6d010282096ad
react-native-airship: 9db31c6a6dac4e6bd75a725cf41670fee944df5c
react-native-airship: de4e6966f54deb2793ec5c74c4d4de20d97910bf
react-native-safe-area-context: b97eb6f9e3b7f437806c2ce5983f479f8eb5de4b
React-nativeconfig: d7af5bae6da70fa15ce44f045621cf99ed24087c
React-NativeModulesApple: 0123905d5699853ac68519607555a9a4f5c7b3ac
Expand Down Expand Up @@ -1436,6 +1336,6 @@ SPEC CHECKSUMS:
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312

PODFILE CHECKSUM: 3f922145d5b466e93ac6b2f7b25d99d387fc5d01
PODFILE CHECKSUM: 00970602deac51bebd3cda0a7edd25646b1ae303

COCOAPODS: 1.15.2
11 changes: 8 additions & 3 deletions 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 = "17.3.0"
public static let version: String = "18.0.0"

private let eventNotifier = EventNotifier()

Expand Down Expand Up @@ -287,8 +287,8 @@ public extension AirshipReactNative {

@objc
@MainActor
func pushSetBadgeNumber(_ badgeNumber: Double) throws {
try AirshipProxy.shared.push.setBadgeNumber(Int(badgeNumber))
func pushSetBadgeNumber(_ badgeNumber: Double) async throws {
try await AirshipProxy.shared.push.setBadgeNumber(Int(badgeNumber))
}

@objc
Expand Down Expand Up @@ -344,6 +344,7 @@ public extension AirshipReactNative {
@objc
public extension AirshipReactNative {

@MainActor
func analyticsTrackScreen(_ screen: String?) throws {
try AirshipProxy.shared.analytics.trackScreen(screen)
}
Expand Down Expand Up @@ -409,20 +410,24 @@ public extension AirshipReactNative {
@objc
public extension AirshipReactNative {

@MainActor
func inAppIsPaused() throws -> NSNumber {
return try NSNumber(
value: AirshipProxy.shared.inApp.isPaused()
)
}

@MainActor
func inAppSetPaused(_ paused: Bool) throws {
try AirshipProxy.shared.inApp.setPaused(paused)
}

@MainActor
func inAppSetDisplayInterval(milliseconds: Double) throws {
try AirshipProxy.shared.inApp.setDisplayInterval(Int(milliseconds))
}

@MainActor
func inAppGetDisplayInterval() throws -> NSNumber {
return try NSNumber(
value: AirshipProxy.shared.inApp.getDisplayInterval()
Expand Down
9 changes: 6 additions & 3 deletions ios/RTNAirship.mm
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,13 @@ + (BOOL)requiresMainQueueSetup {
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject) {
NSError *error;
[AirshipReactNative.shared pushSetBadgeNumber:badgeNumber
error:&error];

[self handleResult:nil error:error resolve:resolve reject:reject];
[AirshipReactNative.shared pushSetBadgeNumber:badgeNumber completionHandler:^(NSError *error) {
[self handleResult:nil
error:error
resolve:resolve
reject:reject];
}];
}

RCT_REMAP_METHOD(pushIosSetForegroundPresentationOptions,
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": "17.3.0",
"version": "18.0.0",
"description": "Airship plugin for React Native apps.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
5 changes: 1 addition & 4 deletions react-native-airship.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end



s.dependency "AirshipFrameworkProxy", "5.4.2"

s.dependency "AirshipFrameworkProxy", "6.0.0"
end
4 changes: 2 additions & 2 deletions src/AirshipAnalytics.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomEvent } from "./CustomEvent";
import { CustomEvent } from "./types";

/**
* Airship analytics.
Expand Down Expand Up @@ -33,6 +33,6 @@ export class AirshipAnalytics {
* custom event is rejected.
*/
public addCustomEvent(event: CustomEvent): Promise<void> {
return this.module.addCustomEvent(event.toJsonValue());
return this.module.addCustomEvent(event);
}
}
Loading

0 comments on commit 5bf050c

Please sign in to comment.