From ad44ce9183337bff796c431de2ae7ba7fcedd250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Fri, 5 Apr 2024 12:37:15 +0200 Subject: [PATCH] Follow-up to make #7124 target iPhone 11 (#7555) * Avoid using features newer than iPhone 11 in client_impl_base.cpp * Adding a note in the changelog --- CHANGELOG.md | 1 + src/realm/sync/noinst/client_impl_base.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8678fe0dad0..0823a85ff9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * Fixed diverging history due to a bug in the replication code when setting default null values (embedded objects included) ([#7536](https://github.com/realm/realm-core/issues/7536)). * Version 19.39.33523 of MSVC would crash when compiling for arm64 in release mode ([PR #7533](https://github.com/realm/realm-core/pull/7533)). * Null pointer exception may be triggered when logging out and async commits callbacks not executed ([#7434](https://github.com/realm/realm-core/issues/7434), since v13.26.0) +* Fixed building for iPhone simulators targeting deployment target 11 ([#7554](https://github.com/realm/realm-core/pull/7554)). ### Breaking changes * Updated default base URL to be `https://services.cloud.mongodb.com` to support the new domains (was `https://realm.mongodb.com`). ([PR #7534](https://github.com/realm/realm-core/pull/7534)) diff --git a/src/realm/sync/noinst/client_impl_base.cpp b/src/realm/sync/noinst/client_impl_base.cpp index dd2c1931b96..8f0c518bc6e 100644 --- a/src/realm/sync/noinst/client_impl_base.cpp +++ b/src/realm/sync/noinst/client_impl_base.cpp @@ -2365,10 +2365,10 @@ Status Session::receive_download_message(const DownloadMessage& message) return Status::OK(); bool is_flx = m_conn.is_flx_sync_connection(); - int64_t query_version = is_flx ? message.query_version.value() : 0; + int64_t query_version = is_flx ? *message.query_version : 0; // If this is a PBS connection, then every download message is its own complete batch. - bool last_in_batch = is_flx ? message.last_in_batch.value() : true; + bool last_in_batch = is_flx ? *message.last_in_batch : true; auto batch_state = last_in_batch ? sync::DownloadBatchState::LastInBatch : sync::DownloadBatchState::MoreToCome; if (is_steady_state_download_message(batch_state, query_version)) batch_state = DownloadBatchState::SteadyState;