Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 703
Abhishek Avatar asked Jun 07 '16 06:06

Abhishek


1 Answers

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

like image 124
Roman Savenok Avatar answered Oct 22 '22 18:10

Roman Savenok