{"id":2866,"date":"2017-08-14T11:22:03","date_gmt":"2017-08-14T11:22:03","guid":{"rendered":"https:\/\/intelligentbee.com\/blog\/?p=2866"},"modified":"2024-12-19T08:42:58","modified_gmt":"2024-12-19T08:42:58","slug":"create-bridging-header-ios","status":"publish","type":"post","link":"https:\/\/intelligentbee.com\/blog\/create-bridging-header-ios\/","title":{"rendered":"How to create a bridging header in iOS"},"content":{"rendered":"<p>Hello ! If you want to import a <strong>Objective-C<\/strong> code into a <strong>Swift Xcode\u00a0project<\/strong> you definitely have to create a <strong>bridging header <\/strong>(this allows you to communicate with your old Objective-C classes from your Swift classes).<\/p>\n<p>The process of doing this is very easy. Go to <strong><em>File -&gt; New -&gt; File<\/em>\u2026<\/strong> , a window will appear in which you will select <em><strong>\u201cObjective-C File\u201d<\/strong><\/em> , name the file however you choose, then select Create. A pop-up will appear asking you if you want to create a bridging header like in the image bellow.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-2868 size-full\" src=\"https:\/\/intelligentbee.com\/blog\/wp-content\/uploads\/2017\/08\/Screenshot-2017-08-10-21.05.48-1.png\" alt=\"how to create bridging header in ios\" width=\"1097\" height=\"271\" srcset=\"https:\/\/intelligentbee.com\/blog\/wp-content\/uploads\/2017\/08\/Screenshot-2017-08-10-21.05.48-1.png 1097w, https:\/\/intelligentbee.com\/blog\/wp-content\/uploads\/2017\/08\/Screenshot-2017-08-10-21.05.48-1-300x74.png 300w, https:\/\/intelligentbee.com\/blog\/wp-content\/uploads\/2017\/08\/Screenshot-2017-08-10-21.05.48-1-768x190.png 768w, https:\/\/intelligentbee.com\/blog\/wp-content\/uploads\/2017\/08\/Screenshot-2017-08-10-21.05.48-1-1024x253.png 1024w\" sizes=\"(max-width: 1097px) 100vw, 1097px\" \/><\/p>\n<p>Choose <em><strong>\u201cCreate Bridging Header\u201d<\/strong><\/em> and voila, you a have it.<br \/>\nTo complete the process delete the .m file that you choose the name and move the bridging header to a more suitable group inside the project navigator.<\/p>\n<p>&nbsp;<\/p>\n<p>That\u2019s it, hope you find this post useful and if you have suggestions please leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello ! If you want to import a Objective-C code into a Swift Xcode\u00a0project you definitely have to create a [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":2924,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,79,80],"tags":[99,158],"yst_prominent_words":[334,348,426,671,798,1013,1025,1093,1094,1095,1096,1097,1098,1099,1100],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/posts\/2866"}],"collection":[{"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/comments?post=2866"}],"version-history":[{"count":4,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/posts\/2866\/revisions"}],"predecessor-version":[{"id":133359,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/posts\/2866\/revisions\/133359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/media\/2924"}],"wp:attachment":[{"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/media?parent=2866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/categories?post=2866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/tags?post=2866"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=2866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}