Local Pod and .framework #832

onato opened this Issue Mar 4, 2013 · 8 comments

5 participants


I am trying to get my local pod to add a third party framework (WFConnector.framework).

I am getting the following compile error...

#import <WFConnector/WFConnector.h>  // file not found

I have managed to get the .framework into the Pods-resources.sh and the framework is being copied correctly into the build folder.

I have the following in my .podspec...

  s.resources = ["Resources/**/*.*", "Frameworks/WFConnector.framework"]
  s.preserve_paths =  'Frameworks/WFConnector.framework'
  s.framework  = 'WFConnector', 'ExternalAccessory', 'CoreBluetooth'
  s.ios.xcconfig       =  { 'FRAMEWORK_SEARCH_PATHS' => '"$(inherited)" "$(PODS_ROOT)/../../../Modules/MYPOD/Frameworks/"'}

At the moment the only way I can get it to compile is by dragging the WFConnector.framework into the frameworks folder of the Pods project.

Can someone tell me what I am missing?

CocoaPods member

Can you provide a Podfile+spec etc example that we can download and run to replicate the issue?


Unfortunately not. I managed to get it to compile by changing the framework and copying the header files.

  1. The aliases in the framework were not being copied so only the Versions directory was ending up in the .app. The Header and Resource folders were missing. I removed the aliases and moved the Header and Resource folders into the route of the framework.

  2. I had to change all of the #import statements in the .framework to use quotes ("") instead of brackets (<>)

  3. I added the framework headers to both source_files and public_header_files.

Are there any pods that are using a .framework supplied with the pod that I could take a look at?

CocoaPods member

Are there any pods that are using a .framework supplied with the pod that I could take a look at?


$ cd ~/.cocoapods/master
$ ag "framework('|\")" -l # ag => the_silver_searcher                                                                                                                                                                                                                       ruby-2.0.0-p0 master:678e67b

$ cat ./TextExpander/1.2.2/TextExpander.podspec
Pod::Spec.new do |s|
  s.name = 'TextExpander'
  s.version = '1.2.2'
  s.license = { :type => 'Commercial', :text => 'http://smilesoftware.com/sdk' }
  s.summary = 'Add TextExpander touch functionality to your iOS app!'
  s.homepage = 'http://smilesoftware.com/sdk'
  s.author = { 'SmileOnMyMac' => 'textexpander-touch@smilesoftware.com' }
  s.source = { :http => 'http://smilesoftware.com/downloads/teTouchSDK_1.2.2.zip' }
  s.description = 'Add TextExpander touch functionality to your iOS app!'
  s.platform = :ios
  s.source_files = 'teTouchSDK/TextExpander.framework/Versions/A/Headers/*.h'
  s.preserve_paths = 'teTouchSDK/TextExpander.framework'
  s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '$(PODS_ROOT)/TextExpander/teTouchSDK', 'OTHER_LDFLAGS' => '-framework TextExpander' }
CocoaPods member

Looking back at the previous comment, I'm noticing that it might be misunderstood. The intention was to show the process for searching podspecs to somebody not familiar with the internals of CocoaPods or the command line.

Regarding the original post it is unclear to me why you are adding it to the resources. I think that the issue is that you were missing the 'OTHER_LDFLAGS' => '-framework WFConnector'.


Thanks for the Pod searching tip.

#597 led me to believe that I had to copy the .framework into the app bundle. To get it into Pods-resources.sh where it could be copied to the app bundle I had to add it to resources.

'OTHER_LDFLAGS' => '-framework WFConnector' would be the same as adding s.framework = 'WFConnector' which I was already doing.


After removing the symbolic links from the framework that my git client was not happy with, I have managed to get everything working. Git was also not seeing a change when I replaced the symbolic link to the binary. The main problem was that the framework was not surviving the push to and clone from git.

@onato onato closed this Mar 12, 2013

Ian trying to make a simple app with the integration of ANT MACOSX library. I want to control the ANT Library output through my designed screen objects. I have referred wahoo KICKRDemo OS X sample for the same. But when i am trying to compile it showing the error WFConnector.h File not found. Can you help to to get rid over this ?
Here the code of .h file

screen shot 2015-11-25 at 6 18 02 pm


@interface AppDelegate : NSObject

NSWindow *window ;
NSArray *deviceParams;
BOOL deviceInfoUpdated;
BOOL isSearching;
NSString *statusString;
NSButton *connectButton;
NSTextField *deviceIdLabel;
NSButton *enableANTButton;
NSTextField *antAvailableLabel;
NSButton *searchButton;
NSButton *connectSCButton;

@property (assign) IBOutlet NSWindow *window;
@property (retain) NSArray *deviceParams;
@property (retain) NSMutableArray *discoveredSensors;
@property (retain) NSString *statusString;
@property (assign) IBOutlet NSButton *connectButton;
@property (assign) IBOutlet NSTextField *antAvailableLabel;
@property (assign) IBOutlet NSButton *enableANTButton;
@property (assign) IBOutlet NSTextField *deviceIdLabel;
@property (assign) IBOutlet NSTextField *signalLabel;
@property (assign) IBOutlet NSTextField *connectionStatusLabel;

// Connection

  • (IBAction)enableBTLEClicked:(id)sender;
  • (IBAction)enableANTClicked:(id)sender;
  • (IBAction)connectButtonClicked:(id)sender;
  • (IBAction)proximityCheckBoxClicked:(id)sender;
  • (IBAction)wildcardCheckBoxClicked:(id)sender;



Any more hints on this? I'm also getting my framework header not found in my example app. I'm using pod lib create so my paths are different from all of those SDK podspecs above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment