[
  {
    "path": ".gitignore",
    "content": "#####\n# OS X temporary files that should never be committed\n.DS_Store\n*.swp\n*.lock\nprofile\n\n####\n# Xcode temporary files that should never be committed\n*~.nib\n\n####\n# Xcode build files\nDerivedData/\nbuild/\nBuilds/\n\n#####\n# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)\n*.pbxuser\n*.mode1v3\n*.mode2v3\n*.perspectivev3\n!default.pbxuser\n!default.mode1v3\n!default.mode2v3\n!default.perspectivev3\n\n####\n# Xcode 4\nxcuserdata\n!xcschemes\n# Xcode 4\n*.moved-aside\n\n####\n# XCode 4 workspaces - more detailed\n!xcshareddata\n!default.xcworkspace\n*.xcworkspacedata\n\n####\n# Xcode 5\n*.xccheckout\n*.xcuserstate\n\n####\n# Xcode 7\n*.xcscmblueprint\n\n####\n# AppCode\n.idea/\n\n####\n# Other Xcode files\nprofile\n*.hmap\n*.ipa\n\n####\n# CocoaPods\nPods/\n\n####\n# Carthage\nCarthage/Build\nCarthage/Checkouts\n"
  },
  {
    "path": ".swift-version",
    "content": "4.0\n"
  },
  {
    "path": "Cartfile",
    "content": "github \"realm/realm-cocoa\"\n"
  },
  {
    "path": "Cartfile.resolved",
    "content": "github \"realm/realm-cocoa\" \"v3.13.1\"\n"
  },
  {
    "path": "GeoQueries/GeoQueries.h",
    "content": "//\n//  GeoQueries.h\n//  GeoQueries\n//\n//  Created by mhergon on 4/10/17.\n//  Copyright © 2017 mhergon. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n//! Project version number for GeoQueries.\nFOUNDATION_EXPORT double GeoQueriesVersionNumber;\n\n//! Project version string for GeoQueries.\nFOUNDATION_EXPORT const unsigned char GeoQueriesVersionString[];\n\n// In this header, you should import all the public headers of your framework using statements like #import <GeoQueries/PublicHeader.h>\n\n\n"
  },
  {
    "path": "GeoQueries/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>FMWK</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>NSPrincipalClass</key>\n\t<string></string>\n</dict>\n</plist>\n"
  },
  {
    "path": "GeoQueries.swift",
    "content": "//\n//  GeoQueries.swift\n//  GeoQueries\n//\n//  Created by mhergon on 15/10/16.\n//  Copyright © 2016 mhergon. All rights reserved.\n//\n\nimport RealmSwift\nimport CoreLocation\nimport MapKit\n\nenum GeoQueriesError: Error {\n    case invalidRealm(String)\n}\n\n// MARK: - Public extensions\npublic extension Realm {\n    \n    /**\n     Find objects inside MKCoordinateRegion. Useful for use in conjunction with MapKit\n     \n     - parameter type:         Realm object type\n     - parameter region:       Region that fits MapKit view\n     - parameter latitudeKey:  Set to use different latitude key in query (default: \"lat\")\n     - parameter longitudeKey: Set to use different longitude key in query (default: \"lng\")\n     \n     - returns: Found objects inside MKCoordinateRegion\n     */\n    func findInRegion<Element: Object>(type: Element.Type, region: MKCoordinateRegion, latitudeKey: String = \"lat\", longitudeKey: String = \"lng\") throws -> Results<Element> {\n        \n        // Query\n        return try self\n            .objects(type)\n            .filterGeoBox(box: region.geoBox, latitudeKey: latitudeKey, longitudeKey: longitudeKey)\n        \n    }\n    \n    /**\n     Find objects inside GeoBox\n     \n     - parameter type:         Realm object type\n     - parameter box:          GeoBox struct\n     - parameter latitudeKey:  Set to use different latitude key in query (default: \"lat\")\n     - parameter longitudeKey: Set to use different longitude key in query (default: \"lng\")\n     \n     - returns: Found objects inside GeoBox\n     */\n    func findInBox<Element: Object>(type: Element.Type, box: GeoBox, latitudeKey: String = \"lat\", longitudeKey: String = \"lng\") throws -> Results<Element> {\n        \n        // Query\n        return try self\n            .objects(type)\n            .filterGeoBox(box: box, latitudeKey: latitudeKey, longitudeKey: longitudeKey)\n        \n    }\n    \n    /**\n     Find objects from center and distance radius\n     \n     - parameter type:         Realm object type\n     - parameter center:       Center coordinate\n     - parameter radius:       Radius in meters\n     - parameter order:        Sort by distance (optional)\n     - parameter latitudeKey:  Set to use different latitude key in query (default: \"lat\")\n     - parameter longitudeKey: Set to use different longitude key in query (default: \"lng\")\n     \n     - returns: Found objects inside radius around the center coordinate\n     */\n    func findNearby<Element: Object>(type: Element.Type, origin center: CLLocationCoordinate2D, radius: Double, sortAscending sort: Bool?, latitudeKey: String = \"lat\", longitudeKey: String = \"lng\") throws -> [Element] {\n        \n        // Query\n        return try self\n            .objects(type)\n            .filterGeoBox(box: center.geoBox(radius: radius), latitudeKey: latitudeKey, longitudeKey: longitudeKey)\n            .filterGeoRadius(center: center, radius: radius, sortAscending: sort, latitudeKey: latitudeKey, longitudeKey: longitudeKey)\n        \n    }\n    \n}\n\npublic extension RealmCollection where Element: Object {\n    \n    /**\n     Filter results from Realm query using MKCoordinateRegion\n     \n     - parameter region:       Region that fits MapKit view\n     - parameter latitudeKey:  Set to use different latitude key in query (default: \"lat\")\n     - parameter longitudeKey: Set to use different longitude key in query (default: \"lng\")\n     \n     - returns: Filtered objects inside MKCoordinateRegion\n     */\n    func filterGeoRegion(region: MKCoordinateRegion, latitudeKey: String = \"lat\", longitudeKey: String = \"lng\") throws -> Results<Element> {\n        \n        // Realm instance pre-check\n        guard let _ = realm else { throw GeoQueriesError.invalidRealm(\"RLMRealm instance is needed to call this method\") }\n        \n        let box = region.geoBox\n        \n        let topLeftPredicate = NSPredicate(format: \"%K <= %f AND %K >= %f\", latitudeKey, box.topLeft.latitude, longitudeKey, box.topLeft.longitude)\n        let bottomRightPredicate = NSPredicate(format: \"%K >= %f AND %K <= %f\", latitudeKey, box.bottomRight.latitude, longitudeKey, box.bottomRight.longitude)\n        let compoundPredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [topLeftPredicate, bottomRightPredicate])\n        \n        return self.filter(compoundPredicate)\n        \n    }\n    \n    /**\n     Filter results from Realm query using GeoBox\n     \n     - parameter box:          GeoBox struct\n     - parameter latitudeKey:  Set to use different latitude key in query (default: \"lat\")\n     - parameter longitudeKey: Set to use different longitude key in query (default: \"lng\")\n     \n     - returns: Filtered objects inside GeoBox\n     */\n    func filterGeoBox(box: GeoBox, latitudeKey: String = \"lat\", longitudeKey: String = \"lng\") throws -> Results<Element> {\n        \n        // Realm instance pre-check\n        guard let _ = realm else { throw GeoQueriesError.invalidRealm(\"RLMRealm instance is needed to call this method\") }\n        \n        let topLeftPredicate = NSPredicate(format: \"%K <= %f AND %K >= %f\", latitudeKey, box.topLeft.latitude, longitudeKey, box.topLeft.longitude)\n        let bottomRightPredicate = NSPredicate(format: \"%K >= %f AND %K <= %f\", latitudeKey, box.bottomRight.latitude, longitudeKey, box.bottomRight.longitude)\n        let compoundPredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [topLeftPredicate, bottomRightPredicate])\n        \n        return self.filter(compoundPredicate)\n        \n    }\n    \n    /**\n     Filter results from center and distance radius\n     \n     - parameter center:       Center coordinate\n     - parameter radius:       Radius in meters\n     - parameter sort:         Sort by distance (optionl)\n     - parameter latitudeKey:  Set to use different latitude key in query (default: \"lat\")\n     - parameter longitudeKey: Set to use different longitude key in query (default: \"lng\")\n     \n     - returns: Found objects inside radius around the center coordinate\n     */\n    func filterGeoRadius(center: CLLocationCoordinate2D, radius: Double, sortAscending sort: Bool?, latitudeKey: String = \"lat\", longitudeKey: String = \"lng\") throws -> [Element] {\n        \n        // Realm instance pre-check\n        guard let _ = realm else { throw GeoQueriesError.invalidRealm(\"RLMRealm instance is needed to call this method\") }\n        \n        // Get box\n        let inBox = try filterGeoBox(box: center.geoBox(radius: radius), latitudeKey: latitudeKey, longitudeKey: longitudeKey)\n        \n        // add distance\n        let distance = inBox.addDistance(center: center, latitudeKey: latitudeKey, longitudeKey: longitudeKey)\n        \n        // Inside radius\n        let radius = distance.filter { (obj: Object) -> Bool in\n            return obj.objDist <= radius\n        }\n        \n        // Sort results\n        guard let s = sort else { return radius }\n        \n        return radius.sort(ascending: s)\n        \n    }\n    \n    /// Sort by distance\n    ///\n    /// - Parameters:\n    ///   - center: Center coordinate\n    ///   - ascending: Ascendig or descending\n    ///   - latitudeKey: Set to use different latitude key in query (default: \"lat\")\n    ///   - longitudeKey: Set to use different longitude key in query (default: \"lng\")\n    /// - Returns: Sorted objects\n    func sortByDistance(center: CLLocationCoordinate2D, ascending: Bool, latitudeKey: String = \"lat\", longitudeKey: String = \"lng\") -> [Element] {\n        \n        return self\n            .addDistance(center: center, latitudeKey: latitudeKey, longitudeKey: longitudeKey)\n            .sort(ascending: ascending)\n        \n    }\n    \n}\n\n// MARK: - Public core extensions\n\n/// GeoBox struct. Set top-left and bottom-right coordinate to create a box\npublic struct GeoBox {\n\n    public var topLeft: CLLocationCoordinate2D\n    public var bottomRight: CLLocationCoordinate2D\n\n    public init(topLeft: CLLocationCoordinate2D, bottomRight: CLLocationCoordinate2D) {\n        self.topLeft = topLeft\n        self.bottomRight = bottomRight\n    }\n    \n}\n\npublic extension CLLocationCoordinate2D {\n    \n    /**\n     Accessory function to convert CLLocationCoordinate2D to GeoBox\n     \n     - parameter radius: Radius in meters\n     \n     - returns: GeoBox struct\n     */\n    func geoBox(radius: Double) -> GeoBox {\n        #if swift(>=4.2)\n        return MKCoordinateRegion(center: self, latitudinalMeters: radius * 2.0, longitudinalMeters: radius * 2.0).geoBox\n        #else\n        return MKCoordinateRegion.init(center: self, latitudinalMeters: radius * 2.0, longitudinalMeters: radius * 2.0).geoBox\n        #endif\n    }\n    \n}\n\npublic extension MKCoordinateRegion {\n    \n    /// Accessory function to convert MKCoordinateRegion to GeoBox\n    var geoBox: GeoBox {\n        \n        let maxLat = self.center.latitude + (self.span.latitudeDelta / 2.0)\n        let minLat = self.center.latitude - (self.span.latitudeDelta / 2.0)\n        let maxLng = self.center.longitude + (self.span.longitudeDelta / 2.0)\n        let minLng = self.center.longitude - (self.span.longitudeDelta / 2.0)\n        \n        return GeoBox(\n            topLeft: CLLocationCoordinate2D(latitude: maxLat, longitude: minLng),\n            bottomRight: CLLocationCoordinate2D(latitude: minLat, longitude: maxLng)\n        )\n        \n    }\n    \n}\n\nprivate extension Array where Element: Object {\n    \n    /**\n     Sorting function\n     \n     - parameter ascending: Ascending/Descending\n     \n     - returns: Array of [Object] sorted by distance\n     */\n    func sort(ascending: Bool = true) -> [Iterator.Element] {\n        \n        return self.sorted(by: { (a: Object, b: Object) -> Bool in\n            \n            if ascending {\n                \n                return a.objDist < b.objDist\n                \n            } else {\n                \n                return a.objDist > b.objDist\n                \n            }\n            \n        })\n        \n    }\n    \n}\n\n// MARK: - Private core extensions\nprivate extension RealmCollection where Element: Object {\n    \n    /**\n     Add distance to sort results\n     \n     - parameter center:       Center coordinate\n     - parameter latitudeKey:  Set to use different latitude key in query (default: \"lat\")\n     - parameter longitudeKey: Set to use different longitude key in query (default: \"lng\")\n     \n     - returns: Array of results sorted\n     */\n    func addDistance(center: CLLocationCoordinate2D, latitudeKey: String = \"lat\", longitudeKey: String = \"lng\") -> [Element] {\n        \n        return self.map { (obj) -> Element in\n            \n            // Calculate distance\n            let location = CLLocation(latitude: obj.value(forKeyPath: latitudeKey) as! CLLocationDegrees, longitude: obj.value(forKeyPath: longitudeKey) as! CLLocationDegrees)\n            let center = CLLocation(latitude: center.latitude, longitude: center.longitude)\n            let distance = location.distance(from: center)\n            \n            // Save\n            obj.objDist = distance\n            \n            return obj\n            \n        }\n        \n    }\n    \n}\n\nprivate extension Object {\n    \n    private struct AssociatedKeys {\n        static var DistanceKey = \"DistanceKey\"\n    }\n    \n    var objDist: Double {\n        get {\n            guard let value = objc_getAssociatedObject(self, &AssociatedKeys.DistanceKey) as? Double else { return 0.0 }\n            return value\n        }\n        set (value) { objc_setAssociatedObject(self, &AssociatedKeys.DistanceKey, value, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) }\n    }\n    \n}\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "Package.swift",
    "content": "// swift-tools-version:5.1\n// The swift-tools-version declares the minimum version of Swift required to build this package.\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"GeoQueries\",\n    products: [\n        .library(\n            name: \"GeoQueries\",\n            targets: [\"GeoQueries\"]),\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/realm/realm-cocoa.git\", from: \"4.3.0\"),\n    ],\n    targets: [\n        .target(\n            name: \"GeoQueries\",\n            dependencies: [\"RealmSwift\"],\n            path: \".\",\n            sources: [\"GeoQueries.swift\"]\n        )\n    ]\n)\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\" >\n<img src=\"https://raw.github.com/mhergon/RealmGeoQueries/assets/logo.png\" alt=\"RealmGeoQueries\" title=\"Logo\" height=300>\n</p>\n\n![cocoapods](https://img.shields.io/cocoapods/v/RealmGeoQueries.svg?style=flat)\n![carthage](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)\n![issues](https://img.shields.io/github/issues/mhergon/RealmGeoQueries.svg)\n![stars](https://img.shields.io/github/stars/mhergon/RealmGeoQueries.svg)\n![license](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg)\n\nRealmGeoQueries simplifies spatial queries with [Realm Cocoa][1]. In the absence of and official functions, this library provide the possibility to do proximity search.\nIt's not necessary to include Geohash or other types of indexes in the model class as it only needs latitude and longitude properties.\n\n## How To Get Started\n\n### Installation with CocoaPods\n\n```ruby\nplatform :ios, '9.0'\npod \"RealmGeoQueries\"\n```\n\n### Installation with Carthage\n\nAdd to `mhergon/RealmGeoQueries` project to your `Cartfile`\n```ruby\ngithub \"mhergon/RealmGeoQueries\"\n```\n\nDrag `GeoQueries.framework`, `RealmSwift.framework` and `Realm.framework` from Carthage/Build/ to the “Linked Frameworks and Libraries” section of your Xcode project’s “General” settings.\n\nOnly on **iOS/tvOS/watchOS**: On your application targets \"Build Phases\" settings tab, click the \"+\" icon and choose \"New Run Script Phase\". Create a Run Script with the following contents:\n```ruby\n/usr/local/bin/carthage copy-frameworks\n```\nand add the paths to the frameworks you want to use under \"Input Files\", e.g.:\n```ruby\n$(SRCROOT)/Carthage/Build/iOS/GeoQueries.framework\n$(SRCROOT)/Carthage/Build/iOS/Realm.framework\n$(SRCROOT)/Carthage/Build/iOS/RealmSwift.framework\n```\n\n### Swift Package Manager\n\nOnce you have your Swift package set up, adding RealmGeoQueries as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/mhergon/RealmGeoQueries.git\", from: \"1.4.0\")\n]\n```\n\n### Manually installation\n\n[Download](https://github.com/mhergon/RealmGeoQueries/raw/master/GeoQueries.swift) (right-click) and add to your project.\n\n### Requirements\n\n| Version | Language | Minimum iOS Target |\n|:--------------------:|:---------------------------:|:---------------------------:|\n|          1.4         |            Swift 5.x / Realm 5.x            |            iOS 9            |\n|          1.3         |            Swift 4.x / Realm 3.x            |            iOS 9            |\n|          1.2         |            Swift 3.0 / Realm 2.x            |            iOS 9            |\n|          1.1         |            Swift 2.x / Realm 2.x            |            iOS 8            |\n\n### Usage\n\nFirst, import module;\n```swift\nimport GeoQueries\n```\n\nModel must have a latitude and longitude keys, that have to be named \"lat\" and \"lng\" respectively. You can use another property names (use \"latitudeKey\" and \"longitudeKey\" parameters).\n\n<br>\n\nSearch with MapView MKCoordinateRegion;\n```swift\nlet results = try! Realm()\n    .findInRegion(type: YourModelClass.self, region: mapView.region)\n```\n<br>\n\nSearch around the center with radius in meters;\n```swift\nlet results = try! Realm()\n    .findNearby(type: YourModelClass.self, origin: mapView.centerCoordinate, radius: 500, sortAscending: nil)\n```\n<br>\n\nFilter Realm results with radius in meters;\n```swift\nlet results = try! Realm()\n    .objects(YourModelClass.self)\n    .filter(\"type\", \"restaurant\")\n    .filterGeoRadius(center: mapView.centerCoordinate, radius: 500, sortAscending: nil)\n```\n<br>\n\nSee ```GeoQueries.swift``` for more options.\n\n## Contact\n\n- [Linkedin][2]\n- [Twitter][3] (@mhergon)\n\n[1]: http://www.realm.io\n[2]: https://es.linkedin.com/in/marchervera\n[3]: http://twitter.com/mhergon \"Marc Hervera\"\n\n## License\n\nLicensed under Apache License v2.0.\n<br>\nCopyright 2020 Marc Hervera.\n"
  },
  {
    "path": "RealmGeoQueries/AppDelegate.swift",
    "content": "//\n//  AppDelegate.swift\n//  RealmGeoQueries\n//\n//  Created by mhergon on 4/10/17.\n//  Copyright © 2017 mhergon. All rights reserved.\n//\n\nimport UIKit\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    var window: UIWindow?\n\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n        \n        window = UIWindow(frame: UIScreen.main.bounds)\n        window?.backgroundColor = UIColor.white\n        window?.makeKeyAndVisible()\n        \n        // DB\n        initialSetup()\n        \n        // Views\n        let boxView = BoxViewController()\n        boxView.tabBarItem = UITabBarItem(title: \"Box query\", image: UIImage(named: \"box\"), tag: 0)\n        let radiusView = RadiusViewController()\n        radiusView.tabBarItem = UITabBarItem(title: \"Radius query\", image: UIImage(named: \"radius\"), tag: 1)\n        \n        let tabBar = UITabBarController()\n        tabBar.viewControllers = [boxView, radiusView]\n        self.window?.rootViewController = tabBar\n        \n        return true\n    }\n\n    func applicationWillResignActive(_ application: UIApplication) {\n        // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.\n        // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.\n    }\n\n    func applicationDidEnterBackground(_ application: UIApplication) {\n        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.\n        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.\n    }\n\n    func applicationWillEnterForeground(_ application: UIApplication) {\n        // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.\n    }\n\n    func applicationDidBecomeActive(_ application: UIApplication) {\n        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.\n    }\n\n    func applicationWillTerminate(_ application: UIApplication) {\n        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n    }\n\n    //MARK:- Methods\n    func initialSetup() {\n        \n        let path = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)[0] as NSString\n        let filePath = path.appendingPathComponent(\"default.realm\")\n        \n        let fileManager = FileManager.default\n        guard !fileManager.fileExists(atPath: filePath) else {\n            return\n        }\n\n        if let db = Bundle.main.path(forResource: \"RealmGeoQueriesPoints\", ofType: \"realm\") {\n            try! fileManager.copyItem(atPath: db, toPath: filePath)\n        }\n        \n    }\n    \n}\n\n"
  },
  {
    "path": "RealmGeoQueries/Controllers/BoxViewController.swift",
    "content": "//\n//  BoViewController.swift\n//  RealmGeoQueries\n//\n//  Created by mhergon on 4/10/17.\n//  Copyright © 2017 mhergon. All rights reserved.\n//\n\nimport UIKit\nimport MapKit\nimport RealmSwift\n\nfileprivate let AnnotationIdentifier = \"AnnotationIdentifier\"\n\nclass BoxViewController: UIViewController {\n\n    // MARK: - Properties\n    @IBOutlet weak var mapView: MKMapView!\n    \n    fileprivate var results: Results<Point>?\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        reloadData()\n        \n    }\n\n    //MARK:- Methods\n    func reloadData() {\n        \n        // Get results\n        results = try! Realm().findInRegion(type: Point.self, region: mapView.region)\n        \n        // Add to map\n        guard let r = results else { return }\n        \n        // Remove previous annotations\n        self.mapView.removeAnnotations(self.mapView.annotations)\n        \n        // Marina services\n        var annotations = [Annotation]()\n        for p in r {\n            \n            let coordinate = CLLocationCoordinate2D(latitude: p.lat, longitude: p.lng)\n            let a = Annotation(location: coordinate, name: p.name)\n            annotations.append(a)\n            \n        }\n        \n        // Add new annotations\n        self.mapView.addAnnotations(annotations)\n        \n    }\n    \n}\n\n// MARK: - MKMapViewDelegate\nextension BoxViewController: MKMapViewDelegate {\n    \n    func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) {\n        \n        reloadData()\n        \n    }\n    \n    func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {\n        \n        // User location\n        if annotation is MKUserLocation {\n            return nil\n        }\n        \n        guard let a = annotation as? Annotation else {\n            return nil\n        }\n        \n        // Marinas\n        var pin = mapView.dequeueReusableAnnotationView(withIdentifier: AnnotationIdentifier)\n        if pin == nil {\n            pin = MKPinAnnotationView(annotation: annotation, reuseIdentifier: AnnotationIdentifier)\n            pin?.canShowCallout = true\n        }\n        \n        pin?.annotation = a\n        \n        return pin\n        \n    }\n    \n}\n"
  },
  {
    "path": "RealmGeoQueries/Controllers/BoxViewController.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"13196\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13173\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\" customClass=\"BoxViewController\" customModule=\"RealmGeoQueries\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"mapView\" destination=\"BCw-CS-EPc\" id=\"VeE-mA-ONU\"/>\n                <outlet property=\"view\" destination=\"i5M-Pr-FkT\" id=\"sfx-zR-JGt\"/>\n            </connections>\n        </placeholder>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view clearsContextBeforeDrawing=\"NO\" contentMode=\"scaleToFill\" id=\"i5M-Pr-FkT\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n            <subviews>\n                <mapView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" mapType=\"standard\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"BCw-CS-EPc\">\n                    <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"647\"/>\n                    <connections>\n                        <outlet property=\"delegate\" destination=\"-1\" id=\"5Rg-s4-fPn\"/>\n                    </connections>\n                </mapView>\n            </subviews>\n            <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n            <constraints>\n                <constraint firstItem=\"BCw-CS-EPc\" firstAttribute=\"top\" secondItem=\"fnl-2z-Ty3\" secondAttribute=\"top\" id=\"GxF-ax-SHo\"/>\n                <constraint firstItem=\"BCw-CS-EPc\" firstAttribute=\"leading\" secondItem=\"fnl-2z-Ty3\" secondAttribute=\"leading\" id=\"WRD-sx-0xf\"/>\n                <constraint firstItem=\"BCw-CS-EPc\" firstAttribute=\"trailing\" secondItem=\"fnl-2z-Ty3\" secondAttribute=\"trailing\" id=\"hyD-3n-A3n\"/>\n                <constraint firstItem=\"fnl-2z-Ty3\" firstAttribute=\"bottom\" secondItem=\"BCw-CS-EPc\" secondAttribute=\"bottom\" id=\"miK-B8-gTm\"/>\n            </constraints>\n            <viewLayoutGuide key=\"safeArea\" id=\"fnl-2z-Ty3\"/>\n            <point key=\"canvasLocation\" x=\"-286\" y=\"23\"/>\n        </view>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmGeoQueries/Controllers/RadiusViewController.swift",
    "content": "//\n//  RadiusViewController.swift\n//  RealmGeoQueries\n//\n//  Created by mhergon on 4/10/17.\n//  Copyright © 2017 mhergon. All rights reserved.\n//\n\nimport UIKit\nimport MapKit\nimport RealmSwift\n\nfileprivate let AnnotationIdentifier = \"AnnotationIdentifier\"\n\nclass RadiusViewController: UIViewController {\n\n    // MARK: - Properties\n    @IBOutlet weak var mapView: MKMapView!\n    \n    fileprivate var results: [Point]?\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        reloadData()\n        \n    }\n\n    // MARK:- Methods\n    func reloadData() {\n        \n        // Get results\n        let radius = 450000.0 // 450 km\n        results = try! Realm().findNearby(type: Point.self, origin: mapView.centerCoordinate, radius: radius, sortAscending: true)\n        \n        // Add to map\n        guard let r = results else { return }\n        \n        // Remove previous annotations\n        self.mapView.removeAnnotations(self.mapView.annotations)\n        \n        // Marina services\n        var annotations = [Annotation]()\n        for p in r {\n            \n            let coordinate = CLLocationCoordinate2D(latitude: p.lat, longitude: p.lng)\n            let a = Annotation(location: coordinate, name: p.name)\n            annotations.append(a)\n            \n        }\n        \n        // Add new annotations\n        self.mapView.addAnnotations(annotations)\n        \n        // Add circle\n        mapView.removeOverlays(mapView.overlays)\n        let circle = MKCircle(center: mapView.centerCoordinate, radius: radius)\n        mapView.addOverlay(circle)\n        \n    }\n\n}\n\n// MARK: - MKMapViewDelegate\nextension RadiusViewController: MKMapViewDelegate {\n    \n    func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) {\n        \n        reloadData()\n        \n    }\n    \n    func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {\n        \n        // User location\n        if annotation is MKUserLocation {\n            return nil\n        }\n        \n        guard let a = annotation as? Annotation else {\n            return nil\n        }\n        \n        // Marinas\n        var pin = mapView.dequeueReusableAnnotationView(withIdentifier: AnnotationIdentifier)\n        if pin == nil {\n            pin = MKPinAnnotationView(annotation: annotation, reuseIdentifier: AnnotationIdentifier)\n            pin?.canShowCallout = true\n        }\n        \n        pin?.annotation = a\n        \n        return pin\n        \n    }\n    \n    func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {\n        \n        let circle = MKCircleRenderer(overlay: overlay)\n        circle.strokeColor = UIColor.red\n        circle.fillColor = UIColor(red: 255, green: 0, blue: 0, alpha: 0.1)\n        circle.lineWidth = 1\n        return circle\n        \n    }\n    \n}\n"
  },
  {
    "path": "RealmGeoQueries/Controllers/RadiusViewController.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"13196\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13173\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\" customClass=\"RadiusViewController\" customModule=\"RealmGeoQueries\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"mapView\" destination=\"UIe-kI-AKu\" id=\"uwQ-kk-ksd\"/>\n                <outlet property=\"view\" destination=\"i5M-Pr-FkT\" id=\"sfx-zR-JGt\"/>\n            </connections>\n        </placeholder>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view clearsContextBeforeDrawing=\"NO\" contentMode=\"scaleToFill\" id=\"i5M-Pr-FkT\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n            <subviews>\n                <mapView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" mapType=\"standard\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"UIe-kI-AKu\">\n                    <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"647\"/>\n                    <connections>\n                        <outlet property=\"delegate\" destination=\"-1\" id=\"U2b-IN-494\"/>\n                    </connections>\n                </mapView>\n            </subviews>\n            <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n            <constraints>\n                <constraint firstItem=\"UIe-kI-AKu\" firstAttribute=\"top\" secondItem=\"fnl-2z-Ty3\" secondAttribute=\"top\" id=\"5CU-yw-FcV\"/>\n                <constraint firstItem=\"fnl-2z-Ty3\" firstAttribute=\"trailing\" secondItem=\"UIe-kI-AKu\" secondAttribute=\"trailing\" id=\"pcs-f0-j4X\"/>\n                <constraint firstItem=\"UIe-kI-AKu\" firstAttribute=\"leading\" secondItem=\"i5M-Pr-FkT\" secondAttribute=\"leading\" id=\"tWh-KI-YY3\"/>\n                <constraint firstItem=\"fnl-2z-Ty3\" firstAttribute=\"bottom\" secondItem=\"UIe-kI-AKu\" secondAttribute=\"bottom\" id=\"ugY-FS-K2E\"/>\n            </constraints>\n            <viewLayoutGuide key=\"safeArea\" id=\"fnl-2z-Ty3\"/>\n            <point key=\"canvasLocation\" x=\"33.5\" y=\"54.5\"/>\n        </view>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmGeoQueries/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>BoxViewController</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "RealmGeoQueries/Model/Annotation.swift",
    "content": "//\n//  Annotation.swift\n//  Geohash-Mapbox\n//\n//  Created by mhergon on 21/5/15.\n//  Copyright (c) 2015 mhergon. All rights reserved.\n//\n\nimport UIKit\nimport CoreLocation\nimport MapKit\n\nclass Annotation: NSObject, MKAnnotation {\n   \n    let coordinate: CLLocationCoordinate2D\n    var title: String?\n    var subtitle: String?\n    \n    init(location coordinate: CLLocationCoordinate2D, name: String?) {\n        self.coordinate = coordinate\n        self.title = name\n    }\n\n}\n"
  },
  {
    "path": "RealmGeoQueries/Model/Point.swift",
    "content": "//\n//  Point.swift\n//  TestGeoQuery\n//\n//  Created by mhergon on 30/11/15.\n//  Copyright © 2015 mhergon. All rights reserved.\n//\n\nimport Realm\nimport RealmSwift\n\nclass Point: Object {\n    \n    @objc dynamic var name = \"\"\n    @objc dynamic var lat: Double = 0.0\n    @objc dynamic var lng: Double = 0.0\n    \n}\n"
  },
  {
    "path": "RealmGeoQueries/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ios-marketing\",\n      \"size\" : \"1024x1024\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmGeoQueries/Resources/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmGeoQueries/Resources/Assets.xcassets/box.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"box.pdf\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmGeoQueries/Resources/Assets.xcassets/radius.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"radius.pdf\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmGeoQueries.podspec",
    "content": "Pod::Spec.new do |spec|\n  spec.name             = 'RealmGeoQueries'\n  spec.platform         = :ios, \"9.0\"\n  spec.version          = '1.3.2'\n  spec.license          = { :type => 'Apache License, Version 2.0' }\n  spec.homepage         = 'https://github.com/mhergon/RealmGeoQueries'\n  spec.authors          = { 'Marc Hervera' => 'mhergon@gmail.com' }\n  spec.summary          = 'Realm GeoQueries made easy'\n  spec.source           = { :git => 'https://github.com/mhergon/RealmGeoQueries.git', :tag => 'v1.3.2' }\n  spec.source_files     = 'GeoQueries.swift'\n  spec.ios.frameworks   = 'CoreLocation', 'MapKit'\n  spec.dependency       'RealmSwift'\n  spec.requires_arc     = true\n  spec.module_name      = 'GeoQueries'\nend\n"
  },
  {
    "path": "RealmGeoQueries.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 48;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t4B1ABE061F84F40700566726 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1ABE051F84F40700566726 /* MapKit.framework */; };\n\t\t4B1ABE071F84F74900566726 /* RealmGeoQueriesPoints.realm in Resources */ = {isa = PBXBuildFile; fileRef = 4B1F42481F84BA7C00ABFE1B /* RealmGeoQueriesPoints.realm */; };\n\t\t4B1F422B1F84B76D00ABFE1B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F422A1F84B76D00ABFE1B /* AppDelegate.swift */; };\n\t\t4B1F42321F84B76D00ABFE1B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B1F42311F84B76D00ABFE1B /* Assets.xcassets */; };\n\t\t4B1F423E1F84B89B00ABFE1B /* BoxViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B1F423C1F84B89B00ABFE1B /* BoxViewController.xib */; };\n\t\t4B1F423F1F84B89B00ABFE1B /* BoxViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F423D1F84B89B00ABFE1B /* BoxViewController.swift */; };\n\t\t4B1F42461F84BA4900ABFE1B /* RadiusViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B1F42441F84BA4900ABFE1B /* RadiusViewController.xib */; };\n\t\t4B1F42471F84BA4900ABFE1B /* RadiusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F42451F84BA4900ABFE1B /* RadiusViewController.swift */; };\n\t\t4B1F42511F84C5D900ABFE1B /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1F424F1F84C5D900ABFE1B /* RealmSwift.framework */; };\n\t\t4B1F42521F84C5D900ABFE1B /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1F42501F84C5D900ABFE1B /* Realm.framework */; };\n\t\t4B1F42561F84D86A00ABFE1B /* Point.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F42541F84D7D000ABFE1B /* Point.swift */; };\n\t\t4B1F42571F84D86C00ABFE1B /* Annotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F42551F84D7D000ABFE1B /* Annotation.swift */; };\n\t\t4BC1E8BF1F84FDB900AF3BE0 /* GeoQueries.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC1E8BD1F84FDB900AF3BE0 /* GeoQueries.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t4BC1E8C21F84FDB900AF3BE0 /* GeoQueries.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC1E8BB1F84FDB900AF3BE0 /* GeoQueries.framework */; };\n\t\t4BC1E8C31F84FDB900AF3BE0 /* GeoQueries.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC1E8BB1F84FDB900AF3BE0 /* GeoQueries.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };\n\t\t4BC1E8C91F84FE0D00AF3BE0 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1F42501F84C5D900ABFE1B /* Realm.framework */; };\n\t\t4BC1E8CA1F84FE0D00AF3BE0 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1F424F1F84C5D900ABFE1B /* RealmSwift.framework */; };\n\t\t4BC1E8D21F85529D00AF3BE0 /* RealmGeoQueriesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BC1E8D11F85529D00AF3BE0 /* RealmGeoQueriesTests.swift */; };\n\t\t4BC1E8D91F85539B00AF3BE0 /* GeoQueries.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC1E8BB1F84FDB900AF3BE0 /* GeoQueries.framework */; };\n\t\t4BC1E8DA1F8553A600AF3BE0 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1F42501F84C5D900ABFE1B /* Realm.framework */; };\n\t\t4BC1E8DB1F8553A600AF3BE0 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1F424F1F84C5D900ABFE1B /* RealmSwift.framework */; };\n\t\t4BC1E8DE1F8556D900AF3BE0 /* TestPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BC1E8DD1F8556D900AF3BE0 /* TestPoint.swift */; };\n\t\t4BDD4545223ACD0500AC34E3 /* GeoQueries.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BDD4544223ACD0500AC34E3 /* GeoQueries.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t4BC1E8C01F84FDB900AF3BE0 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 4B1F421F1F84B76D00ABFE1B /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 4BC1E8BA1F84FDB900AF3BE0;\n\t\t\tremoteInfo = GeoQueries;\n\t\t};\n\t\t4BC1E8D41F85529D00AF3BE0 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 4B1F421F1F84B76D00ABFE1B /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 4B1F42261F84B76D00ABFE1B;\n\t\t\tremoteInfo = RealmGeoQueries;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t4BC1E8C71F84FDB900AF3BE0 /* Embed Frameworks */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t\t4BC1E8C31F84FDB900AF3BE0 /* GeoQueries.framework in Embed Frameworks */,\n\t\t\t);\n\t\t\tname = \"Embed Frameworks\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t4B1ABE051F84F40700566726 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };\n\t\t4B1F42271F84B76D00ABFE1B /* RealmGeoQueries.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RealmGeoQueries.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t4B1F422A1F84B76D00ABFE1B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t4B1F42311F84B76D00ABFE1B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t4B1F42361F84B76D00ABFE1B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t4B1F423C1F84B89B00ABFE1B /* BoxViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BoxViewController.xib; sourceTree = \"<group>\"; };\n\t\t4B1F423D1F84B89B00ABFE1B /* BoxViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoxViewController.swift; sourceTree = \"<group>\"; };\n\t\t4B1F42441F84BA4900ABFE1B /* RadiusViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RadiusViewController.xib; sourceTree = \"<group>\"; };\n\t\t4B1F42451F84BA4900ABFE1B /* RadiusViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadiusViewController.swift; sourceTree = \"<group>\"; };\n\t\t4B1F42481F84BA7C00ABFE1B /* RealmGeoQueriesPoints.realm */ = {isa = PBXFileReference; lastKnownFileType = file; path = RealmGeoQueriesPoints.realm; sourceTree = \"<group>\"; };\n\t\t4B1F424F1F84C5D900ABFE1B /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = Carthage/Build/iOS/RealmSwift.framework; sourceTree = \"<group>\"; };\n\t\t4B1F42501F84C5D900ABFE1B /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = Carthage/Build/iOS/Realm.framework; sourceTree = \"<group>\"; };\n\t\t4B1F42541F84D7D000ABFE1B /* Point.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Point.swift; sourceTree = \"<group>\"; };\n\t\t4B1F42551F84D7D000ABFE1B /* Annotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Annotation.swift; sourceTree = \"<group>\"; };\n\t\t4BC1E8BB1F84FDB900AF3BE0 /* GeoQueries.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GeoQueries.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t4BC1E8BD1F84FDB900AF3BE0 /* GeoQueries.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeoQueries.h; sourceTree = \"<group>\"; };\n\t\t4BC1E8BE1F84FDB900AF3BE0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t4BC1E8CF1F85529D00AF3BE0 /* RealmGeoQueriesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RealmGeoQueriesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t4BC1E8D11F85529D00AF3BE0 /* RealmGeoQueriesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RealmGeoQueriesTests.swift; sourceTree = \"<group>\"; };\n\t\t4BC1E8D31F85529D00AF3BE0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t4BC1E8DD1F8556D900AF3BE0 /* TestPoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestPoint.swift; sourceTree = \"<group>\"; };\n\t\t4BDD4544223ACD0500AC34E3 /* GeoQueries.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeoQueries.swift; sourceTree = SOURCE_ROOT; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t4B1F42241F84B76D00ABFE1B /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t4B1F42511F84C5D900ABFE1B /* RealmSwift.framework in Frameworks */,\n\t\t\t\t4BC1E8C21F84FDB900AF3BE0 /* GeoQueries.framework in Frameworks */,\n\t\t\t\t4B1ABE061F84F40700566726 /* MapKit.framework in Frameworks */,\n\t\t\t\t4B1F42521F84C5D900ABFE1B /* Realm.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t4BC1E8B71F84FDB900AF3BE0 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t4BC1E8C91F84FE0D00AF3BE0 /* Realm.framework in Frameworks */,\n\t\t\t\t4BC1E8CA1F84FE0D00AF3BE0 /* RealmSwift.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t4BC1E8CC1F85529D00AF3BE0 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t4BC1E8DA1F8553A600AF3BE0 /* Realm.framework in Frameworks */,\n\t\t\t\t4BC1E8DB1F8553A600AF3BE0 /* RealmSwift.framework in Frameworks */,\n\t\t\t\t4BC1E8D91F85539B00AF3BE0 /* GeoQueries.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t4B1F421E1F84B76D00ABFE1B = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4B1F42291F84B76D00ABFE1B /* RealmGeoQueries */,\n\t\t\t\t4BC1E8BC1F84FDB900AF3BE0 /* GeoQueries */,\n\t\t\t\t4BC1E8D01F85529D00AF3BE0 /* RealmGeoQueriesTests */,\n\t\t\t\t4B1F42281F84B76D00ABFE1B /* Products */,\n\t\t\t\t4B1F424E1F84C5D800ABFE1B /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4B1F42281F84B76D00ABFE1B /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4B1F42271F84B76D00ABFE1B /* RealmGeoQueries.app */,\n\t\t\t\t4BC1E8BB1F84FDB900AF3BE0 /* GeoQueries.framework */,\n\t\t\t\t4BC1E8CF1F85529D00AF3BE0 /* RealmGeoQueriesTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4B1F42291F84B76D00ABFE1B /* RealmGeoQueries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4B1F422A1F84B76D00ABFE1B /* AppDelegate.swift */,\n\t\t\t\t4B1F42361F84B76D00ABFE1B /* Info.plist */,\n\t\t\t\t4BDD4543223ACAD700AC34E3 /* GeoQueries */,\n\t\t\t\t4B1F42531F84D7C500ABFE1B /* Model */,\n\t\t\t\t4B1F42491F84BAD000ABFE1B /* Resources */,\n\t\t\t\t4B1F42401F84B89F00ABFE1B /* Controllers */,\n\t\t\t);\n\t\t\tpath = RealmGeoQueries;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4B1F42401F84B89F00ABFE1B /* Controllers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4B1F423D1F84B89B00ABFE1B /* BoxViewController.swift */,\n\t\t\t\t4B1F423C1F84B89B00ABFE1B /* BoxViewController.xib */,\n\t\t\t\t4B1F42451F84BA4900ABFE1B /* RadiusViewController.swift */,\n\t\t\t\t4B1F42441F84BA4900ABFE1B /* RadiusViewController.xib */,\n\t\t\t);\n\t\t\tpath = Controllers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4B1F42491F84BAD000ABFE1B /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4B1F42311F84B76D00ABFE1B /* Assets.xcassets */,\n\t\t\t\t4B1F42481F84BA7C00ABFE1B /* RealmGeoQueriesPoints.realm */,\n\t\t\t);\n\t\t\tpath = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4B1F424E1F84C5D800ABFE1B /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4B1ABE051F84F40700566726 /* MapKit.framework */,\n\t\t\t\t4B1F42501F84C5D900ABFE1B /* Realm.framework */,\n\t\t\t\t4B1F424F1F84C5D900ABFE1B /* RealmSwift.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4B1F42531F84D7C500ABFE1B /* Model */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4B1F42541F84D7D000ABFE1B /* Point.swift */,\n\t\t\t\t4B1F42551F84D7D000ABFE1B /* Annotation.swift */,\n\t\t\t);\n\t\t\tpath = Model;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4BC1E8BC1F84FDB900AF3BE0 /* GeoQueries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4BC1E8BD1F84FDB900AF3BE0 /* GeoQueries.h */,\n\t\t\t\t4BC1E8BE1F84FDB900AF3BE0 /* Info.plist */,\n\t\t\t);\n\t\t\tpath = GeoQueries;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4BC1E8D01F85529D00AF3BE0 /* RealmGeoQueriesTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4BC1E8DD1F8556D900AF3BE0 /* TestPoint.swift */,\n\t\t\t\t4BC1E8D11F85529D00AF3BE0 /* RealmGeoQueriesTests.swift */,\n\t\t\t\t4BC1E8D31F85529D00AF3BE0 /* Info.plist */,\n\t\t\t);\n\t\t\tpath = RealmGeoQueriesTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4BDD4543223ACAD700AC34E3 /* GeoQueries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4BDD4544223ACD0500AC34E3 /* GeoQueries.swift */,\n\t\t\t);\n\t\t\tpath = GeoQueries;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t4BC1E8B81F84FDB900AF3BE0 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t4BC1E8BF1F84FDB900AF3BE0 /* GeoQueries.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t4B1F42261F84B76D00ABFE1B /* RealmGeoQueries */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 4B1F42391F84B76D00ABFE1B /* Build configuration list for PBXNativeTarget \"RealmGeoQueries\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t4B1F42231F84B76D00ABFE1B /* Sources */,\n\t\t\t\t4B1F42241F84B76D00ABFE1B /* Frameworks */,\n\t\t\t\t4B1F42251F84B76D00ABFE1B /* Resources */,\n\t\t\t\t4B1F424D1F84C55E00ABFE1B /* ShellScript */,\n\t\t\t\t4BC1E8C71F84FDB900AF3BE0 /* Embed Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t4BC1E8C11F84FDB900AF3BE0 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = RealmGeoQueries;\n\t\t\tproductName = RealmGeoQueries;\n\t\t\tproductReference = 4B1F42271F84B76D00ABFE1B /* RealmGeoQueries.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n\t\t4BC1E8BA1F84FDB900AF3BE0 /* GeoQueries */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 4BC1E8C41F84FDB900AF3BE0 /* Build configuration list for PBXNativeTarget \"GeoQueries\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t4BC1E8B61F84FDB900AF3BE0 /* Sources */,\n\t\t\t\t4BC1E8B71F84FDB900AF3BE0 /* Frameworks */,\n\t\t\t\t4BC1E8B81F84FDB900AF3BE0 /* Headers */,\n\t\t\t\t4BC1E8B91F84FDB900AF3BE0 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = GeoQueries;\n\t\t\tproductName = GeoQueries;\n\t\t\tproductReference = 4BC1E8BB1F84FDB900AF3BE0 /* GeoQueries.framework */;\n\t\t\tproductType = \"com.apple.product-type.framework\";\n\t\t};\n\t\t4BC1E8CE1F85529D00AF3BE0 /* RealmGeoQueriesTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 4BC1E8D61F85529D00AF3BE0 /* Build configuration list for PBXNativeTarget \"RealmGeoQueriesTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t4BC1E8CB1F85529D00AF3BE0 /* Sources */,\n\t\t\t\t4BC1E8CC1F85529D00AF3BE0 /* Frameworks */,\n\t\t\t\t4BC1E8CD1F85529D00AF3BE0 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t4BC1E8D51F85529D00AF3BE0 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = RealmGeoQueriesTests;\n\t\t\tproductName = RealmGeoQueriesTests;\n\t\t\tproductReference = 4BC1E8CF1F85529D00AF3BE0 /* RealmGeoQueriesTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t4B1F421F1F84B76D00ABFE1B /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0900;\n\t\t\t\tLastUpgradeCheck = 1010;\n\t\t\t\tORGANIZATIONNAME = mhergon;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t4B1F42261F84B76D00ABFE1B = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.0;\n\t\t\t\t\t\tLastSwiftMigration = 1010;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t\tSystemCapabilities = {\n\t\t\t\t\t\t\tcom.apple.Maps.iOS = {\n\t\t\t\t\t\t\t\tenabled = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\t4BC1E8BA1F84FDB900AF3BE0 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.0;\n\t\t\t\t\t\tLastSwiftMigration = 1010;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t};\n\t\t\t\t\t4BC1E8CE1F85529D00AF3BE0 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.0;\n\t\t\t\t\t\tLastSwiftMigration = 1010;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t\tTestTargetID = 4B1F42261F84B76D00ABFE1B;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 4B1F42221F84B76D00ABFE1B /* Build configuration list for PBXProject \"RealmGeoQueries\" */;\n\t\t\tcompatibilityVersion = \"Xcode 8.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 4B1F421E1F84B76D00ABFE1B;\n\t\t\tproductRefGroup = 4B1F42281F84B76D00ABFE1B /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t4B1F42261F84B76D00ABFE1B /* RealmGeoQueries */,\n\t\t\t\t4BC1E8BA1F84FDB900AF3BE0 /* GeoQueries */,\n\t\t\t\t4BC1E8CE1F85529D00AF3BE0 /* RealmGeoQueriesTests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t4B1F42251F84B76D00ABFE1B /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t4B1F42461F84BA4900ABFE1B /* RadiusViewController.xib in Resources */,\n\t\t\t\t4B1ABE071F84F74900566726 /* RealmGeoQueriesPoints.realm in Resources */,\n\t\t\t\t4B1F42321F84B76D00ABFE1B /* Assets.xcassets in Resources */,\n\t\t\t\t4B1F423E1F84B89B00ABFE1B /* BoxViewController.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t4BC1E8B91F84FDB900AF3BE0 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t4BC1E8CD1F85529D00AF3BE0 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t4B1F424D1F84C55E00ABFE1B /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"$(SRCROOT)/Carthage/Build/iOS/RealmSwift.framework\",\n\t\t\t\t\"$(SRCROOT)/Carthage/Build/iOS/Realm.framework\",\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RealmSwift.framework\",\n\t\t\t\t\"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Realm.framework\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"/usr/local/bin/carthage copy-frameworks\\n\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t4B1F42231F84B76D00ABFE1B /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t4B1F42561F84D86A00ABFE1B /* Point.swift in Sources */,\n\t\t\t\t4B1F42571F84D86C00ABFE1B /* Annotation.swift in Sources */,\n\t\t\t\t4B1F422B1F84B76D00ABFE1B /* AppDelegate.swift in Sources */,\n\t\t\t\t4B1F42471F84BA4900ABFE1B /* RadiusViewController.swift in Sources */,\n\t\t\t\t4BDD4545223ACD0500AC34E3 /* GeoQueries.swift in Sources */,\n\t\t\t\t4B1F423F1F84B89B00ABFE1B /* BoxViewController.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t4BC1E8B61F84FDB900AF3BE0 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t4BC1E8CB1F85529D00AF3BE0 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t4BC1E8DE1F8556D900AF3BE0 /* TestPoint.swift in Sources */,\n\t\t\t\t4BC1E8D21F85529D00AF3BE0 /* RealmGeoQueriesTests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t4BC1E8C11F84FDB900AF3BE0 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 4BC1E8BA1F84FDB900AF3BE0 /* GeoQueries */;\n\t\t\ttargetProxy = 4BC1E8C01F84FDB900AF3BE0 /* PBXContainerItemProxy */;\n\t\t};\n\t\t4BC1E8D51F85529D00AF3BE0 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 4B1F42261F84B76D00ABFE1B /* RealmGeoQueries */;\n\t\t\ttargetProxy = 4BC1E8D41F85529D00AF3BE0 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin XCBuildConfiguration section */\n\t\t4B1F42371F84B76D00ABFE1B /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t4B1F42381F84B76D00ABFE1B /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Owholemodule\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t4B1F423A1F84B76D00ABFE1B /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = E6L68FW2WH;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Carthage/Build/iOS\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = RealmGeoQueries/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.mhergon.RealmGeoQueries;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 4.2;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t4B1F423B1F84B76D00ABFE1B /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = E6L68FW2WH;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Carthage/Build/iOS\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = RealmGeoQueries/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.mhergon.RealmGeoQueries;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 4.2;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t4BC1E8C51F84FDB900AF3BE0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDEVELOPMENT_TEAM = E6L68FW2WH;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Carthage/Build/iOS\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = GeoQueries/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.mhergon.GeoQueries;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME:c99extidentifier)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_VERSION = 4.2;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t4BC1E8C61F84FDB900AF3BE0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDEVELOPMENT_TEAM = E6L68FW2WH;\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Carthage/Build/iOS\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = GeoQueries/Info.plist;\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.mhergon.GeoQueries;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME:c99extidentifier)\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_VERSION = 4.2;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t4BC1E8D71F85529D00AF3BE0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Carthage/Build/iOS\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = RealmGeoQueriesTests/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.mhergon.RealmGeoQueriesTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 4.2;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/RealmGeoQueries.app/RealmGeoQueries\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t4BC1E8D81F85529D00AF3BE0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Carthage/Build/iOS\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = RealmGeoQueriesTests/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.mhergon.RealmGeoQueriesTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 4.2;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/RealmGeoQueries.app/RealmGeoQueries\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t4B1F42221F84B76D00ABFE1B /* Build configuration list for PBXProject \"RealmGeoQueries\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t4B1F42371F84B76D00ABFE1B /* Debug */,\n\t\t\t\t4B1F42381F84B76D00ABFE1B /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t4B1F42391F84B76D00ABFE1B /* Build configuration list for PBXNativeTarget \"RealmGeoQueries\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t4B1F423A1F84B76D00ABFE1B /* Debug */,\n\t\t\t\t4B1F423B1F84B76D00ABFE1B /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t4BC1E8C41F84FDB900AF3BE0 /* Build configuration list for PBXNativeTarget \"GeoQueries\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t4BC1E8C51F84FDB900AF3BE0 /* Debug */,\n\t\t\t\t4BC1E8C61F84FDB900AF3BE0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t4BC1E8D61F85529D00AF3BE0 /* Build configuration list for PBXNativeTarget \"RealmGeoQueriesTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t4BC1E8D71F85529D00AF3BE0 /* Debug */,\n\t\t\t\t4BC1E8D81F85529D00AF3BE0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 4B1F421F1F84B76D00ABFE1B /* Project object */;\n}\n"
  },
  {
    "path": "RealmGeoQueries.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "RealmGeoQueries.xcodeproj/xcshareddata/xcschemes/GeoQueries.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1010\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"4BC1E8BA1F84FDB900AF3BE0\"\n               BuildableName = \"GeoQueries.framework\"\n               BlueprintName = \"GeoQueries\"\n               ReferencedContainer = \"container:RealmGeoQueries.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n      </Testables>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"4BC1E8BA1F84FDB900AF3BE0\"\n            BuildableName = \"GeoQueries.framework\"\n            BlueprintName = \"GeoQueries\"\n            ReferencedContainer = \"container:RealmGeoQueries.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"4BC1E8BA1F84FDB900AF3BE0\"\n            BuildableName = \"GeoQueries.framework\"\n            BlueprintName = \"GeoQueries\"\n            ReferencedContainer = \"container:RealmGeoQueries.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "RealmGeoQueriesTests/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "RealmGeoQueriesTests/RealmGeoQueriesTests.swift",
    "content": "//\n//  RealmGeoQueriesTests.swift\n//  RealmGeoQueriesTests\n//\n//  Created by mhergon on 4/10/17.\n//  Copyright © 2017 mhergon. All rights reserved.\n//\n\nimport XCTest\nimport RealmSwift\nimport GeoQueries\nimport CoreLocation\nimport MapKit\n\nclass RealmGeoQueriesTests: XCTestCase {\n    \n    // MARK: - Properties\n    fileprivate var realm: Realm?\n    fileprivate let centerCoordinate = CLLocationCoordinate2DMake(43.0, 2.0)\n    \n    // MARK: - Setup methods\n    override func setUp() {\n        super.setUp()\n        \n        // Setup Realm\n        realm = try! Realm(configuration: Realm.Configuration(inMemoryIdentifier: \"testRealm\"))\n        \n        // Setup test points\n        try! realm?.write {\n        \n            var point = TestPoint()\n            point.lat = 43.5837\n            point.lng = 2.43782\n            realm?.add(point)\n            \n            point = TestPoint()\n            point.lat = 43.5237\n            point.lng = 2.93782\n            realm?.add(point)\n            \n            point = TestPoint()\n            point.lat = 42.5237\n            point.lng = 3.93782\n            realm?.add(point)\n            \n            point = TestPoint()\n            point.lat = 43.1237\n            point.lng = 2.90782\n            realm?.add(point)\n            \n        }\n\n    }\n    \n    override func tearDown() {\n        \n        try! realm?.write {\n            realm?.deleteAll()\n        }\n        realm = nil\n        \n        super.tearDown()\n    }\n    \n    // MARK: - General methods\n    func testFindInRegionSomePoints() {\n\n        let region = MKCoordinateRegion.init(center: centerCoordinate, span: MKCoordinateSpan.init(latitudeDelta: 2.0, longitudeDelta: 2.0))\n        let count = try! realm?.findInRegion(type: TestPoint.self, region: region).count ?? 0\n        XCTAssertGreaterThan(count, 0)\n        \n    }\n    \n    func testFindInBoxSomePoints() {\n        \n        let count = try! realm?.findInBox(type: TestPoint.self, box: centerCoordinate.geoBox(radius: 200000)).count ?? 0\n        XCTAssertGreaterThan(count, 0)\n        \n    }\n    \n    func testFindNearbySomePoints() {\n        \n        let count = try! realm?.findNearby(type: TestPoint.self, origin: centerCoordinate, radius: 100000, sortAscending: true).count ?? 0\n        XCTAssertGreaterThan(count, 0)\n        \n    }\n    \n    func testFindNearbyMinimumRadius() {\n        \n        let count = try! realm?.findNearby(type: TestPoint.self, origin: centerCoordinate, radius: 100, sortAscending: true).count ?? 0\n        XCTAssertEqual(count, 0)\n        \n    }\n    \n    // MARK: - Results methods\n    func testFilterGeoRegion() {\n        \n        let all = realm?.objects(TestPoint.self)\n        \n        let region = MKCoordinateRegion.init(center: centerCoordinate, span: MKCoordinateSpan.init(latitudeDelta: 2.0, longitudeDelta: 2.0))\n        \n        do {\n        \n            let count = try all?.filterGeoRegion(region: region).count ?? 0\n            XCTAssertGreaterThan(count, 0)\n            \n        } catch {\n            \n            XCTFail(\"\\(error)\")\n            \n        }\n        \n    }\n    \n    // MARK: - List methods\n    func testFilterGeoRegionWithoutRealm() {\n        \n        let list = List<TestPoint>()\n        \n        let point = TestPoint()\n        point.lat = 43.5837\n        point.lng = 2.43782\n        list.append(point)\n        \n        let region = MKCoordinateRegion.init(center: centerCoordinate, span: MKCoordinateSpan.init(latitudeDelta: 2.0, longitudeDelta: 2.0))\n        \n        do {\n\n            let count = try list.filterGeoRegion(region: region).count\n            XCTAssertEqual(count, 0)\n            XCTFail()\n            \n        } catch {\n            \n            XCTAssertNotNil(error)\n            \n        }\n        \n        \n    }\n    \n    \n}\n"
  },
  {
    "path": "RealmGeoQueriesTests/TestPoint.swift",
    "content": "//\n//  TestPoint.swift\n//  RealmGeoQueriesTests\n//\n//  Created by mhergon on 4/10/17.\n//  Copyright © 2017 mhergon. All rights reserved.\n//\n\nimport Realm\nimport RealmSwift\n\nclass TestPoint: Object {\n    \n    @objc dynamic var name = \"\"\n    @objc dynamic var lat: Double = 0.0\n    @objc dynamic var lng: Double = 0.0\n    \n}\n"
  }
]