Open bobongski opened 7 years ago
@bobongski Which object do you want to 'init'? If it is Jukebox, you could use it somewhat following way to initialize:
JukeBox *player = [[JukeBox alloc]init.........
@RajChanchal, have you tried this? I'm having the same issue. "'init' is unavailable" is the error message.
@cesnell , you are right pal. After trying the lib in Objective-C, I got to know the initialiser is unavailable.
And when I tried finding the reason, I came to know to following conclusion:
If you add @objc
prior to JukeboxDelegate
declaration in Jukebox.swift class, the initialiser initWithItems
will work in Objective-C.
So, the declaration will be like:
@objc public protocol JukeboxDelegate: class
To read more about Interoperability between swift and Objective-C, Go here.
@RajChanchal, thanks!
How can I use this on obj-c? I can't init