8

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.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Abhishek
  • 1,682
  • 2
  • 17
  • 29

1 Answers1

2

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

Cristik
  • 30,989
  • 25
  • 91
  • 127