Skip to content

Commit 531ba63

Browse files
Merge pull request #1097 from mendix/moo/MOO-2027-mendix-native-upgrade
2 parents 52cab43 + b07da32 commit 531ba63

32 files changed

+942
-518
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ android/\.settings/org\.eclipse\.buildship\.core\.prefs
7575
android/mendixnative-release/\.project
7676

7777
android/mendixnative-release/\.settings/org\.eclipse\.buildship\.core\.prefs
78+
79+
android/**/.cxx/
80+
android/.kotlin/

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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 ">= 2.7.8"
4+
ruby ">= 2.6.10"
55

66
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7-
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
7+
gem 'cocoapods', '= 1.16.2'
88
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9-
gem 'xcodeproj', '< 1.26.0'
9+
gem 'xcodeproj', '>= 1.27.0'
1010
gem 'concurrent-ruby', '< 1.3.4'

Gemfile.lock

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
activesupport (7.2.2.2)
9+
base64
10+
benchmark (>= 0.3)
11+
bigdecimal
12+
concurrent-ruby (~> 1.0, >= 1.3.1)
13+
connection_pool (>= 2.2.5)
14+
drb
15+
i18n (>= 1.6, < 2)
16+
logger (>= 1.4.2)
17+
minitest (>= 5.1)
18+
securerandom (>= 0.3)
19+
tzinfo (~> 2.0, >= 2.0.5)
20+
addressable (2.8.7)
21+
public_suffix (>= 2.0.2, < 7.0)
22+
algoliasearch (1.27.5)
23+
httpclient (~> 2.8, >= 2.8.3)
24+
json (>= 1.5.1)
25+
atomos (0.1.3)
26+
base64 (0.3.0)
27+
benchmark (0.5.0)
28+
bigdecimal (3.3.1)
29+
claide (1.1.0)
30+
cocoapods (1.16.2)
31+
addressable (~> 2.8)
32+
claide (>= 1.0.2, < 2.0)
33+
cocoapods-core (= 1.16.2)
34+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
35+
cocoapods-downloader (>= 2.1, < 3.0)
36+
cocoapods-plugins (>= 1.0.0, < 2.0)
37+
cocoapods-search (>= 1.0.0, < 2.0)
38+
cocoapods-trunk (>= 1.6.0, < 2.0)
39+
cocoapods-try (>= 1.1.0, < 2.0)
40+
colored2 (~> 3.1)
41+
escape (~> 0.0.4)
42+
fourflusher (>= 2.3.0, < 3.0)
43+
gh_inspector (~> 1.0)
44+
molinillo (~> 0.8.0)
45+
nap (~> 1.0)
46+
ruby-macho (>= 2.3.0, < 3.0)
47+
xcodeproj (>= 1.27.0, < 2.0)
48+
cocoapods-core (1.16.2)
49+
activesupport (>= 5.0, < 8)
50+
addressable (~> 2.8)
51+
algoliasearch (~> 1.0)
52+
concurrent-ruby (~> 1.1)
53+
fuzzy_match (~> 2.0.4)
54+
nap (~> 1.0)
55+
netrc (~> 0.11)
56+
public_suffix (~> 4.0)
57+
typhoeus (~> 1.0)
58+
cocoapods-deintegrate (1.0.5)
59+
cocoapods-downloader (2.1)
60+
cocoapods-plugins (1.0.0)
61+
nap
62+
cocoapods-search (1.0.1)
63+
cocoapods-trunk (1.6.0)
64+
nap (>= 0.8, < 2.0)
65+
netrc (~> 0.11)
66+
cocoapods-try (1.2.0)
67+
colored2 (3.1.2)
68+
concurrent-ruby (1.3.3)
69+
connection_pool (2.5.4)
70+
drb (2.2.3)
71+
escape (0.0.4)
72+
ethon (0.15.0)
73+
ffi (>= 1.15.0)
74+
ffi (1.17.2)
75+
ffi (1.17.2-aarch64-linux-gnu)
76+
ffi (1.17.2-aarch64-linux-musl)
77+
ffi (1.17.2-arm-linux-gnu)
78+
ffi (1.17.2-arm-linux-musl)
79+
ffi (1.17.2-arm64-darwin)
80+
ffi (1.17.2-x86-linux-gnu)
81+
ffi (1.17.2-x86-linux-musl)
82+
ffi (1.17.2-x86_64-darwin)
83+
ffi (1.17.2-x86_64-linux-gnu)
84+
ffi (1.17.2-x86_64-linux-musl)
85+
fourflusher (2.3.1)
86+
fuzzy_match (2.0.4)
87+
gh_inspector (1.1.3)
88+
httpclient (2.9.0)
89+
mutex_m
90+
i18n (1.14.7)
91+
concurrent-ruby (~> 1.0)
92+
json (2.15.1)
93+
logger (1.7.0)
94+
minitest (5.26.0)
95+
molinillo (0.8.0)
96+
mutex_m (0.3.0)
97+
nanaimo (0.4.0)
98+
nap (1.1.0)
99+
netrc (0.11.0)
100+
nkf (0.2.0)
101+
public_suffix (4.0.7)
102+
rexml (3.4.4)
103+
ruby-macho (2.5.1)
104+
securerandom (0.4.1)
105+
typhoeus (1.5.0)
106+
ethon (>= 0.9.0, < 0.16.0)
107+
tzinfo (2.0.6)
108+
concurrent-ruby (~> 1.0)
109+
xcodeproj (1.27.0)
110+
CFPropertyList (>= 2.3.3, < 4.0)
111+
atomos (~> 0.1.3)
112+
claide (>= 1.0.2, < 2.0)
113+
colored2 (~> 3.1)
114+
nanaimo (~> 0.4.0)
115+
rexml (>= 3.3.6, < 4.0)
116+
117+
PLATFORMS
118+
aarch64-linux-gnu
119+
aarch64-linux-musl
120+
arm-linux-gnu
121+
arm-linux-musl
122+
arm64-darwin
123+
ruby
124+
x86-linux-gnu
125+
x86-linux-musl
126+
x86_64-darwin
127+
x86_64-linux-gnu
128+
x86_64-linux-musl
129+
130+
DEPENDENCIES
131+
activesupport (>= 6.1.7.5, != 7.1.0)
132+
cocoapods (= 1.16.2)
133+
concurrent-ruby (< 1.3.4)
134+
xcodeproj (>= 1.27.0)
135+
136+
RUBY VERSION
137+
ruby 3.2.7p253
138+
139+
BUNDLED WITH
140+
2.7.2

