Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 25.0.0 Changelog

## Version 25.4.0 - February 2, 2026

Minor release that updates MessageView event names to avoid collisions and pins the Swift version for iOS builds. No breaking API changes.

### Changes
- Namespaced MessageView UI event registration names
- Set the Swift version for the Airship React Native module

## Version 25.3.1 - November 14, 2025

Patch release that fixes YouTube video playback in In-App Automation and Scenes. Applications that use YouTube videos in Scenes and non-html In-App Automations (IAA) must update to resolve playback errors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,25 +137,25 @@ class ReactMessageView(context: Context) : FrameLayout(context), LifecycleEventL
event.putString(MESSAGE_ID_KEY, messageId)
event.putBoolean(RETRYABLE_KEY, retryable)
event.putString(ERROR_KEY, error)
notify(if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) EVENT_LOAD_ERROR else EVENT_LOAD_ERROR_HANDLER_NAME, event)
notify(EVENT_LOAD_ERROR, event)
}

private fun notifyLoadFinished(messageId: String) {
val event = Arguments.createMap()
event.putString(MESSAGE_ID_KEY, messageId)
notify(if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) EVENT_LOAD_FINISHED else EVENT_LOAD_FINISHED_HANDLER_NAME, event)
notify(EVENT_LOAD_FINISHED, event)
}

private fun notifyLoadStarted(messageId: String) {
val event = Arguments.createMap()
event.putString(MESSAGE_ID_KEY, messageId)
notify(if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) EVENT_LOAD_STARTED else EVENT_LOAD_STARTED_HANDLER_NAME, event)
notify(EVENT_LOAD_STARTED, event)
}

private fun notifyClose(messageId: String) {
val event = Arguments.createMap()
event.putString(MESSAGE_ID_KEY, messageId)
notify(if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) EVENT_CLOSE else EVENT_CLOSE_HANDLER_NAME, event)
notify(EVENT_CLOSE, event)
}

private fun notify(eventName: String, event: WritableMap) {
Expand Down Expand Up @@ -183,21 +183,16 @@ class ReactMessageView(context: Context) : FrameLayout(context), LifecycleEventL
}

companion object {
const val EVENT_LOAD_STARTED_REGISTRATION_NAME = "topLoadStarted"
const val EVENT_LOAD_FINISHED_REGISTRATION_NAME = "topLoadFinished"
const val EVENT_LOAD_ERROR_REGISTRATION_NAME = "topLoadError"
const val EVENT_CLOSE_REGISTRATION_NAME = "topClose"
const val EVENT_LOAD_STARTED = "topAirshipMessageViewLoadStarted"
const val EVENT_LOAD_FINISHED = "topAirshipMessageViewLoadFinished"
const val EVENT_LOAD_ERROR = "topAirshipMessageViewLoadError"
const val EVENT_CLOSE = "topAirshipMessageViewClose"

const val EVENT_LOAD_STARTED_HANDLER_NAME = "onLoadStarted"
const val EVENT_LOAD_FINISHED_HANDLER_NAME = "onLoadFinished"
const val EVENT_LOAD_ERROR_HANDLER_NAME = "onLoadError"
const val EVENT_CLOSE_HANDLER_NAME = "onClose"

const val EVENT_LOAD_STARTED = "loadStarted"
const val EVENT_LOAD_FINISHED = "loadFinished"
const val EVENT_LOAD_ERROR = "loadError"
const val EVENT_CLOSE = "close"

private const val MESSAGE_ID_KEY = "messageId"
private const val RETRYABLE_KEY = "retryable"
private const val ERROR_KEY = "error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,18 @@ class ReactMessageViewManager : SimpleViewManager<ReactMessageView>(),
}

