I have quick classes mixed with my Objective-C code. With Swift 2.3, everything was fine and worked as expected.
I recently converted to Swift 3, and it updates several API calls due to all the renaming that happened for Swift 3. This is great; I understand.
But not surprisingly, Swift 3 seems to have renamed the method to one of my Objective-C classes. I own the Objective-C class, and I named the method what I wanted: readDeliveryInfoItems . But now, after converting to Swift 3, I can no longer call .readDeliveryInfoItems() in my Swift class. He told me that it was renamed to .readItems() .
It does not make sense. And the Objective-C class still calls the readDeliveryInfoItems method, so there is something under the covers here.
I tried to rename the Objective-C readDeliveryInfoItems to readDeliveryInfo , building (Swift does not work because it says the readInfo() method does not exist, which is good) and then renames the method back to readDeliveryInfoItems . However, when I build after this, Swift returns to the idea that the method is called readInfo() . I was hoping this would cost Xcode to upgrade the Swift bridge and rename the method back to the correct name readDeliveryInfoItems() , but that is not the case.
How can i fix this?
UPDATE ADD MORE INFORMATION
The interface of my Objective-C class has this function declaration:
- (nullable NSArray<XMPPDeliveryInfoItem *> *)readDeliveryInfoItems;
But in the Generated Interface (see MartinR comment below) for this class, this is a function declaration:
open func readItems() -> [XMPPDeliveryInfoItem]?
There are other functions in this class that are similar to the readDeliveryInfoItems function, for example:
- (nullable NSArray<XMPPDeliveryInfoItem *> *)sentDeliveryInfoItems;
And they look right in the Generated Interface:
open func sentDeliveryInfoItems() -> [XMPPDeliveryInfoItem]?
Therefore, I cannot understand why I have this problem with only one function.