Questions tagged [objc-bridging-header]

51 questions
0
votes
1 answer

I want to use objective C code in swift. Once I add a bridging header I start getting errors for all primitive data types

I have a model @interface Section : NSObject @property (nonatomic, strong) NSString *sectionId; @property (nonatomic, strong) NSString *title; +(instancetype)createObject:(NSDictionary *)sectionInfo; @end My bridging header looks like this //…
iosCurator
  • 4,356
  • 2
  • 21
  • 25
0
votes
2 answers

iOS Swift project, already imported Objective-C file and I want to import a swift class into this Objective-C

I have a Swift project, and I successfully added some Objective C class files let say ObjectiveClass.h, into this Swift project and able to use it in the project, using bridging header. Now in the ObjectiveClass.h class, I want to import a Swift…
kenvu
  • 343
  • 6
  • 18
0
votes
0 answers

iOS Swift project, have Objective-C file and I want to import a swift class to the Objective-C file

I have a Swift project, and I successfully added some Objective C class files into this Swift project and able to use it in the project, using bridging header. Now in these Objective C classes, I want to import a Swift class. How can I do this? I've…
kenvu
  • 343
  • 6
  • 18
0
votes
0 answers

tvOS deployment target absent

I am working on my first tvos. Need suggestions from experienced developers as I dont see many solution available on net. My worry is in my project setting ,info tab, it says no macos or ios target found. How can I change it to tvos? Beside this I…
Deep
  • 51
  • 5
0
votes
0 answers

Swift build too long, maybe because include header files to every file when build

My project is using Amazon commercial service. It has a header file which is named CommonTypes.h. This file imports about 130 other header files. In the Bridging-Header.h file of my app, I include the CommonTypes.h beside the other libraries. When…
t4nhpt
  • 5,264
  • 4
  • 34
  • 43
-1
votes
1 answer

Xcode : Bridging header not recognising imports

I have a project contains objective C code and I want to implement new features using Swift so I created Bridging header and added it to the build paths, the problem now is when I add #import "xx" to the Bridging header #import is not recognized and…
1 2 3
4