Swift port of S2 Geometry.

What's New


This Release removes production logging thanks to #11 .

S2Geometry Swift

CI Status Version Carthage Compatible Platform License


  • iOS 8.0+ / macOS 10.9+ / tvOS 9.0+ / watchOS 2.0+
  • xCode 10.3+
  • Swift 4.2+



CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate S2Geometry into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'S2GeometrySwift'


Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate S2GeometrySwift into your Xcode project using Carthage, specify it in your Cartfile:

github "philip-bui/s2-geometry-swift" 

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but S2Geometry does support its use on supported platforms.

Once you have your Swift package set up, adding S2Geometry as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/philip-bui/s2-geometry-swift.git", from: "1.0.3"))

Special Thanks

  • Google - Creator of S2Geometry.
  • Contributors - Everyone committed to keeping S2Geometry Swift up to date.


S2GeometrySwift is available under the MIT license. See LICENSE for details.


  • Swift Tools 4.0.0
View More Packages from this Author


  • None
Last updated: Fri Apr 12 2024 20:25:37 GMT-0900 (Hawaii-Aleutian Daylight Time)