Connect Objective-C framework to Swift iOS 8 app (Parse framework)

前端 未结 6 1797
你的背包
你的背包 2020-11-27 03:17

I am trying to use an Objective-C framework with the Swift programming language for iOS 8 development. This is a specific case of an import but the general problem is:

6条回答
  •  北海茫月
    2020-11-27 03:41

    A "Fool Proof" way of adding a bridging header is as follows:

    If you have a Swift project, add a new Objective-C File to your project and Xcode will prompt if you want to configure your project with a bridging header. Press yes.

    If you have a Objective-C project, add a new Swift File to it and you will get the same prompt. Press yes.

    After you get the bridging header, you can delete the file you just added if you want to.

提交回复
热议问题