-
Notifications
You must be signed in to change notification settings - Fork 31
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
Update for Swift 3 #35
Conversation
This ports the Swift 2.2 implementation to Swift 3.
case Medium | ||
/// Large. | ||
case Large | ||
/// small. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: keep the documentation in sentence case.
request.setValue(userAgent, forHTTPHeaderField: "User-Agent") | ||
let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { (data, response, error) in | ||
let task = URLSession.shared().dataTask(with: request as URLRequest) { (data, response, error) in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make request
a var
URLRequest so this cast is unnecessary.
|
Superseded by #41. |
The saga continues in #50. |
This ports the Swift 2.2 implementation to Swift 3. It is a work in progress and there are several known issues but it is functional and can be used, for now, to help test applications written with the Xcode 8 and Swift 3 betas that use MapboxStatic.
Todo:
#if swift(>=3.0)
blocks to help maintain backwards compatibility with Swift 2.2+Known issues:
allowedCharacterSet
in Overlay.swift seems to cause an exception in thefirst Xcode 8 beta. This needs more investigation. For now, the workaround is to use an inverted
CharacterSet
forMBCustomMarker
andCharacterSet.urlPathAllowed
forGeoJSON
andPath
overlays.