SwiftSSDP
SwiftSSDP copied to clipboard
Build error for Swift 4 on Xcode 9.2
/Users/jianli/iosApp/examples/myTest/SwiftSSDPExample/Carthage/Checkouts/SwiftSSDP/SwiftSSDP/SSDPResponse.swift:174:43: error: 'rangeAt' has been renamed to 'range(at:)' let capturedRange = match.rangeAt(1) ^~~~~~~ range at: Foundation.NSTextCheckingResult:25:15: note: 'rangeAt' was obsoleted in Swift 4 open func rangeAt(_ idx: Int) -> NSRange
Changed to let capturedRange = match.range(at: 1), then build successful.
And there is the same error when directly build SwiftSSDP.
Thanks a lot. Your project is really great.
How did you get it to work? When I applied the fix, Carthage complains about range(at:) only available in Swift 4... Is there a way to make it happy?
/Users/yuan/p/xiaoming/Carthage/Checkouts/SwiftSSDP/SwiftSSDP/SSDPResponse.swift:174:43: error: 'range(at:)' has been renamed to 'rangeAt(_:)'
let capturedRange = match.range(at: 1)
^~~~~ ~~~~
rangeAt
Foundation.NSTextCheckingResult:28:15: note: 'range(at:)' was introduced in Swift 4
open func range(at idx: Int) -> NSRange
^