0

My project is in Swift and I integrated a third party library for a feature which was all hard coded in Objective-C. Now I want to access my swift files from the Objectiv-C code for smooth navigation and data accessibility.

I tried everything mentioned [here], and a file like -Swift.h is generated under Objective C generated header name. But no file is created under Derive Data folder.

I can't share the code as it is not allowed on my part, but when I import the file as #import "-Swift.h", it shows "No file Found".

I added forward declaration too. But of no use. Please help with this.

1:

nidhisoni
  • 51
  • 1
  • 6
  • Please [edit] your question and post a [example], including the complete error message and what line it points to. Don't use screenshots. – koen Feb 18 '21 at 14:28
  • It's hard to help without an example. i.e at least the sample swift code. However, the header file should be autogenerated. [This doc](https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_swift_into_objective-c) provides an in-depth info. – egghese Feb 21 '21 at 22:58

0 Answers0