Skip to content

Commit b84403f

Browse files
authored
Update to RN v0.80.2 (#250)
* First pass at 0.78 -> 0.79.5 * Actually bump from 0.78->0.79.5 * Runs on example app, test app remote, test app local * 0.80.2 bump * add backwards moduleResolution fix * oops remove test ID * Some android-specific tweaks for 0.80 * Adjust the runner type and xcode version --------- Co-authored-by: Evan Masseau <>
1 parent 22fe183 commit b84403f

File tree

14 files changed

+1593
-1099
lines changed

14 files changed

+1593
-1099
lines changed

.github/workflows/ios-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ permissions:
1212

1313
jobs:
1414
build-ios:
15-
runs-on: macos-15-xlarge
15+
runs-on: macos-15
1616
env:
1717
TURBO_CACHE_DIR: .turbo/ios
18-
DEVELOPER_DIR: /Applications/Xcode_16.2.app/Contents/Developer
18+
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v4

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

android/gradlew

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -205,15 +205,15 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.
212212

213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

android/gradlew.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
2+
@REM
3+
@REM This source code is licensed under the MIT license found in the
4+
@REM LICENSE file in the root directory of this source tree.
5+
16
@rem
27
@rem Copyright 2015 the original author or authors.
38
@rem
@@ -70,11 +75,11 @@ goto fail
7075
:execute
7176
@rem Setup the command line
7277

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
78+
set CLASSPATH=
7479

7580

7681
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
82+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7883

7984
:end
8085
@rem End local scope for the variables with windows NT shell

android/local.properties.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
## Used for local SDK development, so that gradle can locate the
77
# correct RN version outside the context of an application
8-
reactNativeAndroidVersion=0.78.0
8+
reactNativeAndroidVersion=0.80.0
99

1010
# For local SDK development: set to true in your local.properties file
1111
# you must set separately for the example app and the library

android/src/main/java/com/klaviyoreactnativesdk/KlaviyoReactNativeSdkModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class KlaviyoReactNativeSdkModule(
5858
// Since initialize is being called after Application.onCreate,
5959
// we must hand over a reference to the current activity.
6060
// The native SDK will track Activity changes internally from here on.
61-
currentActivity?.let(Registry.lifecycleMonitor::assignCurrentActivity)
61+
reactApplicationContext.currentActivity?.let(Registry.lifecycleMonitor::assignCurrentActivity)
6262
Klaviyo.initialize(apiKey, reactContext)
6363
}
6464

example/android/app/src/main/java/com/klaviyoreactnativesdkexample/MainApplication.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ import android.util.Log
55
import com.facebook.react.PackageList
66
import com.facebook.react.ReactApplication
77
import com.facebook.react.ReactHost
8+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
89
import com.facebook.react.ReactNativeHost
910
import com.facebook.react.ReactPackage
10-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1111
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1212
import com.facebook.react.defaults.DefaultReactNativeHost
13-
import com.facebook.react.soloader.OpenSourceMergedSoMapping
14-
import com.facebook.soloader.SoLoader
1513
import com.google.firebase.messaging.FirebaseMessaging
1614
import com.klaviyo.analytics.Klaviyo
1715

@@ -39,11 +37,7 @@ class MainApplication :
3937

4038
override fun onCreate() {
4139
super.onCreate()
42-
SoLoader.init(this, OpenSourceMergedSoMapping)
43-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
44-
// If you opted-in for the New Architecture, we load the native entry point for this app.
45-
load()
46-
}
40+
loadReactNative(this)
4741

4842
if (BuildConfig.INITIALIZE_KLAVIYO_FROM_NATIVE) {
4943
// Android Installation Step 3: Initialize the SDK with public key and context, if initializing from native code

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
compileSdkVersion = 36
77
buildToolsVersion = "36.0.0"
88
ndkVersion = "27.1.12297006"
9-
kotlinVersion = "2.0.21"
9+
kotlinVersion = "2.1.20"
1010
}
1111
repositories {
1212
google()

example/ios/KlaviyoReactNativeSdkExample/Info.plist

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>klaviyo_app_group</key>
6-
<string>org.reactjs.native.example.KlaviyoReactNativeSdkExample.shared</string>
75
<key>CFBundleDevelopmentRegion</key>
86
<string>en</string>
97
<key>CFBundleDisplayName</key>
@@ -52,6 +50,8 @@
5250
</dict>
5351
<key>NSLocationWhenInUseUsageDescription</key>
5452
<string></string>
53+
<key>RCTNewArchEnabled</key>
54+
<true/>
5555
<key>UILaunchStoryboardName</key>
5656
<string>LaunchScreen</string>
5757
<key>UIRequiredDeviceCapabilities</key>
@@ -66,5 +66,7 @@
6666
</array>
6767
<key>UIViewControllerBasedStatusBarAppearance</key>
6868
<false/>
69+
<key>klaviyo_app_group</key>
70+
<string>org.reactjs.native.example.KlaviyoReactNativeSdkExample.shared</string>
6971
</dict>
7072
</plist>

example/ios/KlaviyoReactNativeSdkExampleExtension/Info.plist

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>klaviyo_app_group</key>
6-
<string>org.reactjs.native.example.KlaviyoReactNativeSdkExample.shared</string>
75
<key>NSExtension</key>
86
<dict>
97
<key>NSExtensionPointIdentifier</key>
108
<string>com.apple.usernotifications.service</string>
119
<key>NSExtensionPrincipalClass</key>
1210
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
1311
</dict>
12+
<key>RCTNewArchEnabled</key>
13+
<true/>
14+
<key>klaviyo_app_group</key>
15+
<string>org.reactjs.native.example.KlaviyoReactNativeSdkExample.shared</string>
1416
</dict>
1517
</plist>

0 commit comments

Comments
 (0)