Skip to content

Commit 218bfe9

Browse files
crowcrow
and
crow
authored
Release 17.2.0 (urbanairship#549)
* CHANGELOG * Run version update script * Update Android and iOS to latest airship framework proxy * Add tip to example README * Migrate from react-native 0.71.1 to 0.73.4 * Get examples running * Update CHANGELOG date * Update ci.yml Update Xcode and print cocoapods version * Update gemfile * Try avoiding pod-install npm package * Update node version * Try pod install in ci script * Try explicitly installing cocoapods 1.15.2 and ruby 3.0.1 * Update ci.yml to run ios first * Update java version in ci.yml --------- Co-authored-by: crow <[email protected]>
1 parent 8e42c11 commit 218bfe9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+18475
-30199
lines changed

.github/workflows/ci.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,22 @@ jobs:
77
runs-on: macos-13-xlarge
88
steps:
99
- uses: actions/checkout@v4
10-
- name: Set up JDK 11
10+
- name: Set up JDK 17
1111
uses: actions/setup-java@v3
1212
with:
1313
distribution: 'temurin'
14-
java-version: '11'
15-
16-
- name: Select Xcode version
17-
run: sudo xcode-select -s '/Applications/Xcode_15.0.1.app/Contents/Developer'
14+
java-version: '17'
1815

16+
- name: Set up Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: '3.0.1'
20+
21+
- name: Install CocoaPods
22+
run: gem install cocoapods -v '1.15.2'
23+
24+
- name: Select Xcode version
25+
run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer'
1926

2027
- name: Setup Node.js
2128
uses: actions/setup-node@v4
@@ -24,5 +31,5 @@ jobs:
2431
cache: 'npm'
2532

2633
- run: npm run bootstrap
27-
- run: bash ./scripts/run_ci_tasks.sh -a
2834
- run: bash ./scripts/run_ci_tasks.sh -i
35+
- run: bash ./scripts/run_ci_tasks.sh -a

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.18.1
1+
21.6.1

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# React Native Module Changelog
22

3+
## Version 17.2.0 - February 15, 2024
4+
Minor release that updates the iOS SDK to 17.7.3 and Android SDK to 17.7.2, modernizes the podspec and updates NPM dependencies flagged during security audit.
5+
6+
### Changes
7+
- Updated iOS SDK to 17.7.3
8+
- Updated Android SDK to 17.7.2
9+
- Adds `install_modules_dependencies` to podspec to support for the latest react-native 0.73.3
10+
- Updates NPM dependencies to address security audit
11+
312
## Version 17.1.1 - December 6, 2023
413
Patch release that fixes missing annotations on feature flag methods, makes the `airshipHmsEnabled` flag available and updates examples.
514

android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Airship_targetSdkVersion=31
44
Airship_compileSdkVersion=31
55
Airship_ndkversion=21.4.7075529
66

7-
Airship_airshipProxyVersion=5.1.0
7+
Airship_airshipProxyVersion=5.1.1
88

99
# workaround for now, used for HMS
1010
Airship_airshipVersion=17.6.0

example/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
root: true,
3-
extends: '@react-native-community',
3+
extends: '@react-native',
44
};

example/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,6 @@ buck-out/
5757

5858
# CocoaPods
5959
/ios/Pods/
60+
61+
# testing
62+
/coverage

example/.node-version

-1
This file was deleted.

example/.ruby-version

-1
This file was deleted.

example/Gemfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby File.read(File.join(__dir__, '.ruby-version')).strip
5-
6-
gem 'cocoapods', '~> 1.11', '>= 1.11.3'
4+
ruby ">= 3.0.1"
5+
6+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7+
# bound in the template on Cocoapods with next React Native release.
8+
gem 'cocoapods', '>= 1.15.2', '< 1.16'
9+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Airship.takeOff({
3333

3434
### iOS
3535

36-
1) Run `pod install --repo-update` in `example/ios`
36+
1) Run `pod install --repo-update` in `example/ios`. If you receive an error, try deleting the Podfile.lock and re-installing.
3737

3838
2) Start the webserver in the top-level directory by running `npx react-native start`
3939

example/android/app/build.gradle

+7-55
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34