override fun getExportedCustomBubblingEventTypeConstants(): Map<String, Any> {
val events = if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
listOf(
ReactMessageView.EVENT_CLOSE_REGISTRATION_NAME to ReactMessageView.EVENT_CLOSE_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_ERROR_REGISTRATION_NAME to ReactMessageView.EVENT_LOAD_ERROR_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_FINISHED_REGISTRATION_NAME to ReactMessageView.EVENT_LOAD_FINISHED_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_STARTED_REGISTRATION_NAME to ReactMessageView.EVENT_LOAD_STARTED_HANDLER_NAME
)
} else {
listOf(
ReactMessageView.EVENT_CLOSE_HANDLER_NAME to ReactMessageView.EVENT_CLOSE_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_ERROR_HANDLER_NAME to ReactMessageView.EVENT_LOAD_ERROR_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_FINISHED_HANDLER_NAME to ReactMessageView.EVENT_LOAD_FINISHED_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_STARTED_HANDLER_NAME to ReactMessageView.EVENT_LOAD_STARTED_HANDLER_NAME
)
}
val events = listOf(
ReactMessageView.EVENT_CLOSE to ReactMessageView.EVENT_CLOSE_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_ERROR to ReactMessageView.EVENT_LOAD_ERROR_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_FINISHED to ReactMessageView.EVENT_LOAD_FINISHED_HANDLER_NAME,
ReactMessageView.EVENT_LOAD_STARTED to ReactMessageView.EVENT_LOAD_STARTED_HANDLER_NAME
)

val builder = MapBuilder.builder<String, Any>()

for ((name, handlerName) in events) {
for ((internalName, handlerName) in events) {
builder.put(
name,
internalName,
MapBuilder.of(
"phasedRegistrationNames",
MapBuilder.of("bubbled", handlerName)
Expand Down
2 changes: 1 addition & 1 deletion ios/AirshipReactNative.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class AirshipReactNative: NSObject {
AirshipProxy.shared
}

public static let version: String = "25.3.1"
public static let version: String = "25.4.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": "25.3.1",
"version": "25.4.0",
"description": "Airship plugin for React Native apps.",
"source": "./src/index.tsx",
"main": "./lib/module/index.js",
Expand Down
1 change: 1 addition & 0 deletions react-native-airship.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Pod::Spec.new do |s|

s.platforms = { :ios => "15.0" }
s.source = { :git => "https://github.com/urbanairship/react-native-module.git", :tag => "#{s.version}" }
s.swift_version = "5.0"

s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
s.private_header_files = "ios/generated/**/*.h"
Expand Down
4 changes: 2 additions & 2 deletions scripts/run_ci_tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ if $IOS; then
PROJECT_PLATFORM_PATH="$(pwd)"
DERIVED_DATA=$(mktemp -d /tmp/ci-derived-data-XXXXX)
TARGET_SDK='iphonesimulator'
TEST_DESTINATION='platform=iOS Simulator,OS=18.4,name=iPhone 16 Pro Max'

TEST_DESTINATION='generic/platform=iOS Simulator'
# Use Debug configurations and a simulator SDK so the build process doesn't attempt to sign the output
xcrun xcodebuild -workspace "${PROJECT_PLATFORM_PATH}/AirshipExample.xcworkspace" -derivedDataPath "${DERIVED_DATA}" -scheme "AirshipExample" -configuration Debug -sdk $TARGET_SDK -destination "${TEST_DESTINATION}"

Expand Down
8 changes: 4 additions & 4 deletions src/RNAirshipMessageViewNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ interface NativeProps extends ViewProps {
messageId: string;
onLoadStarted: BubblingEventHandler<
MessageLoadStartedEvent,
'topLoadStarted'
'topAirshipMessageViewLoadStarted'
>;
onLoadFinished: BubblingEventHandler<
MessageLoadFinishedEvent,
'topLoadFinished'
'topAirshipMessageViewLoadFinished'
>;
onLoadError: BubblingEventHandler<MessageLoadErrorEvent, 'topLoadError'>;
onClose: BubblingEventHandler<MessageClosedEvent, 'topClose'>;
onLoadError: BubblingEventHandler<MessageLoadErrorEvent, 'topAirshipMessageViewLoadError'>;
onClose: BubblingEventHandler<MessageClosedEvent, 'topAirshipMessageViewClose'>;
}

export default codegenNativeComponent<NativeProps>('RNAirshipMessageView') as HostComponent<NativeProps>;