Skip to content

Commit 908ddc6

Browse files
refactor: fix tests
1 parent 6123968 commit 908ddc6

4 files changed

Lines changed: 2 additions & 28 deletions

File tree

example/ios/MendixNativeExample/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AppDelegate: ReactAppProvider {
1616
bundleUrl: bundleUrl,
1717
runtimeUrl: URL(string: "http://localhost:8081")!,
1818
warningsFilter: .none,
19-
isDeveloperApp: false,
19+
isDeveloperApp: true,
2020
clearDataAtLaunch: false,
2121
splashScreenPresenter: nil,
2222
reactLoading: nil,

example/jest.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module.exports = {
2-
forceExit: true,
32
projects: [
43
{
54
displayName: 'react-native-harness',

ios/Modules/MxConfiguration/MxConfiguration.swift

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -52,31 +52,6 @@ public class MxConfiguration: NSObject {
5252
set { _warningsFilter = newValue }
5353
}
5454

55-
public func constants() -> [String: Any] {
56-
guard let runtimeUrl = MxConfiguration.runtimeUrl else {
57-
let exception = NSException(
58-
name: NSExceptionName("RUNTIME_URL_MISSING"),
59-
reason: "Runtime URL was not set prior to launch.",
60-
userInfo: nil
61-
)
62-
exception.raise()
63-
return [:]
64-
}
65-
66-
return [
67-
"RUNTIME_URL": runtimeUrl.absoluteString,
68-
"APP_NAME": MxConfiguration.appName ?? NSNull(),
69-
"DATABASE_NAME": MxConfiguration.databaseName,
70-
"FILES_DIRECTORY_NAME": MxConfiguration.filesDirectoryName,
71-
"WARNINGS_FILTER_LEVEL": MxConfiguration.warningsFilter.stringValue,
72-
"OTA_MANIFEST_PATH": OtaHelpers.getOtaManifestFilepath(),
73-
"IS_DEVELOPER_APP": NSNumber(value: MxConfiguration.isDeveloperApp),
74-
"NATIVE_DEPENDENCIES": OtaHelpers.getNativeDependencies(),
75-
"NATIVE_BINARY_VERSION": NSNumber(value: MxConfiguration.nativeBinaryVersion),
76-
"APP_SESSION_ID": MxConfiguration.appSessionId ?? NSNull()
77-
]
78-
}
79-
8055
public static func update(from mendixApp: MendixApp) {
8156
MxConfiguration.runtimeUrl = mendixApp.runtimeUrl
8257
MxConfiguration.appName = mendixApp.identifier

ios/TurboModules/MxConfiguration/MxConfigurationModule.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ @implementation MxConfigurationModule
2121
MxConfigProxy *config = [MxConfigProxy prepare];
2222
return facebook::react::typedConstants<JS::NativeMxConfiguration::Constants>({
2323
.RUNTIME_URL = config.runtimeUrl,
24-
.APP_NAME = config.appName,
24+
.APP_NAME = config.appName ?: [[NSNull alloc] init],
2525
.FILES_DIRECTORY_NAME = config.filesDirectoryName,
2626
.DATABASE_NAME = config.databaseName,
2727
.WARNINGS_FILTER_LEVEL = config.warningsFilter,

0 commit comments

Comments
 (0)