android/app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ dependencies {
122122
implementation("com.facebook.react:hermes-android")
123123

124124
implementation project(':react-native-localize')
125-
implementation project(":mendixnative-release")
126125

127126
// Explicit add okhttp
128127
implementation("com.squareup.okhttp3:okhttp:4.9.1")
@@ -160,5 +159,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
160159
into "libs"
161160
}
162161

163-
apply from: file("../../node_modules/@mendix/native/androidlib/mendix.gradle"); applyMendixGradle(project)
162+
apply from: file("../../node_modules/mendix-native/android/mendix.gradle"); applyMendixGradle(project)
164163
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ buildscript {
2929
classpath "com.facebook.react:react-native-gradle-plugin"
3030
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
3131
classpath 'org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.21'
32-
apply from: file("../node_modules/@mendix/native/androidlib/mendix.gradle"); applyMendixClassPaths(project)
32+
apply from: file("../node_modules/mendix-native/android/mendix.gradle"); applyMendixClassPaths(project)
3333

3434
// NOTE: Do not place your application dependencies here; they belong
3535
// in the individual module build.gradle files

android/gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ org.gradle.configureondemand=true
2222
android.disableResourceValidation=true
2323
android.nonTransitiveRClass=true
2424
android.suppressUnsupportedCompileSdk=33
25-
# enabled by default in RN 0.76 so we need to disable it explicitly
26-
newArchEnabled=false
25+
newArchEnabled=true
2726
hermesEnabled=true
2827
mendixnative.cookieEncryption=false
2928
VisionCamera_enableCodeScanner=true

android/settings.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,4 @@ rootProject.name = 'nativeTemplate'
66

77
includeBuild('../node_modules/@react-native/gradle-plugin')
88

9-
include ':mendixnative-release'
10-
project(':mendixnative-release').projectDir = new File(rootProject.projectDir, '../node_modules/@mendix/native/androidlib')
11-
129
include ':app'

ios/AppDelegate.h

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

ios/AppDelegate.m

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

ios/AppDelegate.swift

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import MendixNative
2+
3+
@UIApplicationMain
4+
class AppDelegate: ReactAppProvider, UNUserNotificationCenterDelegate {
5+
6+
var shouldOpenInLastApp = false
7+
var hasHandledLaunchAppWithOptions = false
8+
9+
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
10+
11+
setupApp(application: application, launchOptions: launchOptions)
12+
MendixAppDelegate.delegate = self
13+
UNUserNotificationCenter.current().delegate = self
14+
MendixAppDelegate.application(application, didFinishLaunchingWithOptions: launchOptions)
15+
16+
changeRoot(to: UIViewController())
17+
18+
guard let url = Bundle.main.object(forInfoDictionaryKey: "Runtime url") as? String, !url.isEmpty else {
19+
showUnrecoverableDialog(
20+
title: "The runtime URL is missing",
21+
message: "Missing the 'Runtime url' configuration within the Info.plist file. The app will close."
22+
)
23+
return false
24+
}
25+
26+
if let bundleUrl = MendixAppDelegate.getJSBundleFile() {
27+
28+
let runtimeUrl = AppUrl.forRuntime((url).replacingOccurrences(of: "\\", with: ""))
29+
30+
let mendixApp = MendixApp(
31+
identifier: nil,
32+
bundleUrl: bundleUrl,
33+
runtimeUrl: runtimeUrl,
34+
warningsFilter: .none,
35+
isDeveloperApp: false,
36+
clearDataAtLaunch: false,
37+
splashScreenPresenter: SplashScreenPresenter(),
38+
reactLoading: nil,
39+
enableThreeFingerGestures: false
40+
)
41+
42+
ReactNative.shared.setup(mendixApp, launchOptions: launchOptions)
43+
ReactNative.shared.start()
44+
} else {
45+
showUnrecoverableDialog(
46+
title: "No Mendix bundle found",
47+
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."
48+
)
49+
}
50+
51+
return true
52+
}
53+
54+
override func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
55+
return MendixAppDelegate.application(app, openURL: url, options: options)
56+
}
57+
58+
func getWarningFilterValue() -> WarningsFilter {
59+
return .none
60+
}
61+
62+
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
63+
MendixAppDelegate.userNotificationCenter(center, willPresentNotification: notification, withCompletionHandler: completionHandler)
64+
}
65+
}

0 commit comments

Comments
 (0)