All Projects → joncardasis → cocoapods-user-defined-build-types

joncardasis / cocoapods-user-defined-build-types

Licence: MIT License
⚒ A cocoapods plugin that can selectively set build type per pod (static library, dynamic framework, etc.)

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to cocoapods-user-defined-build-types

Java Callgraph
Programs for producing static and dynamic (runtime) call graphs for Java programs
Stars: ✭ 455 (+400%)
Mutual labels:  dynamic, static
static-string-cpp
Compile-time string manipulation library for modern C++
Stars: ✭ 34 (-62.64%)
Mutual labels:  static
kubecmd
Connect to your kubernetes' apps and run commands easily
Stars: ✭ 16 (-82.42%)
Mutual labels:  pod
QtIosCMake
📱 Deploy Qt Application for iOS with a single macro when using CMake.
Stars: ✭ 35 (-61.54%)
Mutual labels:  static
python-makefun
Dynamically create python functions with a proper signature.
Stars: ✭ 62 (-31.87%)
Mutual labels:  dynamic
subtle-ui
A collection of clever yet understated user interactions found on the web
Stars: ✭ 39 (-57.14%)
Mutual labels:  static
monopati
a minimalistic static content generator
Stars: ✭ 19 (-79.12%)
Mutual labels:  static
ReSwiftMonitor
ReSwift+redeux dev tools
Stars: ✭ 13 (-85.71%)
Mutual labels:  pod
Block-Breaker-Original
Arkanoid clone build as part of the Complete Unity C# Developer 2D course (http://gdev.tv/cudgithub)
Stars: ✭ 45 (-50.55%)
Mutual labels:  static
vite-plugin-sloth
Fresh take on static site generation, using HTML-first approach to build website. Powered by ⚡️ Vite
Stars: ✭ 39 (-57.14%)
Mutual labels:  static
Dynamic.Programming
C++ codes of Dynamic Programming algorithms
Stars: ✭ 28 (-69.23%)
Mutual labels:  dynamic
crifan.github.io
用于利用github.io去存放crifan的静态页面
Stars: ✭ 32 (-64.84%)
Mutual labels:  static
flutter dynamic
The flutter_dynamic is a library that create flutter application dynamic.
Stars: ✭ 66 (-27.47%)
Mutual labels:  dynamic
CucumberSwift
A lightweight swift Cucumber implementation
Stars: ✭ 40 (-56.04%)
Mutual labels:  pod
cocoapods-amicable
A small CocoaPods plugin that moves the Podfile checksum to a file in the Sandbox, reducing merge conflicts for teams that don't commit their Pods directory.
Stars: ✭ 30 (-67.03%)
Mutual labels:  cocoapods-plugin
readme-typing-svg
⚡ Dynamically generated, customizable SVG that gives the appearance of typing and deleting text. Typing SVGs can be used as a bio on your Github profile readme or repository.
Stars: ✭ 938 (+930.77%)
Mutual labels:  dynamic
yii2-dynamic-fields
Widget for display dynamic fields, adding and removing their using Pjax.
Stars: ✭ 52 (-42.86%)
Mutual labels:  dynamic
lens-jekyll-theme
A Jekyll version of the "Lens" theme by HTML5 UP.
Stars: ✭ 56 (-38.46%)
Mutual labels:  static
deploy-to-cocoapods-github-action
Github action for deploying to Cocoapods.org
Stars: ✭ 29 (-68.13%)
Mutual labels:  pod
overview
🤖 A collection of tools to make your Angular views more modular, scalable, and maintainable
Stars: ✭ 76 (-16.48%)
Mutual labels:  dynamic

cocoapods-user-defined-build-types

Latest Version

Allow CocoaPods to mix dynamic/static libaries/frameworks.

This plugin allows for a Podfile to specify how each Pod (or multiple Pods) should be built (ex. as a dynamic framework).

Installation

$ gem install cocoapods-user-defined-build-types

Usage

plugin 'cocoapods-user-defined-build-types'

enable_user_defined_build_types!

target "CoffeeApp" do
    pod 'Alamofire'
    pod "SwiftyJSON", :build_type => :dynamic_framework
  • Add plugin 'cocoapods-user-defined-build-types' to the top of your Podfile
  • Add the enable_user_defined_build_types! directive to the top of your Podfile (removing use_frameworks! if present)
  • Add a build_type option to one or more Pods to direct how they're built (ex. :build_type => :dynamic_framework)
  • pod install

Based on this configuration, CocoaPods will build your project such that Alamofire stays a static library (CocoaPods default) and is part of the umbrella Pods-CoffeeApp static library generated by CocoaPods. SwiftyJSON will become a dynamic framework and dynamically linked in CoffeeApp.

SUPPORTED BUILD TYPES
dynamic_library
dynamic_framework
static_library
static_framework

Why

Cocoapod's use_frameworks! directive makes all integrated Pods build as dynamic frameworks.

This can cause issues with certain Pods. You may want some pods to be static libraries and a single Pod to a dynamic framework. CocoaPods currently does not support this. The cocoapods-user-defined-build-types plugin allows for build types to be changed on a Pod-by-Pod basis, otherwise defaulting to CocoaPods default build type (static library).

This plugin was specifically built for React Native projects to be able to incorporate dynamic Swift Pods without needing to change other Pods.

Verbose Logging

Having issues? Try enabling the plugin's verbose logging from the Podfile:

plugin 'cocoapods-user-defined-build-types', {
  verbose: true
}

...

For even more detailed logging, the development flag can be set in your terminal env: export CP_DEV=1.

How

By overriding Pod::Podfile::TargetDefinition's build_type function (from cocoapods-core) to return the specifed linking (static/dynamic) and packing (library/framework), we can change how Cococpods builts specific dependencies. Currently in core, there is support for multiple build type but the use_frameworks! directive is the only way to enable framework builds, and it is an all-or-nothing approach.

License

Available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].