How to use Swift Pod in Unity exported iOS App

Viewed 232

I have reach experience in iOS native app development, My company have a unity app. Unity app developer exported the app for iOS and shared with me. I wanted to use my own created cocoa-pod library (which I have already using in my another iOS App) into Unity iOS project.

So Unity developer exported by File -> Build Settings, choose iOS and click Build, and now I am trying integrated pod (which is written in Swift 4.2) into Unity exported of iOS project.

I have taken medium post and many more reference, I have implemented the same as conclusive direction. Please look the attached screenshot below.

Reference - https://medium.com/ios-os-x-development/swift-and-objective-c-interoperability-2add8e6d6887

enter image description here

Please look the below screenshot for autogenerated file

enter image description here

Now when I am going to import this autogenerated header file to make connection between Objective C to Swift, then it is showing error as attached screenshot below

enter image description here

Please help me to resolve this issue. Thanks in advance.

1 Answers

One thing that has hung me up on this in the past is if you get an error during the initial build, then sometimes it doesn't create the -swift.h file and then subsequent builds also get an error that it's missing. Make sure you've deleted your derived data and cleaned the build folder to reset so everything gets built from the beginning.

Related