Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Cocoapods in embedded framework with Xcode 6 GM

Here's my configuration :

  1. Pod X : Linked with MyProjectSharedCode, declares class SomeClass (in Objective C)
  2. MyProjectExtension : Today extension, sharing data with MyProject
  3. MyProject : Companion app to configure MyProjectExtension
  4. MyProjectSharedCode : Embedded framework for common code in MyProject and MyProjectExtension. Uses SomeClass.

I can't get it working. I've tried :

  • Importing PodX.hin MyProjectSharedCode.h, but it results in a compiler error :

include of non-modular header inside framework module

  • Which lead me to a few Stackoverflow links, including this one. However, changing this option didn't allow me to compile either. As @NachoSoto says in the accepted answer's last comment, the answer doesn't seem to work since Xcode 6 B5.

Any help/leads would be much appreciated.

like image 985
DCMaxxx Avatar asked Sep 13 '14 16:09

DCMaxxx


1 Answers

There's a good post that came out today about using the development branch of Cocoapods 0.36.0 which is where frameworks/swift support is being added.

http://swiftwala.com/cocoapods-is-ready-for-swift/

Baring that I've been linking pods into a framework and then including the headers in the bridging header. Its a little wacky but it works so long as you don't want to write swift that uses the pods in the framework itself.

Edit The pre-release version of 0.36.0 is out you can see the blog post here.

like image 180
tapi Avatar answered Oct 21 '22 09:10

tapi