Skip to content

Commit

Permalink
Add .macCatalyst platform to REALM_HAVE_SECURE_TRANSPORT macro (#4954)
Browse files Browse the repository at this point in the history
  • Loading branch information
leemaguire committed Oct 15, 2021
1 parent bf58a91 commit d9988a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Fixed a rare segfault which could trigger if a user was being logged out while the access token refresh response comes in. ([#4944](https://github.com/realm/realm-core/issues/4944), since v10)
* Fixed a bug where progress notifiers continue to be called after the download of a synced realm is complete. ([#4919](https://github.com/realm/realm-core/issues/4919))
* Fixed an issue where the release process was only publishing armeabi-v7a Android binaries. ([#4952](https://github.com/realm/realm-core/pull/4952), since v10.6.0)
* Fixed an issue where the Mac Catalyst target was excluded from the `REALM_HAVE_SECURE_TRANSPORT` macro in the Swift Package. This caused `'SSL/TLS protocol not supported'` to be thrown as an exception if Realm Sync is used. ([#7474](https://github.com/realm/realm-cocoa/issues/7474))

### Breaking changes
* `App::Config::transport_factory` was replaced with `App::Config::transport`. It should now be an instance of `GenericNetworkTransport` rather than a factory for making instances. This allows the SDK to control which thread constructs the transport layer. ([#4903](https://github.com/realm/realm-core/pull/4903))
Expand Down
12 changes: 8 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let versionPieces = versionStr.split(separator: "-")
let versionCompontents = versionPieces[0].split(separator: ".")
let versionExtra = versionPieces.count > 1 ? versionPieces[1] : ""

let cxxSettings: [CXXSetting] = [
var cxxSettings: [CXXSetting] = [
.headerSearchPath("."),
.define("REALM_DEBUG", .when(configuration: .debug)),
.define("REALM_NO_CONFIG"),
Expand All @@ -21,11 +21,15 @@ let cxxSettings: [CXXSetting] = [
.define("REALM_VERSION_MINOR", to: String(versionCompontents[1])),
.define("REALM_VERSION_PATCH", to: String(versionCompontents[2])),
.define("REALM_VERSION_EXTRA", to: "\"\(versionExtra)\""),
.define("REALM_VERSION_STRING", to: "\"\(versionStr)\""),

.define("REALM_HAVE_SECURE_TRANSPORT", to: "1", .when(platforms: [.macOS, .iOS, .tvOS, .watchOS])),
.define("REALM_VERSION_STRING", to: "\"\(versionStr)\"")
]

#if swift(>=5.4)
cxxSettings.append(.define("REALM_HAVE_SECURE_TRANSPORT", to: "1", .when(platforms: [.macOS, .macCatalyst, .iOS, .tvOS, .watchOS])))
#else
cxxSettings.append(.define("REALM_HAVE_SECURE_TRANSPORT", to: "1", .when(platforms: [.macOS, .iOS, .tvOS, .watchOS])))
#endif

let syncServerSources: [String] = [
"realm/sync/noinst/server",
]
Expand Down

0 comments on commit d9988a4

Please sign in to comment.