Skip to content

Commit 3927c72

Browse files
2.2.0 (#138)
* chore(release): bump version * chore(release): update changelog * chore(release): update iOS SDK version * chore(release): update Android SDK version * fix(lifecycle-events-config): use correct setter for lifeCycleEventsEnabled * chore(release): update iOS example * chore(release): update gradle settings * chore(release): update ndk and target sdk * chore(upgrade): upgrade to react native 0.77 and update example accordingly * chore(release): update react native version requirement in README * chore(deps): update yarn.lock files --------- Co-authored-by: Sebastian Simson <[email protected]>
1 parent 562cd84 commit 3927c72

File tree

19 files changed

+3318
-4040
lines changed

19 files changed

+3318
-4040
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 2.2.0 (2025-07-21)
4+
5+
- [#136](https://github.com/castle/castle-react-native/pull/136) Add lifecycle events config option.
6+
- Update Castle iOS SDK to 3.1.0.
7+
- Update Castle Android SDK to 3.1.0.
8+
39
## 2.1.1 (2025-03-31)
410

511
- [#131](https://github.com/castle/castle-react-native/pull/131) Remove duplicate userJwt method on android

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
## Requirements
1111

1212
### React Native
13-
- React Native 0.76.9+
13+
- React Native 0.77.0+
1414

1515
### iOS
1616
- iOS 15.1+

android/build.gradle

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.4.2'
12+
classpath 'com.android.tools.build:gradle:8.2.2'
1313
// noinspection DifferentKotlinGradleVersion
1414
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1515
}
1616
}
1717

1818
apply plugin: 'com.android.library'
19-
apply plugin: 'kotlin-android'
19+
apply plugin: 'org.jetbrains.kotlin.android'
2020

2121
def getExtOrDefault(name) {
2222
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['Castle_' + name]
@@ -27,6 +27,7 @@ def getExtOrIntegerDefault(name) {
2727
}
2828

2929
android {
30+
namespace = "com.reactnativecastle"
3031
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
3132
buildToolsVersion getExtOrDefault('buildToolsVersion')
3233
defaultConfig {
@@ -119,11 +120,22 @@ repositories {
119120
}
120121
}
121122

123+
subprojects {
124+
configurations.all {
125+
resolutionStrategy.eachDependency {
126+
if (requested.group == "org.jetbrains.kotlin") {
127+
useVersion("$kotlin_version")
128+
because("Align all Kotlin versions to avoid metadata issues")
129+
}
130+
}
131+
}
132+
}
133+
122134
def kotlin_version = getExtOrDefault('kotlinVersion')
123135

124136
dependencies {
125137
// noinspection GradleDynamicVersion
126138
api 'com.facebook.react:react-native:+'
127139
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
128-
api 'io.castle.android:castle:3.0.10'
140+
api 'io.castle.android:castle:3.1.0'
129141
}

android/gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Castle_kotlinVersion=1.9.21
1+
Castle_kotlinVersion=2.1.20
22
Castle_compileSdkVersion=34
3-
Castle_buildToolsVersion=30.0.3
4-
Castle_targetSdkVersion=34
3+
Castle_buildToolsVersion=35.0.0
4+
Castle_targetSdkVersion=35
55
android.useAndroidX=true

example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ buildscript {
22
ext {
33
buildToolsVersion = "34.0.0"
44
minSdkVersion = 24
5-
compileSdkVersion = 34
5+
compileSdkVersion = 35
66
targetSdkVersion = 34
7-
ndkVersion = "26.1.10909125"
8-
kotlinVersion = "1.9.24"
7+
ndkVersion = "27.1.12297006"
8+
kotlinVersion = "2.0.21"
99
}
1010
repositories {
1111
google()

example/ios/CastleExample.xcodeproj/project.pbxproj

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
1110
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
12-
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1311
532E0611E0C56E470189E591 /* libPods-CastleExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B5F3EE976AFAD5D53153C839 /* libPods-CastleExample.a */; };
1412
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
1513
9EB2394123E1745F9D9D92F0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 0D2312465685223C87B663F6 /* PrivacyInfo.xcprivacy */; };
14+
B6A09F982E2F925C00505B0A /* Appdelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6A09F972E2F925C00505B0A /* Appdelegate.swift */; };
1615
/* End PBXBuildFile section */
1716

1817
/* Begin PBXContainerItemProxy section */
@@ -28,17 +27,15 @@
2827
/* Begin PBXFileReference section */
2928
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
3029
00E356EE1AD99517003FC87E /* CastleExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CastleExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
31-
0D2312465685223C87B663F6 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = CastleExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
30+
0D2312465685223C87B663F6 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = CastleExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3231
13B07F961A680F5B00A75B9A /* CastleExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CastleExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
33-
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = CastleExample/AppDelegate.h; sourceTree = "<group>"; };
34-
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = CastleExample/AppDelegate.mm; sourceTree = "<group>"; };
3532
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = CastleExample/Images.xcassets; sourceTree = "<group>"; };
3633
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = CastleExample/Info.plist; sourceTree = "<group>"; };
37-
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = CastleExample/main.m; sourceTree = "<group>"; };
3834
19781D9CC10C3637F42736B6 /* Pods-CastleExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CastleExample.release.xcconfig"; path = "Target Support Files/Pods-CastleExample/Pods-CastleExample.release.xcconfig"; sourceTree = "<group>"; };
3935
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = CastleExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
4036
94571458C340E4FCBBD7504F /* Pods-CastleExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CastleExample.debug.xcconfig"; path = "Target Support Files/Pods-CastleExample/Pods-CastleExample.debug.xcconfig"; sourceTree = "<group>"; };
4137
B5F3EE976AFAD5D53153C839 /* libPods-CastleExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CastleExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
38+
B6A09F972E2F925C00505B0A /* Appdelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Appdelegate.swift; path = CastleExample/Appdelegate.swift; sourceTree = "<group>"; };
4239
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4340
/* End PBXFileReference section */
4441

@@ -65,12 +62,10 @@
6562
isa = PBXGroup;
6663
children = (
6764
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
68-
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
69-
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
65+
B6A09F972E2F925C00505B0A /* Appdelegate.swift */,
7066
13B07FB51A68108700A75B9A /* Images.xcassets */,
7167
13B07FB61A68108700A75B9A /* Info.plist */,
7268
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
73-
13B07FB71A68108700A75B9A /* main.m */,
7469
0D2312465685223C87B663F6 /* PrivacyInfo.xcprivacy */,
7570
);
7671
name = CastleExample;
@@ -180,7 +175,7 @@
180175
TestTargetID = 13B07F861A680F5B00A75B9A;
181176
};
182177
13B07F861A680F5B00A75B9A = {
183-
LastSwiftMigration = 1120;
178+
LastSwiftMigration = 1640;
184179
};
185180
};
186181
};
@@ -294,6 +289,7 @@
294289
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
295290
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
296291
"${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle",
292+
"${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle",
297293
);
298294
name = "[CP] Copy Pods Resources";
299295
outputPaths = (
@@ -302,6 +298,7 @@
302298
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
303299
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
304300
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle",
301+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle",
305302
);
306303
runOnlyForDeploymentPostprocessing = 0;
307304
shellPath = /bin/sh;
@@ -341,8 +338,7 @@
341338
isa = PBXSourcesBuildPhase;
342339
buildActionMask = 2147483647;
343340
files = (
344-
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
345-
13B07FC11A68108700A75B9A /* main.m in Sources */,
341+
B6A09F982E2F925C00505B0A /* Appdelegate.swift in Sources */,
346342
);
347343
runOnlyForDeploymentPostprocessing = 0;
348344
};
@@ -416,6 +412,7 @@
416412
);
417413
PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativecastle;
418414
PRODUCT_NAME = CastleExample;
415+
SWIFT_OBJC_BRIDGING_HEADER = "";
419416
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
420417
SWIFT_VERSION = 5.0;
421418
VERSIONING_SYSTEM = "apple-generic";
@@ -439,6 +436,7 @@
439436
);
440437
PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativecastle;
441438
PRODUCT_NAME = CastleExample;
439+
SWIFT_OBJC_BRIDGING_HEADER = "";
442440
SWIFT_VERSION = 5.0;
443441
VERSIONING_SYSTEM = "apple-generic";
444442
};

example/ios/CastleExample/AppDelegate.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/ios/CastleExample/AppDelegate.mm

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import UIKit
2+
import React
3+
import React_RCTAppDelegate
4+
import ReactAppDependencyProvider
5+
6+
@main
7+
class AppDelegate: RCTAppDelegate {
8+
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
9+
self.moduleName = "CastleExample"
10+
self.dependencyProvider = RCTAppDependencyProvider()
11+
12+
// You can add your custom initial props in the dictionary below.
13+
// They will be passed down to the ViewController used by React Native.
14+
self.initialProps = [:]
15+
16+
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
17+
}
18+
19+
override func sourceURL(for bridge: RCTBridge) -> URL? {
20+
self.bundleURL()
21+
}
22+
23+
override func bundleURL() -> URL? {
24+
#if DEBUG
25+
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
26+
#else
27+
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
28+
#endif
29+
}
30+
}

example/ios/File.swift

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)