diff --git a/CHANGELOG.md b/CHANGELOG.md index 543f4c1a..1757950e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +- We updated mendix-native to v0.3.1, enabling session cookie persistence and restoration on iOS. +- We upgraded the body-parser dependency to resolve npm audit high-severity vulnerability warnings. + +## [17.0.1] - 2025-12-24 + +- We changed NSAppTransportSecurity of the production version of the project to false. For dev testing, we added Info-dev.plist. + +## [17.0.0] - 2025-12-22 + - We updated the native-template for compatibility with React v19 and React Native v0.78.2. This brings performance, stability improvements, and new features. - We updated the version of mendix-native to v0.3.0 to fix iOS native file system issue. diff --git a/ios/AppDelegate.swift b/ios/AppDelegate.swift index 3d0472de..68de8fff 100644 --- a/ios/AppDelegate.swift +++ b/ios/AppDelegate.swift @@ -55,4 +55,12 @@ class AppDelegate: ReactAppProvider { func getWarningFilterValue() -> WarningsFilter { return .none } + + override func applicationWillTerminate(_ application: UIApplication) { + NativeCookieModule.persistSessionCookies() + } + + override func applicationDidEnterBackground(_ application: UIApplication) { + NativeCookieModule.persistSessionCookies() + } } diff --git a/ios/Dev/AppDelegate.swift b/ios/Dev/AppDelegate.swift index 459176ad..e69f6717 100644 --- a/ios/Dev/AppDelegate.swift +++ b/ios/Dev/AppDelegate.swift @@ -67,4 +67,12 @@ class AppDelegate: ReactAppProvider { return handled } + + override func applicationWillTerminate(_ application: UIApplication) { + NativeCookieModule.persistSessionCookies() + } + + override func applicationDidEnterBackground(_ application: UIApplication) { + NativeCookieModule.persistSessionCookies() + } } diff --git a/ios/Extensions/AppDelegate+Extension.swift b/ios/Extensions/AppDelegate+Extension.swift index e1028564..288273a5 100644 --- a/ios/Extensions/AppDelegate+Extension.swift +++ b/ios/Extensions/AppDelegate+Extension.swift @@ -26,6 +26,7 @@ extension AppDelegate { func setupApp(application: UIApplication, launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) { setUpProvider() super.application(application, didFinishLaunchingWithOptions: launchOptions) + NativeCookieModule.restoreSessionCookies() clearKeychain() setupUI() } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 395a386f..bcde2b20 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -26,7 +26,7 @@ PODS: - libwebp/sharpyuv (1.5.0) - libwebp/webp (1.5.0): - libwebp/sharpyuv - - MendixNative (0.3.0): + - MendixNative (0.3.1): - DoubleConversion - glog - hermes-engine @@ -2538,17 +2538,17 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90 - DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 + DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6 FBLazyVector: e32d34492c519a2194ec9d7f5e7a79d11b73f91c fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd - glog: 69ef571f3de08433d766d614c73a9838a06bf7eb + glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8 hermes-engine: 2771b98fb813fdc6f92edd7c9c0035ecabf9fee7 IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485 libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7 libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 - MendixNative: a55e00448d33a66d59bd4b5c5d3057123d34337c + MendixNative: 358ef00fc883a39da69680c6c2a09ecf85a0b887 op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855 OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2 RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82 @@ -2636,6 +2636,6 @@ SPEC CHECKSUMS: SSZipArchive: 8a6ee5677c8e304bebc109e39cf0da91ccef22ea Yoga: e14bad835e12b6c7e2260fc320bd00e0f4b45add -PODFILE CHECKSUM: b234d1af9b2f93d0707d97b1f37c0fbb8e2cfcb8 +PODFILE CHECKSUM: 161262e887e9586e4216f1c577331953ce64c62a COCOAPODS: 1.16.2 diff --git a/ios/nativeTemplate.xcodeproj/project.pbxproj b/ios/nativeTemplate.xcodeproj/project.pbxproj index 87420a88..6fa4bdf0 100644 --- a/ios/nativeTemplate.xcodeproj/project.pbxproj +++ b/ios/nativeTemplate.xcodeproj/project.pbxproj @@ -865,8 +865,8 @@ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu99; - INFOPLIST_FILE = "nativeTemplate/Info-dev.plist"; HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "nativeTemplate/Info-dev.plist"; IPHONEOS_DEPLOYMENT_TARGET = 15.5; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/package-lock.json b/package-lock.json index 808e34cd..883d4e9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "@react-native-community/datetimepicker": "8.2.0", "@react-native-picker/picker": "2.11.0", "@react-navigation/native": "7.0.14", - "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.0/mendix-native-v0.3.0.tgz", + "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz", "react-native": "0.78.2", "react-native-blob-util": "0.21.3", "react-native-bootsplash": "6.3.10", @@ -3527,23 +3527,23 @@ } }, "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", "license": "MIT", "dependencies": { - "bytes": "3.1.2", + "bytes": "~3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", "type-is": "~1.6.18", - "unpipe": "1.0.0" + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8", @@ -3559,12 +3559,41 @@ "ms": "2.0.0" } }, + "node_modules/body-parser/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, + "node_modules/body-parser/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -6436,9 +6465,9 @@ "license": "MIT" }, "node_modules/mendix-native": { - "version": "0.3.0", - "resolved": "https://github.com/mendix/mendix-native/releases/download/v0.3.0/mendix-native-v0.3.0.tgz", - "integrity": "sha512-h1dNSBaUHu+XEqa7GW8LfnWmguKNoZkZHZuLE4+OoWNatXh/MHkYaZwmN1zX3y9uQGOVBQdx5R1yaUvLqmrvTQ==", + "version": "0.3.1", + "resolved": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz", + "integrity": "sha512-AgBSUsgWoQJ8wdfToyKgBgg4MFt3MDafJp9ScA37CGsaSlp3Wc2ie1GJGN9ItbFQHr7LIwKYUFynAcOENHfJ+w==", "license": "MIT", "workspaces": [ "example" @@ -7922,12 +7951,12 @@ } }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -7993,16 +8022,45 @@ } }, "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/raw-body/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", "engines": { "node": ">= 0.8" } diff --git a/package.json b/package.json index 3ae71b97..2a8bc675 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dependencies": { "@d11/react-native-fast-image": "8.11.1", "@gorhom/bottom-sheet": "5.1.1", - "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.0/mendix-native-v0.3.0.tgz", + "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz", "@op-engineering/op-sqlite": "15.0.7", "@react-native-async-storage/async-storage": "2.0.0", "@react-native-camera-roll/camera-roll": "7.4.0",