(1) Swift and C language communication
In Xcode, when the C language file is added to the SWIFT project, Xcode asks if the Create bridging Header is selected.
The C language header file is then referenced in the bridging header.
You can then use the C language function in the swift file.
(2) Swift and OBJECTIVE-C communication
Ibid., referencing the Objective-c language header file in the bridging header.
The classes defined in Objective-c can then be used in swift files.
(3) Objective-c and C + +
The swift language cannot execute code in the C + + language.
Objective-c need to change the. m suffix to. MM, then introduce a C + + header file in the mm file, and then use the classes defined in C + +.
Note: C + + header files cannot be introduced in the OBJECTIVE-C header file, only in mm files.
Note: MM files are called objective-c++ files.
Swift,objective-c,c,c++ Hybrid Programming