Generic subclasses of '@objc' classes cannot have an explicit '@objc' attribute

1k Views Asked by At

I am trying to add swift library in my objective c project https://github.com/vimeo/VimeoUpload

I have already added #import “-Swift.h” in my project to subclass VimeoUpload, I am adding @objc in class definition and it gives me following error

Generic subclasses of '@objc' classes cannot have an explicit '@objc' attribute because they are not directly visible from Objective-C.

1

There are 1 best solutions below

2
On

Objective-C doesn't support Swift Generics, that is why you can't add @objc directive to your class.