Hi,
I'm using a 3rd party C/Objective-C library that does not have any header annotations.
I was hoping to improve the API by adding an apinotes file.
For example, I was hoping that the importer could import this enum as a Swift enum:
C:
typedef enum
{
AHActionA = 0,
AHActionB,
AHActionC
} AHAction;
Swift:
enum AHAction {
case a
case b
case c
}
I tried these versions which both failed
Name: FrameworkName
Enumerators:
- Name: AHActionA
SwiftName: a
- Name: AHActionB
SwiftName: b
- Name: AHActionC
SwiftName: c
--> Result: Using AHActionA in the code gives me a fixit saying "AHActionA' has been renamed to 'a'".
a is declared as: "var a: AHAction { get }".
Name: FrameworkName
Enumerators:
- Name: AHActionA
SwiftName: AHAction.a
- Name: AHActionB
SwiftName: AHAction.b
- Name: AHActionC
SwiftName: AHAction.c
--> Result: Using AHActionA in the code gives me a fixit saying "AHActionA' has been renamed to 'AHAction.a'".
Trying to use 'AHAction.a' gives me "Type 'AHAction' has no member 'a'".
Anyone know if the above is possible using apinotes?