From 3adabbc9bd2f46d0c886d1a1b3dd567a1528b924 Mon Sep 17 00:00:00 2001 From: Ulrich GIBERNE Date: Wed, 9 Oct 2024 10:31:44 -0400 Subject: [PATCH 1/5] add missing MC methods in android old arch --- CHANGELOG.md | 6 ++++++ .../java/com/urbanairship/reactnative/AirshipModule.kt | 2 ++ .../java/com/urbanairship/reactnative/AirshipSpec.kt | 8 ++++++++ example/ios/Podfile.lock | 4 ++-- ios/AirshipReactNative.swift | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96e88a07..f2435801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # React Native Module Changelog +## Version 19.4.1 - October 9, 2024 +Patch release to fix a compile issue with the old Architecture on Android. + +### Changes +- Fixed compile issue when using old architecture on Android. + ## Version 19.4.0 - October 4, 2024 ### Changes diff --git a/android/src/main/java/com/urbanairship/reactnative/AirshipModule.kt b/android/src/main/java/com/urbanairship/reactnative/AirshipModule.kt index 78db1c7d..c28ff190 100644 --- a/android/src/main/java/com/urbanairship/reactnative/AirshipModule.kt +++ b/android/src/main/java/com/urbanairship/reactnative/AirshipModule.kt @@ -634,12 +634,14 @@ class AirshipModule internal constructor(val context: ReactApplicationContext) : proxy.messageCenter.setAutoLaunchDefaultMessageCenter(enabled) } + @ReactMethod override fun messageCenterShowMessageCenter(messageId: String?, promise: Promise) { promise.resolveResult { proxy.messageCenter.showMessageCenter(messageId) } } + @ReactMethod override fun messageCenterShowMessageView(messageId: String?, promise: Promise) { promise.resolveResult { proxy.messageCenter.showMessageView(requireNotNull(messageId)) diff --git a/android/src/oldarch/java/com/urbanairship/reactnative/AirshipSpec.kt b/android/src/oldarch/java/com/urbanairship/reactnative/AirshipSpec.kt index e2e2b8df..1bb77526 100644 --- a/android/src/oldarch/java/com/urbanairship/reactnative/AirshipSpec.kt +++ b/android/src/oldarch/java/com/urbanairship/reactnative/AirshipSpec.kt @@ -353,6 +353,14 @@ abstract class AirshipSpec internal constructor(context: ReactApplicationContext @com.facebook.proguard.annotations.DoNotStrip abstract fun messageCenterSetAutoLaunchDefaultMessageCenter(enabled: Boolean) + @ReactMethod + @com.facebook.proguard.annotations.DoNotStrip + abstract fun messageCenterShowMessageCenter(messageId: String?, promise: Promise) + + @ReactMethod + @com.facebook.proguard.annotations.DoNotStrip + abstract fun messageCenterShowMessageView(messageId: String?, promise: Promise) + @ReactMethod @com.facebook.proguard.annotations.DoNotStrip abstract fun preferenceCenterDisplay( diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 09fe476f..8cfaa5cc 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -907,7 +907,7 @@ PODS: - React-Mapbuffer (0.73.4): - glog - React-debug - - react-native-airship (19.4.0): + - react-native-airship (19.4.1): - AirshipFrameworkProxy (= 10.0.0) - glog - RCT-Folly (= 2022.05.16.00) @@ -1311,7 +1311,7 @@ SPEC CHECKSUMS: React-jsinspector: 9ac353eccf6ab54d1e0a33862ba91221d1e88460 React-logger: 0a57b68dd2aec7ff738195f081f0520724b35dab React-Mapbuffer: 63913773ed7f96b814a2521e13e6d010282096ad - react-native-airship: 4a8f69108b353db26bf57c47a247c819c63889f8 + react-native-airship: d8f5b6cd7f62135b13c31a5f2b2b4eb144819166 react-native-safe-area-context: b97eb6f9e3b7f437806c2ce5983f479f8eb5de4b React-nativeconfig: d7af5bae6da70fa15ce44f045621cf99ed24087c React-NativeModulesApple: 0123905d5699853ac68519607555a9a4f5c7b3ac diff --git a/ios/AirshipReactNative.swift b/ios/AirshipReactNative.swift index 76565f44..4933add2 100644 --- a/ios/AirshipReactNative.swift +++ b/ios/AirshipReactNative.swift @@ -39,7 +39,7 @@ public class AirshipReactNative: NSObject { AirshipProxy.shared } - public static let version: String = "19.4.0" + public static let version: String = "19.4.1" private let eventNotifier = EventNotifier() diff --git a/package-lock.json b/package-lock.json index b009ff3b..9b29be75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ua/react-native-airship", - "version": "19.3.2", + "version": "19.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ua/react-native-airship", - "version": "19.3.2", + "version": "19.4.0", "license": "Apache-2.0", "devDependencies": { "@commitlint/config-conventional": "^17.0.2", diff --git a/package.json b/package.json index 2aab0d0e..cd8face2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ua/react-native-airship", - "version": "19.4.0", + "version": "19.4.1", "description": "Airship plugin for React Native apps.", "main": "lib/commonjs/index", "module": "lib/module/index", From ba3712c0718d29444fc7844df29b27876ecc9968 Mon Sep 17 00:00:00 2001 From: Ulrich GIBERNE Date: Wed, 9 Oct 2024 10:47:34 -0400 Subject: [PATCH 2/5] package-lock.json --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b29be75..9e3a3fe0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ua/react-native-airship", - "version": "19.4.0", + "version": "19.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ua/react-native-airship", - "version": "19.4.0", + "version": "19.4.1", "license": "Apache-2.0", "devDependencies": { "@commitlint/config-conventional": "^17.0.2", From 7441ecf864c2c21d1fd65cc4e8cebd696ceece0b Mon Sep 17 00:00:00 2001 From: Ryan Lepinski Date: Wed, 9 Oct 2024 10:00:43 -0700 Subject: [PATCH 3/5] Add old arch CI --- .github/workflows/ci.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a46c5e5..82f55063 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: [pull_request] jobs: test: - runs-on: macos-13-xlarge + runs-on: macos-14-xlarge steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -33,3 +33,37 @@ jobs: - run: npm run bootstrap - run: bash ./scripts/run_ci_tasks.sh -i - run: bash ./scripts/run_ci_tasks.sh -a + + test-android-old-arch: + runs-on: macos-14-xlarge + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0.1' + + - name: Install CocoaPods + run: gem install cocoapods -v '1.15.2' + + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer' + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: 'npm' + + - run: | + sed -i '' 's/newArchEnabled=true/newArchEnabled=false/' example/android/gradle.properties + npm run bootstrap + run: bash ./scripts/run_ci_tasks.sh -a + + From a9b8f2857225454f9256e80a7b4b21ceb0ed7d45 Mon Sep 17 00:00:00 2001 From: Ryan Lepinski Date: Wed, 9 Oct 2024 10:06:51 -0700 Subject: [PATCH 4/5] Fix --- .github/workflows/ci.yml | 7 +++---- example/android/gradle.properties | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82f55063..a1934a72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,9 +61,8 @@ jobs: node-version-file: .nvmrc cache: 'npm' - - run: | - sed -i '' 's/newArchEnabled=true/newArchEnabled=false/' example/android/gradle.properties - npm run bootstrap - run: bash ./scripts/run_ci_tasks.sh -a + - run: sed -i '' 's/newArchEnabled=true/newArchEnabled=false/' example/android/gradle.properties + - run: npm run bootstrap + - run: bash ./scripts/run_ci_tasks.sh -a diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 2cc63729..2f117e04 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -34,7 +34,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=true +newArchEnabled=false # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. From cf0d2195c3ae1da87b1ac1a725486be63804b321 Mon Sep 17 00:00:00 2001 From: Ryan Lepinski Date: Wed, 9 Oct 2024 10:09:25 -0700 Subject: [PATCH 5/5] Fix --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1934a72..53a25077 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: [pull_request] jobs: test: - runs-on: macos-14-xlarge + runs-on: macos-13-xlarge steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -35,7 +35,7 @@ jobs: - run: bash ./scripts/run_ci_tasks.sh -a test-android-old-arch: - runs-on: macos-14-xlarge + runs-on: macos-13-xlarge steps: - uses: actions/checkout@v4 - name: Set up JDK 17