-
Notifications
You must be signed in to change notification settings - Fork 141
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
'ISO8601DateFormatter' is ambiguous for type lookup in this context #76
Comments
I’d like to suggest that perhaps this project should be a changed to category in Objective-C and an extension in Swift. We’ve unit tested Apple’s new |
@marcelofabri There is the easy fix (XCode 8, Swift 3.0):
|
I needed // Fixes 'ISO8601DateFormatter' is ambiguous for type lookup in this context
// see http://stackoverflow.com/questions/36991735/how-to-reference-a-type-in-a-module-that-has-a-type-with-the-same-name-as-the-mo
import class ISO8601DateFormatter.ISO8601DateFormatter
typealias SomePrefixISO8601DateFormatter = ISO8601DateFormatter Then I just used |
May I suggest to simply add a 3-letter prefix to the This library would have never had this issue if it followed the 3-letter prefix rule, which was introduced to specifically to avoid name clashes like this one. |
If you’re using iOS 10, I’d recommend migrating to |
I'm updating my project to use Swift 3.0 and on 3.0 ,
NSISO8601DateFormatter
becomes justISO8601DateFormatter
, which conflicts with this library.Unfortunately, using
ISO8601DateFormatter.ISO8601DateFormatter
doesn't help either (seems to be a compiler bug: https://bugs.swift.org/browse/SR-1386).An easy way to fix this would be using
module_name
in the Podspec (https://guides.cocoapods.org/syntax/podspec.html#module_name) to change the module to something else, allowingSomeModule.ISO8601DateFormatter
.The text was updated successfully, but these errors were encountered: