Just updated from 7.0.0 to 7.0.2 and received an error in:
public extension MoyaProvider {
public final class func DefaultEndpointMapping(target: Target) -> Endpoint<Target> {
guard let stringURL = target.baseURL.URLByAppendingPathComponent(target.path)?.absoluteString else {
fatalError("\(target) url is not valid")
}
return Endpoint(URL: stringURL, sampleResponseClosure: {.NetworkResponse(200, target.sampleData)}, method: target.method, parameters: target.parameters)
}
}
URLByAppendingPathComponent is non-optional, but there is a "?".
What am I doing wrong? :)
I think you are still using Swift 2.2, correct? 7.0.2 is a Swift 2.3 release (in which URLByAppendingPathComponent _is_ optional. :)
So what should i do to fix that ? @BasThomas
Use 7.0.0 on Swift 2.2 instead, upgrading to 7.0.2 once you switch to Swift 2.3 :)
Hi,
pod 'Moya', '~> 7.0.0'
pod install
Using Moya (7.0.2)
Drop to 6.5.0 working
O_o
I think you did a pod update before? I don't think pod install automatically downgrades to the specific pod version. You should be able to update to 7.0.0 again now, I think?
No,
pod 'Moya', '~> 7.0.0'
pod update
Installing Moya 7.0.2 (was 6.5.0)
@Denis1992 please use specific Moya version, like:
pod 'Moya', '7.0.0'
@sunshinejr thx.
Fixed now? ^^
@BasThomas yep, thx for answer :)
馃檶
README needs to be updated...

You are right @v-ken, it should be fixed now. Thanks for mentioning! 馃檱
Most helpful comment
@Denis1992 please use specific Moya version, like: