Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKPolyline.coordinates and MKPolyline(coordinates:) #416

Merged
merged 5 commits into from
Mar 8, 2018

Conversation

freak4pc
Copy link
Contributor

@freak4pc freak4pc commented Mar 8, 2018

This PR adds the following two additions:

  • A .coordinate property on an instance of MKPolyline, to return a list of coordinates from a provided MKPolyline.

  • A init(coordinates:) initializer, to initialize a new MKPolyline from a provided list of coordinates.

@SwifterSwiftBot
Copy link

SwifterSwiftBot commented Mar 8, 2018

1 Message
📖 Thank you for submitting a pull request to SwifterSwift. The team will review your submission as soon as possible.

Generated by 🚫 Danger

// Copyright © 2018 SwifterSwift
//

import MapKit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we'll have to wrap these extensions in #if os(iOS) || os(macOS). We support every platform and it seems to be unsupported on watchOS and tvOS < 9.2

Copy link
Contributor Author

@freak4pc freak4pc Mar 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure why it builds it in watchOS given the fact its not part of that target 🤔
f296d0b7-85c9-4bb0-b7f6-8dbe4c9a37c4

@SD10
Copy link
Member

SD10 commented Mar 8, 2018

We should also add a new subspec to the Podspec since this is the first MapKit extension:

  # MapKit Extensions
  s.subspec 'MapKit' do |sp|
    sp.source_files  = 'Sources/Extensions/MapKit/*.swift'
  end

@freak4pc freak4pc force-pushed the sm/mkpolyline-coordinates branch from 5900411 to 8dbcafe Compare March 8, 2018 20:54
@codecov
Copy link

codecov bot commented Mar 8, 2018

Codecov Report

Merging #416 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #416      +/-   ##
==========================================
+ Coverage   91.01%   91.05%   +0.03%     
==========================================
  Files          56       57       +1     
  Lines        2627     2638      +11     
==========================================
+ Hits         2391     2402      +11     
  Misses        236      236
Flag Coverage Δ
#ios 91.05% <100%> (+0.03%) ⬆️
#osx 86.61% <100%> (+0.05%) ⬆️
#tvos 86.61% <100%> (+0.05%) ⬆️
Impacted Files Coverage Δ
...urces/Extensions/MapKit/MKPolylineExtensions.swift 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edc1401...cb54069. Read the comment docs.

@freak4pc
Copy link
Contributor Author

freak4pc commented Mar 8, 2018

@SD10 Should be good to go now 👍

It's strange to me I need to define a build time rule for watchOS given the fact it's not part of that target but oh well 🤷‍♂️

@freak4pc freak4pc force-pushed the sm/mkpolyline-coordinates branch from 8dbcafe to cb54069 Compare March 8, 2018 20:56
@freak4pc
Copy link
Contributor Author

freak4pc commented Mar 8, 2018

💚

@SD10
Copy link
Member

SD10 commented Mar 8, 2018

It's strange to me I need to define a build time rule for watchOS given the fact it's not part of that target but oh well 🤷‍♂️

Yeah, to be honest, I completely forgot how we set up all the schemes to support all 4 platforms so I'm unsure as well.

Copy link
Member

@SD10 SD10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution ❤️

@SD10 SD10 merged commit 24f875d into SwifterSwift:master Mar 8, 2018
@SD10
Copy link
Member

SD10 commented Mar 8, 2018

Thank you for contributing to SwifterSwift! I've invited you to join the SwifterSwift GitHub organization - no pressure to accept! If you'd like more information on what that means, check out our contributing guidelines. Feel free to reach out if you have any questions! 😃

@freak4pc freak4pc deleted the sm/mkpolyline-coordinates branch March 8, 2018 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants