I have an Objective-C class that I am trying to use in a Swift project.
Some of the methods in this class are not suitable for Swift and the simplest solution in my opinion is to have slightly different alternatives that will work in Swift.
eg. Current Method:
+(void)doSomethingWithFormat:(NSString*)format,...; eg. New Method:
+(void)doSomethingWithString:(NSString*)string; That works fine but my problem is the new method will then be available in Objective-C projects where it isn't really needed and just clutters up the code complete menu.
My question: Is there a way to mark all of the new methods as only being available in Swift and not in Objective-C?
EDIT: What I'm hoping for is something along the lines of
@available(swift,*) +(void)doSomethingWithString:(NSString*)string; or
#if SWIFT +(void)doSomethingWithString:(NSString*)string; #endif