4-
import com.android.build.OutputFile
5-
65
/**
76
* This is the configuration block to customize your React Native Android app.
87
* By default you don't need to apply any configuration, just uncomment the lines you need.
@@ -13,8 +12,9 @@ react {
1312
// root = file("../")
1413
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
1514
// reactNativeDir = file("../node_modules/react-native")
16-
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
17-
// codegenDir = file("../node_modules/react-native-codegen")
15+
16+
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
17+
// codegenDir = file("../node_modules/@react-native/codegen")
1818
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
1919
// cliFile = file("../node_modules/react-native/cli.js")
2020

@@ -52,14 +52,6 @@ react {
5252
// hermesFlags = ["-O", "-output-source-map"]
5353
}
5454

55-
/**
56-
* Set this to true to create four separate APKs instead of one,
57-
* one for each native architecture. This is useful if you don't
58-
* use App Bundles (https://developer.android.com/guide/app-bundle/)
59-
* and want to have separate APKs to upload to the Play Store.
60-
*/
61-
def enableSeparateBuildPerCPUArchitecture = false
62-
6355
/**
6456
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
6557
*/
@@ -78,20 +70,11 @@ def enableProguardInReleaseBuilds = false
7870
*/
7971
def jscFlavor = 'org.webkit:android-jsc:+'
8072

81-
/**
82-
* Private function to get the list of Native Architectures you want to build.
83-
* This reads the value from reactNativeArchitectures in your gradle.properties
84-
* file and works together with the --active-arch-only flag of react-native run-android.
85-
*/
86-
def reactNativeArchitectures() {
87-
def value = project.getProperties().get("reactNativeArchitectures")
88-
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
89-
}
90-
9173
android {
9274
ndkVersion rootProject.ext.ndkVersion
9375

94-
compileSdkVersion rootProject.ext.compileSdkVersion
76+
buildToolsVersion rootProject.ext.buildToolsVersion
77+
compileSdk rootProject.ext.compileSdkVersion
9578

9679
namespace "com.urbanairship.sample"
9780
defaultConfig {
@@ -102,51 +85,20 @@ android {
10285
versionName "1.0"
10386
}
10487

105-
splits {
106-
abi {
107-
reset()
108-
enable enableSeparateBuildPerCPUArchitecture
109-
universalApk false // If true, also generate a universal APK
110-
include (*reactNativeArchitectures())
111-
}
112-
}
11388
buildTypes {
11489
debug {}
11590
release {
11691
minifyEnabled enableProguardInReleaseBuilds
11792
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
11893
}
11994
}
120-
121-
// applicationVariants are e.g. debug, release
122-
applicationVariants.all { variant ->
123-
variant.outputs.each { output ->
124-
// For each separate APK per architecture, set a unique version code as described here:
125-
// https://developer.android.com/studio/build/configure-apk-splits.html
126-
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
127-
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
128-
def abi = output.getFilter(OutputFile.ABI)
129-
if (abi != null) { // null for the universal-debug, universal-release variants
130-
output.versionCodeOverride =
131-
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
132-
}
133-
134-
}
135-
}
13695
}
13796

13897
dependencies {
13998
// The version of react-native is set by the React Native Gradle Plugin
14099
implementation("com.facebook.react:react-android")
100+
implementation("com.facebook.react:flipper-integration")
141101

142-
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
143-
144-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
145-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
146-
exclude group:'com.squareup.okhttp3', module:'okhttp'
147-
}
148-
149-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
150102
if (hermesEnabled.toBoolean()) {
151103
implementation("com.facebook.react:hermes-android")
152104
} else {

example/android/app/src/debug/AndroidManifest.xml

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44

5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6-
75
<application
86
android:usesCleartextTraffic="true"
97
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
8+
tools:ignore="GoogleAppIndexingWarning"/>
139
</manifest>

example/android/app/src/debug/java/com/urbanairship/sample/ReactNativeFlipper.java

-75
This file was deleted.

example/android/app/src/main/java/com/urbanairship/sample/MainActivity.java

-35
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.urbanairship.sample
2+
3+
import com.facebook.react.ReactActivity
4+
import com.facebook.react.ReactActivityDelegate
5+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6+
import com.facebook.react.defaults.DefaultReactActivityDelegate
7+
8+
class MainActivity : ReactActivity() {
9+
/**
10+
* Returns the name of the main component registered from JavaScript. This is used to schedule
11+
* rendering of the component.
12+
*/
13+
override fun getMainComponentName(): String = "AirshipExample"
14+
/**
15+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
16+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
17+
*/
18+
override fun createReactActivityDelegate(): ReactActivityDelegate =
19+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
20+
}

0 commit comments

Comments
 (0)