Skip to content

Commit 68530d3

Browse files
committed
Release 10.47.0
1 parent 63ab988 commit 68530d3

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

CHANGELOG.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
x.y.z Release notes (yyyy-MM-dd)
1+
10.47.0 Release notes (2024-02-12)
22
=============================================================
3+
34
### Enhancements
5+
46
* Added initial support for geospatial queries on points.
57
There is no new dedicated type to store Geospatial points, instead points should
6-
be stored as ([GeoJson-shaped](https://www.mongodb.com/docs/manual/reference/geojson/)) embedded object, as the example below.
8+
be stored as ([GeoJson-shaped](https://www.mongodb.com/docs/manual/reference/geojson/))
9+
embedded object, as the example below:
710
```swift
811
public class Location: EmbeddedObject {
912
@Persisted private var coordinates: List<Double>
@@ -18,49 +21,44 @@ x.y.z Release notes (yyyy-MM-dd)
1821
coordinates.append(objectsIn: [longitude, latitude])
1922
}
2023
}
21-
```
22-
Geospatial queries (`geoWithin`) can only be executed in such a type of objects and
23-
will throw otherwise.
24-
The queries can be used to filter objects whose points lie within a certain area,
25-
using the following pre-established shapes (`GeoBox`, `GeoPolygon`, `GeoCircle`).
24+
```
25+
Geospatial queries (`geoWithin`) can only be executed on such a type of
26+
objects and will throw otherwise. The queries can be used to filter objects
27+
whose points lie within a certain area, using the following pre-established
28+
shapes (`GeoBox`, `GeoPolygon`, `GeoCircle`).
2629
```swift
2730
class Person: Object {
2831
@Persisted var name: String
2932
@Persisted var location: Location? // GeoJson embedded object
3033
}
31-
34+
3235
let realm = realmWithTestPath()
3336
try realm.write {
3437
realm.add(PersonLocation(name: "Maria", location: Location(latitude: 55.6761, longitude: 12.5683)))
3538
}
36-
39+
3740
let shape = GeoBox(bottomLeft: (55.6281, 12.0826), topRight: (55.6762, 12.5684))!
3841
let locations = realm.objects(PersonLocation.self).where { $0.location.geoWithin(shape) })
3942
```
4043
A `filter` or `NSPredicate` can be used as well to perform a Geospatial query.
4144
```swift
4245
let shape = GeoPolygon(outerRing: [(-2, -2), (-2, 2), (2, 2), (2, -2), (-2, -2)], holes: [[(0, 0), (1, 1), (-1, 1), (0, 0)]])!
4346
let locations = realm.objects(PersonLocation.self).filter("location IN %@", shape)
44-
47+
4548
let locations = realm.objects(PersonLocation.self).filter(NSPredicate(format: "location IN %@", shape))
4649
```
4750

48-
### Fixed
49-
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-swift/issues/????), since v?.?.?)
50-
* None.
51-
52-
<!-- ### Breaking Changes - ONLY INCLUDE FOR NEW MAJOR version -->
53-
5451
### Compatibility
52+
5553
* Realm Studio: 14.0.1 or later.
5654
* APIs are backwards compatible with all previous releases in the 10.x.y series.
5755
* Carthage release for Swift is built with Xcode 15.2.0.
5856
* CocoaPods: 1.10 or later.
5957
* Xcode: 14.2-15.2.0.
6058

6159
### Internal
60+
6261
* Migrated Release pipelines to Github Actions.
63-
* Upgraded realm-core from ? to ?
6462

6563
10.46.0 Release notes (2024-01-23)
6664
=============================================================

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PackageDescription
44
import Foundation
55

66
let coreVersion = Version("13.26.0")
7-
let cocoaVersion = Version("10.46.0")
7+
let cocoaVersion = Version("10.47.0")
88

99
let cxxSettings: [CXXSetting] = [
1010
.headerSearchPath("."),

Realm/Realm-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>FMWK</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>10.46.0</string>
20+
<string>10.47.0</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>10.46.0</string>
24+
<string>10.47.0</string>
2525
<key>NSHumanReadableCopyright</key>
2626
<string>Copyright © 2014-2021 Realm. All rights reserved.</string>
2727
<key>NSPrincipalClass</key>

dependencies.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
VERSION=10.46.0
1+
VERSION=10.47.0
22
REALM_CORE_VERSION=13.26.0
33
STITCH_VERSION=8bf8ebcff6e804586c30a6ccbadb060753071a42

0 commit comments

Comments
 (0)