I'm trying to convert the Scripting Bridge header generated by sdef
and sdp
into Swift in order to be able to use it without a bridging header and obj-c wrapper. I think I came pretty close with the help of SwiftingBridge but I'm still facing an issue with properties or return values of type SBElementArray<iTunesAirPlayDevice>
and NSArray<iTunesAirPlayDevice>
for instance. If I let them like this I'm faced with issues Cannot specialize non-generic type 'SBElementArray'
and so on.
Can I convert that part of the objective C code into Swift ?
Example objective C code:
// The application program
@interface iTunesApplication : SBApplication
- (SBElementArray<iTunesAirPlayDevice *> *) AirPlayDevices;
- (SBElementArray<iTunesBrowserWindow *> *) browserWindows;
- (SBElementArray<iTunesEncoder *> *) encoders;
- (SBElementArray<iTunesEQPreset *> *) EQPresets;
- (SBElementArray<iTunesEQWindow *> *) EQWindows;
- (SBElementArray<iTunesPlaylistWindow *> *) playlistWindows;
- (SBElementArray<iTunesSource *> *) sources;
- (SBElementArray<iTunesVisual *> *) visuals;
- (SBElementArray<iTunesWindow *> *) windows;
// ...
@property (copy) NSArray<iTunesAirPlayDevice *> *currentAirPlayDevices; // the currently selected AirPlay device(s)
// ...