Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9081087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:13:50+00:00 2026-06-16T20:13:50+00:00

CocoaPods question: I have created a framework bundled with a static library inside, depending

  • 0

CocoaPods question:

I have created a framework bundled with a static library inside, depending on AFNetworking and a resource bundle (based on those two tutorials to create FWKs http://www.blackjaguarstudios.com/blog/programming/2012/11/22/xcode-45-creating-ios-framework-and-hold-my-hand-im-3-years-old and https://github.com/bclubb/iOS-Framework)

I’d love to create a podspec so that people just add a line in their Podfile, which would, on pod install, add my framework and the AFNetworking, if needed.

Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:13:52+00:00Added an answer on June 16, 2026 at 8:13 pm

    I have actually done this a lot at my office. We have tons of private source code that is re-used quite a bit. CocoaPods has helped get new projects started much quicker and makes them a whole lot easier to update.

    While it is possible to add your framework to the podspec, I have found it much easier to just pass the static library and headers over via CocoaPods rather than worry about the framework.

    You will have to update your podspec based on your project, but here are the important parts:

    s.source_files = 'StaticLib/Headers/*.h'
    s.preserve_paths = 'StaticLib/libYourLibrary.a'
    s.library = 'YourLibrary'
    s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/ProjectFolder/LibraryFolder' }    
    
    s.dependency = 'AFNetworking'
    

    This will copy your static library over as well as bring over AFNetworking with your pod too. This will make your static lib much smaller (not having to build it in) and speed up how quickly the user can import your pod.

    If you must use framework, the same stuff from above still applies, but you might have some slight tweaking to do. All a framework is is a pretty folder structure for a static lib and headers anyway, so why bother with the extra stuff. The source is all still built into the lPods.a static lib anyway. Hope this helps you out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just begun using CocoaPods today... First up I added AFNetworking, which worked fine...
I have created an iPhone project that uses uses the ZXing bar code scanning
Anybody have cocoapods working with an Ad Hoc configuration for Testflight? I have the
I am new to both Kiwi and Cocoapods. I have Cocoapods up and running
I fell in love with Cocoapods and I want to migrate all my projects
Whenever I try and gem install cocoapods I get an error Basil-MBP:Magic8Ball Basil$ gem
Working on OSX 10.8.2 After a fresh install of CocoaPods. I'm trying to $
I just got Ruby motion, and I wanted to try out Cocoapods. I installed
I use CocoaPods in my project but every time I change something it takes
Doing step by step as shown here: http://www.raywenderlich.com/12139/introduction-to-cocoapods I get an error when running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.