Skip to content

Commit 156eda1

Browse files
Merge pull request #198 from mendix/moo/MOO-2245-upgrade-rn-to083
[MOO-2245] Upgrade RN to v0.83
2 parents 3de3049 + e061ba0 commit 156eda1

18 files changed

Lines changed: 3886 additions & 3916 deletions

android/app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ android {
123123

124124
dependencies {
125125
// React Native Core
126-
implementation "com.facebook.react:react-android:0.78.2"
126+
implementation "com.facebook.react:react-android:0.83.2"
127127
implementation("com.facebook.react:hermes-android")
128128

129129
// Dev app dependencies
@@ -193,4 +193,3 @@ configurations.all {
193193
}
194194
}
195195

196-
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
33
ext {
4-
buildToolsVersion = "35.0.0"
5-
minSdkVersion = 24
6-
compileSdkVersion = 35
7-
targetSdkVersion = 35
4+
buildToolsVersion = "36.0.0"
5+
minSdkVersion = 29
6+
compileSdkVersion = 36
7+
targetSdkVersion = 36
88
// needed by camera module
99
googlePlayServicesVersion = "17+"
1010
androidXAnnotation = "1.2.0"

ios/DeveloperApp/AppDelegate.swift

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ class AppDelegate: ReactAppProvider {
1515

1616
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1717
SessionCookieStore.restore() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
18-
super.setUpProvider()
19-
super.application(application, didFinishLaunchingWithOptions: launchOptions)
18+
setUpProvider(dependencyProvider: RCTAppDependencyProvider())
2019
clearKeychainIfNecessary()
2120
setUpDevice()
2221
setUpGoogleMaps()
2322
setUpPushNotifications(application)
2423
updateRootViewController(showOnboarding() ? .launchTutorial : .openApp)
25-
return true
24+
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
2625
}
2726

28-
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
27+
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
2928
RCTLinkingManager.application(app, open: url, options: options)
3029
guard let appUrl = AppPreferences.appUrl, !appUrl.isEmpty, !ReactAppProvider.isReactAppActive() else {
3130
return true
@@ -37,11 +36,11 @@ class AppDelegate: ReactAppProvider {
3736
return true
3837
}
3938

40-
override func applicationDidEnterBackground(_ application: UIApplication) {
39+
func applicationDidEnterBackground(_ application: UIApplication) {
4140
SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
4241
}
4342

44-
override func applicationWillTerminate(_ application: UIApplication) {
43+
func applicationWillTerminate(_ application: UIApplication) {
4544
SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
4645
}
4746

@@ -60,7 +59,7 @@ extension AppDelegate {
6059

6160
static var orientationLock = UIInterfaceOrientationMask.portrait // By default lock orientation only portrait mode.
6261

63-
override func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
62+
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
6463
return AppDelegate.orientationLock
6564
}
6665

@@ -74,9 +73,9 @@ extension AppDelegate {
7473
extension AppDelegate {
7574
private func updateRootViewController(_ storyboard: UIStoryboard) {
7675
window = MendixReactWindow(frame: UIScreen.main.bounds)
77-
window.rootViewController = storyboard.instantiateInitialViewController()
78-
window.makeKeyAndVisible()
79-
window.overrideUserInterfaceStyle = .light // Force Light Mode
76+
window?.rootViewController = storyboard.instantiateInitialViewController()
77+
window?.makeKeyAndVisible()
78+
window?.overrideUserInterfaceStyle = .light // Force Light Mode
8079
IQKeyboardManager.shared().isEnabled = false
8180
}
8281

@@ -154,7 +153,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate, MessagingDelegate {
154153
}
155154

156155
#if DEBUG
157-
override func application(_ application: UIApplication,
156+
func application(_ application: UIApplication,
158157
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
159158
print("APNs token retrieved: \(deviceToken)")
160159
Messaging.messaging().apnsToken = deviceToken

ios/DeveloperApp/Info.plist

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858
<true/>
5959
<key>MobildeDocsUrl</key>
6060
<string>https://docs.mendix.com/refguide/mobile/</string>
61-
<key>NSAppleMusicUsageDescription</key>
62-
<string>To use that feature the app needs access to your media library.</string>
6361
<key>NSAppTransportSecurity</key>
6462
<dict>
6563
<key>NSAllowsLocalNetworking</key>
6664
<true/>
6765
</dict>
66+
<key>NSAppleMusicUsageDescription</key>
67+
<string>To use that feature the app needs access to your media library.</string>
6868
<key>NSBluetoothAlwaysUsageDescription</key>
6969
<string>${BLUETOOTH_USAGE_DESCRIPTION}</string>
7070
<key>NSBluetoothPeripheralUsageDescription</key>
@@ -89,6 +89,8 @@
8989
<integer>31</integer>
9090
<key>NativeOTAEnabled</key>
9191
<true/>
92+
<key>RCTNewArchEnabled</key>
93+
<true/>
9294
<key>ReferenceGuideUrl</key>
9395
<string>https://docs.mendix.com/refguide/</string>
9496
<key>SampleAppsUpdateIntervalInSeconds</key>
@@ -118,10 +120,13 @@
118120
<string>FontAwesome5_Brands.ttf</string>
119121
<string>FontAwesome5_Regular.ttf</string>
120122
<string>FontAwesome5_Solid.ttf</string>
123+
<string>FontAwesome6_Brands.ttf</string>
124+
<string>FontAwesome6_Regular.ttf</string>
125+
<string>FontAwesome6_Solid.ttf</string>
121126
<string>Fontisto.ttf</string>
122127
<string>Foundation.ttf</string>
123128
<string>Ionicons.ttf</string>
124-
<string>MaterialCommunityIcons.ttf</string>
129+
<string>MaterialDesignIcons.ttf</string>
125130
<string>MaterialIcons.ttf</string>
126131
<string>Octicons.ttf</string>
127132
<string>SimpleLineIcons.ttf</string>

ios/DeveloperApp/MendixApp/MendixAppViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MendixAppViewController: UIViewController, ReactNativeDelegate {
1616

1717
// Set all orientations available while launching the mendix app.
1818
AppDelegate.orientationLock = .all
19-
AppDelegate.delegateInstance()?.window.overrideUserInterfaceStyle = .unspecified
19+
AppDelegate.delegateInstance()?.window?.overrideUserInterfaceStyle = .unspecified
2020
ReactNative.shared.delegate = self
2121
ReactNative.shared.start()
2222
}
@@ -31,7 +31,7 @@ class MendixAppViewController: UIViewController, ReactNativeDelegate {
3131
super.viewDidDisappear(animated)
3232
// Set orientation to only portrait mode, while exiting the mendix app.
3333
AppDelegate.orientationLock = .portrait
34-
AppDelegate.delegateInstance()?.window.overrideUserInterfaceStyle = .light
34+
AppDelegate.delegateInstance()?.window?.overrideUserInterfaceStyle = .light
3535
}
3636

3737
func onAppClosed() {

ios/DeveloperApp/OpenApp/TabViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TabViewController: UITabBarController {
1717

1818
func setSelectedIndex(index:Int){
1919
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate,
20-
let tabBarController = appDelegate.window.rootViewController as? UITabBarController else {
20+
let tabBarController = appDelegate.window?.rootViewController as? UITabBarController else {
2121
return
2222
}
2323
tabBarController.selectedIndex = index

ios/Podfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ end
1111

1212
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
1313

14+
# Build React Native from source so patch-package changes to native RN code are compiled.
15+
ENV['RCT_USE_PREBUILT_RNCORE'] = '0'
16+
ENV['RCT_USE_RN_DEP'] = '0'
17+
1418
# Use it to require both react-native's and this package's scripts:
1519
node_require('react-native/scripts/react_native_pods.rb')
1620
node_require('react-native-permissions/scripts/setup.rb')

0 commit comments

Comments
 (0)