Inside the bridging header file, you will see some #ifndef #define and #endif lines.īetween the #define and #endif lines we need to add import statements to import every header you want to access in your Swift project. Name it YourProjectName-Bridging-Header.h, so in our case, ObjCTutorial-Bridging-Header.h So press ⌘N to create a new file, and select Header File. Now we need to create a bridging header to allow the Objective C framework to be exposed to the Swift code. Expanding these will show the available headers included in them. In the main project navigation you’ll see a Frameworks folder with your imported frameworks inside. You’ll see in this screenshot we’ve added a few other frameworks which are required for the Brother printer SDK to function, you’ll need to check the documentation of the framework you are importing to see if there are any other required dependencies.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |