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

Build error for Swift 4 on Xcode 9.2 #7

Open
jianlipeel opened this issue Apr 24, 2018 · 1 comment
Open

Build error for Swift 4 on Xcode 9.2 #7

jianlipeel opened this issue Apr 24, 2018 · 1 comment

Comments

@jianlipeel
Copy link

/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.

@casouri
Copy link

casouri commented Jun 21, 2018

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
              ^

frankct310 pushed a commit to frankct310/SwiftSSDP that referenced this issue Nov 13, 2018
…MSearch request and enclose MAN header value in double quotes
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

No branches or pull requests

2 participants