I have a framework in my project that implements an extension on NSDate. The extension looks like this.
extension NSDate {
func isGreaterThanDate(otherDate: NSDate) -> Bool {
//function implementation here
}
}
I've imported this framework into an app project. Now if I copy and paste that same extension into a swift file in the app, the new copy in my app's code appears to override the copy in the framework's code.
When I'm calling this function in my app, is there a way I can use namespacing to specify which implementation I want?
The only answer I've found so far "No you can't use namespacing to protect against this." But I'm still keeping my eyes open for how to handle this situation if someone uses the same function signature like this accidentally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With