Skip to content

Commit ece1522

Browse files
Merge pull request #1135 from mendix/moo/MOO-2160-persist-session-cookies-on-ios
[MOO-2160] - iOS session cookie persistence
2 parents 1d6f3f4 + 166c962 commit ece1522

File tree

6 files changed

+36
-10
lines changed

6 files changed

+36
-10
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
- We updated mendix-native to v0.3.1, enabling session cookie persistence and restoration on iOS.
10+
11+
## [17.0.1] - 2025-12-24
12+
13+
- We changed NSAppTransportSecurity of the production version of the project to false. For dev testing, we added Info-dev.plist.
14+
15+
## [17.0.0] - 2025-12-22
16+
917
- We updated the native-template for compatibility with React v19 and React Native v0.78.2. This brings performance, stability improvements, and new features.
1018
- We updated the version of mendix-native to v0.3.0 to fix iOS native file system issue.
1119

ios/AppDelegate.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class AppDelegate: ReactAppProvider {
88

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

11+
SessionCookieStore.restore() // iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
1112
MendixAppDelegate.application(application, didFinishLaunchingWithOptions: launchOptions)
1213
setupApp(application: application, launchOptions: launchOptions)
1314
changeRoot(to: UIViewController())
@@ -55,4 +56,12 @@ class AppDelegate: ReactAppProvider {
5556
func getWarningFilterValue() -> WarningsFilter {
5657
return .none
5758
}
59+
60+
override func applicationWillTerminate(_ application: UIApplication) {
61+
SessionCookieStore.persist() // iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
62+
}
63+
64+
override func applicationDidEnterBackground(_ application: UIApplication) {
65+
SessionCookieStore.persist() // iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
66+
}
5867
}

ios/Dev/AppDelegate.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class AppDelegate: ReactAppProvider {
99

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

12+
SessionCookieStore.restore() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
1213
MendixAppDelegate.application(application, didFinishLaunchingWithOptions: launchOptions)
1314
setupApp(application: application, launchOptions: launchOptions)
1415

@@ -67,4 +68,12 @@ class AppDelegate: ReactAppProvider {
6768

6869
return handled
6970
}
71+
72+
override func applicationWillTerminate(_ application: UIApplication) {
73+
SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
74+
}
75+
76+
override func applicationDidEnterBackground(_ application: UIApplication) {
77+
SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android
78+
}
7079
}

ios/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PODS:
2626
- libwebp/sharpyuv (1.5.0)
2727
- libwebp/webp (1.5.0):
2828
- libwebp/sharpyuv
29-
- MendixNative (0.3.0):
29+
- MendixNative (0.3.1):
3030
- DoubleConversion
3131
- glog
3232
- hermes-engine
@@ -2538,17 +2538,17 @@ EXTERNAL SOURCES:
25382538

25392539
SPEC CHECKSUMS:
25402540
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
2541-
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
2541+
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
25422542
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
25432543
FBLazyVector: e32d34492c519a2194ec9d7f5e7a79d11b73f91c
25442544
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
2545-
glog: 69ef571f3de08433d766d614c73a9838a06bf7eb
2545+
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
25462546
hermes-engine: 2771b98fb813fdc6f92edd7c9c0035ecabf9fee7
25472547
IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485
25482548
libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7
25492549
libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f
25502550
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
2551-
MendixNative: a55e00448d33a66d59bd4b5c5d3057123d34337c
2551+
MendixNative: 358ef00fc883a39da69680c6c2a09ecf85a0b887
25522552
op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855
25532553
OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2
25542554
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
@@ -2636,6 +2636,6 @@ SPEC CHECKSUMS:
26362636
SSZipArchive: 8a6ee5677c8e304bebc109e39cf0da91ccef22ea
26372637
Yoga: e14bad835e12b6c7e2260fc320bd00e0f4b45add
26382638

2639-
PODFILE CHECKSUM: b234d1af9b2f93d0707d97b1f37c0fbb8e2cfcb8
2639+
PODFILE CHECKSUM: 161262e887e9586e4216f1c577331953ce64c62a
26402640

26412641
COCOAPODS: 1.16.2

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dependencies": {
1111
"@d11/react-native-fast-image": "8.11.1",
1212
"@gorhom/bottom-sheet": "5.1.1",
13-
"mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.0/mendix-native-v0.3.0.tgz",
13+
"mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.3.1/mendix-native-v0.3.1.tgz",
1414
"@op-engineering/op-sqlite": "15.0.7",
1515
"@react-native-async-storage/async-storage": "2.0.0",
1616
"@react-native-camera-roll/camera-roll": "7.4.0",

0 commit comments

Comments
 (0)