4

I am trying to add some Swift code to my existing Objective-C CocoaPod. I have added a bridging header for my example project, but I can't actually get my podspec file to validate as CocoaPods isn't aware of my bridging header file. Anyone know how to fix this issue?

Thanks!

JonahGabriel
  • 3,066
  • 2
  • 18
  • 28
  • 1
    I haven't tried it myself yet but there are some info about it on the CocoaPods issues list. See [this](https://github.com/CocoaPods/CocoaPods/issues/2218) and [this](https://github.com/CocoaPods/CocoaPods/pull/2222). Hope this help :) – mokagio Jun 16 '14 at 21:15
  • Yah, I submitted an issue and it got merged into https://github.com/CocoaPods/CocoaPods/pull/2222 – JonahGabriel Jun 16 '14 at 21:32
  • If you haven't resolved it yet - I found this link to be quite useful for integrating the bridging headers into Swift. http://stackoverflow.com/questions/24002369/how-to-call-objective-c-code-from-swift I too used CocoaPods from https://github.com/soundcloud/CocoaSoundCloudAPI to install the SoundCloud API's and thus far the results are good. – inc_london Dec 31 '14 at 21:17
  • But what to do if I'd like to have 2 versions of the same library - one written on objective-c and one on swift. Is there only one solution for a such case - having 2 separate pods, like: pod 'MyLib_objc', pod 'MyLib_swift', or there are any other options, smth like (I dunno is it correct to write this way): /*for Obj-C*/ pod 'MyLib', :git => 'example.com/URL/to/repo/MyLib_objc.git'; /*for Swift*/ pod 'MyLib', :git => 'example.com/URL/to/repo/MyLib_swift.git'; – David Apr 05 '15 at 15:22

0 Answers0