4

I would like create an objective-C category for an Swift existing Class: Creation.swift with its category Creation+Additions.m

I have needed an Obj-C because I have to use a C method. C and Swift together : Oh Dear ! ...

My issue : I have used a dynamic framework in which Objective-C and Swift cohabit. I have got an umbrella header for the bridging Obj-C and Swift.

However, for my category's header Creation+Additions.m, the header AppCreationKit-Swift.swift` is not found.

Issue

nhgrif
  • 61,578
  • 25
  • 134
  • 173
Hobbes
  • 119
  • 9
  • Possibly add your objective-c category method in bridging header. – Rajesh Maurya Jun 19 '15 at 12:31
  • possible duplicate of [Swift to Objective-C header not created in Xcode 6](http://stackoverflow.com/questions/24062618/swift-to-objective-c-header-not-created-in-xcode-6) (is your Swift class marked as `@objc`?) – nhgrif Jun 19 '15 at 12:44
  • @Rajesh Maurya : It's a dynamic framework so there isn't a brindging header but an umbrella header. And, I have already add my objective-c category method in header : the header AppCreationKit-Swift.swift` is not found. Thx for your answer :) – Hobbes Jun 22 '15 at 15:08
  • @ nhgrif : I have seen this post. I have already carried out their answers. The fact that I use a dynamic framework without brindging header renders my case more specific. – Hobbes Jun 22 '15 at 15:13
  • 2
    The swift compiler does not allow you to do this. I'm afraid it is not possible to have an objectiveC category for a swift class. – gprasant Jun 06 '16 at 20:28

0 Answers0