diff --git a/CHANGELOG.md b/CHANGELOG.md index ab4ab059a..ab94cd879 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this template will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +- We updated `@mendix/native` to v9.2.2, enabling session cookie persistence and restoration on iOS. + ## [14.1.8] - 2025-11-21 - We added a new property to gradle.properties for scanning QR codes. diff --git a/ios/AppDelegate.m b/ios/AppDelegate.m index 54327796a..020814e1a 100644 --- a/ios/AppDelegate.m +++ b/ios/AppDelegate.m @@ -10,6 +10,7 @@ @implementation AppDelegate @synthesize hasHandledLaunchAppWithOptions; - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [SessionCookieStore restore]; //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android [self clearKeychain]; MendixAppDelegate.delegate = self; [MendixAppDelegate application:application didFinishLaunchingWithOptions:launchOptions]; @@ -39,6 +40,14 @@ - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions: return YES; } +- (void)applicationDidEnterBackground:(UIApplication *)application { + [SessionCookieStore persist]; //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android +} + +- (void)applicationWillTerminate:(UIApplication *)application { + [SessionCookieStore persist]; //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android +} + - (void) application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { [MendixAppDelegate application:application didReceiveLocalNotification:notification]; } diff --git a/ios/Dev/AppDelegate.m b/ios/Dev/AppDelegate.m index c86cd2475..ca0ccd57c 100644 --- a/ios/Dev/AppDelegate.m +++ b/ios/Dev/AppDelegate.m @@ -10,6 +10,7 @@ @implementation AppDelegate @synthesize hasHandledLaunchAppWithOptions; - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [SessionCookieStore restore]; //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android [self clearKeychain]; MendixAppDelegate.delegate = self; [MendixAppDelegate application:application didFinishLaunchingWithOptions:launchOptions]; @@ -25,6 +26,14 @@ - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions: return YES; } +- (void)applicationDidEnterBackground:(UIApplication *)application { + [SessionCookieStore persist]; //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android +} + +- (void)applicationWillTerminate:(UIApplication *)application { + [SessionCookieStore persist]; //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android +} + - (void) application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { [MendixAppDelegate application:application didReceiveLocalNotification:notification]; } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 589d42628..f16eb83b8 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2103,17 +2103,17 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90 - DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 + DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6 FBLazyVector: 23d8c5470c648a635893dc0956c6dbaead54b656 fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd - glog: 69ef571f3de08433d766d614c73a9838a06bf7eb + glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8 hermes-engine: b2187dbe13edb0db8fcb2a93a69c1987a30d98a4 IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485 libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 op-sqlite: 0d4f6014d7eb4347bff281fd4cd7970fdf111276 OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2 - RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809 + RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82 RCTDeprecation: 6ee92578d332db1d4e03267d3ae98bcf8b780863 RCTRequired: 5b3da0e0f91fddda935574b81748c3e3d3649ee7 RCTTypeSafety: 870cb072be3d3f310ecec897c3d297a931f8f7e1 diff --git a/package-lock.json b/package-lock.json index 66a6d754b..75cb2c047 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "dependencies": { "@gorhom/bottom-sheet": "^5.1.1", - "@mendix/native": "9.2.0", + "@mendix/native": "9.2.2", "@op-engineering/op-sqlite": "9.2.7", "@react-native-async-storage/async-storage": "2.0.0", "@react-native-camera-roll/camera-roll": "7.4.0", @@ -1784,9 +1784,9 @@ } }, "node_modules/@mendix/native": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@mendix/native/-/native-9.2.0.tgz", - "integrity": "sha512-mzq+WCmuGW06PbSYCOd/lZ7Ub0mkVvN2nuwPJA2bwgamePu/kSHeDcf8jP+kazqpknIPs4al6JM7GwFPgjQa4g==" + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@mendix/native/-/native-9.2.2.tgz", + "integrity": "sha512-9nW2xfM7QQVj91nwbOsLWUftAv66QYktfE4Nh6blHX+HVwxpgCO9nZ7ekE4wYcKFExps/xOyx+8MSfZFLIgrDQ==" }, "node_modules/@mendix/native-mobile-toolkit": { "version": "1.0.127", diff --git a/package.json b/package.json index c59660e8e..cfbb6bb18 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@gorhom/bottom-sheet": "^5.1.1", - "@mendix/native": "9.2.0", + "@mendix/native": "9.2.2", "@op-engineering/op-sqlite": "9.2.7", "@react-native-async-storage/async-storage": "2.0.0", "@react-native-camera-roll/camera-roll": "7.4.0",