diff --git a/ios/DeveloperApp/AppDelegate.swift b/ios/DeveloperApp/AppDelegate.swift index 89c8be2..5d3f9cb 100644 --- a/ios/DeveloperApp/AppDelegate.swift +++ b/ios/DeveloperApp/AppDelegate.swift @@ -14,6 +14,7 @@ class AppDelegate: ReactAppProvider { var previewingSampleApp: Bool = false override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + SessionCookieStore.restore() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android super.setUpProvider() super.application(application, didFinishLaunchingWithOptions: launchOptions) clearKeychainIfNecessary() @@ -36,6 +37,14 @@ class AppDelegate: ReactAppProvider { return true } + override func applicationDidEnterBackground(_ application: UIApplication) { + SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android + } + + override func applicationWillTerminate(_ application: UIApplication) { + SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android + } + private func launchMendixAppWithOptions(options: [AnyHashable: Any] = [:]) { ReactNative.shared.setup(MendixAppEntryType.deeplink.mendixApp, launchOptions: options) ReactNative.shared.start() diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 5d9dec1..0ae35ef 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -189,7 +189,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 @@ -2974,7 +2974,7 @@ SPEC CHECKSUMS: hermes-engine: 2771b98fb813fdc6f92edd7c9c0035ecabf9fee7 IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485 libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 - MendixNative: a55e00448d33a66d59bd4b5c5d3057123d34337c + MendixNative: 358ef00fc883a39da69680c6c2a09ecf85a0b887 MultiplatformBleAdapter: 5a6a897b006764392f9cef785e4360f54fb9477d nanopb: 438bc412db1928dac798aa6fd75726007be04262 op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855 @@ -3086,6 +3086,6 @@ SPEC CHECKSUMS: VisionCamera: 9a8f98ae344fe5d148f84bb45829f9e4caab9d2f Yoga: e14bad835e12b6c7e2260fc320bd00e0f4b45add -PODFILE CHECKSUM: 31efe3f3eb2c09c2c2cd75ac7556c032a5324d1f +PODFILE CHECKSUM: 6d3ca2b313f2042ecffa8f1e7cca1d98ea668bfe COCOAPODS: 1.16.2 diff --git a/package-lock.json b/package-lock.json index 0538398..0b7f99a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "@react-native-picker/picker": "2.11.0", "@sbaiahmed1/react-native-biometrics": "0.4.0", "@swan-io/react-native-browser": "0.4.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", "react-native": "0.78.2", "react-native-ble-plx": "2.0.3", "react-native-blob-util": "0.21.3", @@ -6751,9 +6751,9 @@ "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, "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-32CKVOlWFyY4vb0EVmCvJfeMwnfwTkaTEr2dmuQWIkACOhXToHHeYlcY/bRHT62qhNkEMh7FnTD/fw30k3w2fQ==", "license": "MIT", "workspaces": [ "example" diff --git a/package.json b/package.json index 5ab2ee1..363abc1 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@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", "@notifee/react-native": "9.1.8", "@octokit/rest": "^21.1.1", "@op-engineering/op-sqlite": "15.0.7",