Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

- We upgraded React Native to 0.88.0-rc.3. On iOS the app now uses the scene-based lifecycle (`SceneDelegate`).
- The app now uses Hermes V1 (HBC bytecode version 99). JavaScript bundles compiled with Hermes 0.16.0 (bytecode version 96) can no longer be loaded and must be compiled with hermes-compiler 260318099.0.4.
- We upgraded Android to Gradle 9.4.1, Kotlin 2.2.0, and compile SDK / build tools 37.
- We upgraded @op-engineering/op-sqlite to 18.2.5, react-native-gesture-handler to 2.33.0, react-native-reanimated to 4.7.1, react-native-worklets to 0.13.0, react-native-screens to 4.28.0, react-native-blob-util to 0.24.11, react-native-safe-area-context to 5.8.1, @react-native-community/cli to 20.2.0, and the @react-native-vector-icons/* family to 13.x.
- We fixed an issue on iOS where a deep link that cold started the app was not delivered to React Native, causing `Linking.getInitialURL()` to return `null`.
- We removed some unused Android Permissions coming in from Manifest mergers.

Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
gem 'mutex_m'
gem 'nkf'
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ DEPENDENCIES
concurrent-ruby (< 1.3.4)
logger
mutex_m
nkf
xcodeproj (>= 1.27.0)

RUBY VERSION
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Native Template

![License](https://img.shields.io/badge/license-MIT-blue.svg)
![React Native](https://img.shields.io/badge/react_native-0.84.1-blue.svg)
![React Native](https://img.shields.io/badge/react_native-0.88.0--rc.3-blue.svg)
![Node](https://img.shields.io/badge/node-v20-green.svg)

![Custom Dev App CI - Android](https://github.com/mendix/native-template/actions/workflows/android-build-custom-dev-app.yml/badge.svg?branch=master)
Expand Down
14 changes: 7 additions & 7 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,13 @@ android {
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
buildFeatures {
viewBinding true
buildConfig true
Expand All @@ -111,6 +108,12 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

dependencies {
implementation "com.facebook.react:react-android"
implementation platform("com.google.firebase:firebase-bom:${firebaseBomVersion}")
Expand Down Expand Up @@ -144,9 +147,6 @@ dependencies {

configurations.all {
resolutionStrategy {
// Force Hermes V0 version across all configurations to prevent random resolution due to gradle caching/timing issues.
force "com.facebook.hermes:hermes-android:0.15.1"

force "androidx.annotation:annotation:1.1.0"
force(
"com.google.android.gms:play-services-base:18.6.0",
Expand Down
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
buildscript {
ext {
buildToolsVersion = "36.0.0"
buildToolsVersion = "37.0.0"
minSdkVersion = 29
compileSdkVersion = 36
compileSdkVersion = 37
targetSdkVersion = 36
kotlinVersion = "2.1.20"
kotlinVersion = "2.2.0"
excludeAppGlideModule = true
androidx_lifecycle_version = "2.8.6"
playServicesVersion = "18+"
Expand Down Expand Up @@ -32,7 +32,7 @@ buildscript {
classpath 'com.android.tools.build:gradle'
classpath "com.facebook.react:react-native-gradle-plugin"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.2.10'
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion"
apply from: file("../node_modules/mendix-native/android/mendix.gradle"); applyMendixClassPaths(project)

// NOTE: Do not place your application dependencies here; they belong
Expand Down
12 changes: 11 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,20 @@ android.nonTransitiveRClass=true
android.suppressUnsupportedCompileSdk=33
newArchEnabled=true
hermesEnabled=true
hermesV1Enabled=false
mendixnative.cookieEncryption=false
VisionCamera_enableCodeScanner=true

# Enable edge-to-edge display
edgeToEdgeEnabled=true

# React Native 0.88 always uses Hermes V1 (hermes-compiler 260318099.0.4, HBC bytecode version 99).
# Bundles compiled by appdev/client must use the same hermes-compiler version, otherwise loading fails with a bytecode version mismatch.

# Opt out of built-in kotlin and new DSL behavior that ships with AGP 9.
# Starting from AGP 10.x these opt outs will be removed.
android.builtInKotlin=false
android.newDsl=false

# Enabled parallel sync for Gradle 9.4+
org.gradle.tooling.parallel=true
android.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
validateDistributionUrl=true
networkTimeout=10000
52 changes: 29 additions & 23 deletions android/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions android/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 13 additions & 59 deletions ios/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,67 +1,21 @@
import UIKit
import MendixNative

@UIApplicationMain
class AppDelegate: ReactAppProvider {

var shouldOpenInLastApp = false
var hasHandledLaunchAppWithOptions = false

override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {

SessionCookieStore.restore() // iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
@main
class AppDelegate: LegacyWindowAppDelegate {

func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
SessionCookieStore.restore()
MendixAppDelegate.application(application, didFinishLaunchingWithOptions: launchOptions)
setupApp(application: application, launchOptions: launchOptions)
changeRoot(to: UIViewController())

guard let url = Bundle.main.object(forInfoDictionaryKey: "Runtime url") as? String, !url.isEmpty else {
showUnrecoverableDialog(
title: "The runtime URL is missing",
message: "Missing the 'Runtime url' configuration within the Info.plist file. The app will close."
)
return false
}

if let bundleUrl = MendixAppDelegate.getJSBundleFile() {

let runtimeUrl = AppUrl.forRuntime((url).replacingOccurrences(of: "\\", with: ""))

let mendixApp = MendixApp(
identifier: nil,
bundleUrl: bundleUrl,
runtimeUrl: runtimeUrl,
warningsFilter: .none,
isDeveloperApp: false,
clearDataAtLaunch: false,
splashScreenPresenter: SplashScreenPresenter(),
reactLoading: nil,
enableThreeFingerGestures: false
)

ReactNative.shared.setup(mendixApp, launchOptions: launchOptions)
ReactNative.shared.start()
} else {
showUnrecoverableDialog(
title: "No Mendix bundle found",
message: "Missing the Mendix app bundle. Make sure that the index.ios.bundle file is available in ios/NativeTemplate/Bundle folder. If building locally consult the documentation on how to generate a bundle from your project."
)
}

clearKeychain()
setupUI()
return true
}

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return MendixAppDelegate.application(app, openURL: url, options: options)
}

func getWarningFilterValue() -> WarningsFilter {
return .none
}


func applicationWillTerminate(_ application: UIApplication) {
SessionCookieStore.persist() // iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
}

func applicationDidEnterBackground(_ application: UIApplication) {
SessionCookieStore.persist() // iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
SessionCookieStore.persist()
}
}
Loading
Loading