Discover the world with our lifehacks

What is a Podspec?

What is a Podspec?

A Podspec, or Spec, describes a version of a Pod library. One Pod, over the course of time, will have many Specs. It includes details about where the source should be fetched from, what files to use, the build settings to apply, and other general metadata such as its name, version, and description.

What is the difference between a Podspec and Podfile?

You could say Podfile is your project configuration, and Podspec is your library configuration.

What do CocoaPods do?

CocoaPods is a library dependency management tool for OS X and iOS applications. With CocoaPods, you can define your dependencies, called pods , and manage their versions easily over time and across development environments.

How do I access Podfile?

  1. use nano from terminal, or just drag and drop inside text editor like sublime.
  2. Right click on that and choose Open With option in that you can open your Podfile in TextEditor or TextWrangler.

How do you use Podspec?

Let’s jump right to it.

  1. Step 1: Create your Podspec Repository on Github.
  2. Step 2: Add your Private Repository to your CocoaPods Installation.
  3. Step 3: Create your Pod Repository on Github.
  4. Step 4: Generate the Pod Project.
  5. Step 5: Edit the Podspec File.
  6. Step 6: Add Code in your Pod.
  7. Step 7: Push your Pod in the Specs Repo.

What is Subspec in Podspec?

One of the main purposes of subspecs is to enable configuration of a single framework. If you want separate frameworks, you should use a separate podspec for each one.

Where do you put CocoaPods?

Open the Podfile by selecting Tools | CocoaPods | Edit Podfile from the main menu….Install pods

  1. Place the caret at the code line where you add the pod, press ⌥ ⏎ , select Install, and press ⏎ .
  2. Click Install pods in the top-left corner of the editor window.
  3. From the main menu, select Tools | CocoaPods | Install.

How do I create a Podfile?

To create a new project with CocoaPods, follow these simple steps:

  1. Create a new project in Xcode as you would normally.
  2. Open a terminal window, and $ cd into your project directory.
  3. Create a Podfile. This can be done by running $ pod init .
  4. Open your Podfile.

Where is Podfile located?

The Podfile is located in the root of the Pods project. An easy way to open it is via “Open Quickly” (Shift Cmd O) typing Podfile.

What language is Podfile?

CocoaPods is an application level dependency manager for Objective-C, Swift and any other languages that run on the Objective-C runtime, such as RubyMotion, that provides a standard format for managing external libraries….CocoaPods.

Original author(s) Eloy Durán
Type Package manager
License MIT License

How do you make a Podspec file?

Creating a Podspec

  1. To create a Podspec, navigate to your project file in the Terminal.
  2. Run the following command to create the file: touch FantasticView. podspec .
  3. Now open the file using an editor.
  4. Paste the following code inside the Podspec:

What is Vendored_frameworks?

Method: Pod::Specification::DSL#vendored_frameworks= The paths of the framework bundles that come shipped with the Pod. Supports both . framework and . xcframework bundles. The frameworks will be made available to the Pod and to the consumers of the pod.