mapbox / MapboxStatic.swift

Static map snapshots with overlays in Swift or Objective-C on iOS, macOS, tvOS, and watchOS
https://www.mapbox.com/api-documentation/?language=Swift#static
Other
189 stars 31 forks source link

Depend on Polyline.framework #53

Closed 1ec5 closed 6 years ago

1ec5 commented 7 years ago

Added a dependency on raphaelmor/Polyline@f86f34dac9aae7e027fd9f62c2e01dd77f1ee312. (We can pin to a newer version or release once raphaelmor/Polyline#40 lands.)

Fixes #11.

/cc @incanus

1ec5 commented 6 years ago

@bsudekum, this PR will make it much easier to upgrade to Swift 4.

1ec5 commented 6 years ago

This test currently fails:

MapboxStaticTests.ClassicOverlayTests
  testGeoJSONObject, XCTAssertNotNil failed - 
  /Users/vagrant/git/MapboxStaticTests/ClassicOverlayTests.swift:108

        XCTAssertNotNil(Snapshot(options: options, accessToken: BogusToken).image)
    }
1ec5 commented 6 years ago

Upgrading to Xcode 9 means the macOS 10.13 SDK uses different RGB component values for all the NSColor constants than UIColor does. 🙄

1ec5 commented 6 years ago

Fixed the tests in 179016cd4ccfa94f8fe61b9d73de04d8a65a239d.

In the iOS 11 and macOS 10.13 SDKs, JSONSerialization adds an extra digit of precision. Also, in the macOS 10.13 SDK, the RGB components of NSColor’s class properties differ from those of UIColor’s similarly named class properties.

1ec5 commented 6 years ago

@bsudekum @frederoni @friedbunny, this PR is ready for review.