Skip to content

Instantly share code, notes, and snippets.

@claybridges
Forked from tonyarnold/ReactiveCocoa.podspec
Last active December 20, 2015 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save claybridges/6061314 to your computer and use it in GitHub Desktop.
Save claybridges/6061314 to your computer and use it in GitHub Desktop.
Podspec for ReactiveCocoa 2.0-development. A couple of fixes to work by @tonyarnold. See comments for Podfile line.
Pod::Spec.new do |s|
s.name = "ReactiveCocoa"
s.version = "2.0.0dev"
s.summary = "A framework for composing and transforming sequences of values."
s.homepage = "https://github.com/blog/1107-reactivecocoa-is-now-open-source"
s.author = { "Josh Abernathy" => "josh@github.com" }
s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveCocoa.git", :branch => '2.0-development' }
s.license = 'Simplified BSD License'
s.description = "ReactiveCocoa offers:\n" \
"1. The ability to compose operations on future data.\n" \
"2. An approach to minimizing state and mutability.\n" \
"3. A declarative way to define behaviors and the relationships between properties.\n" \
"4. A unified, high-level interface for asynchronous operations.\n" \
"5. A lovely API on top of KVO."
s.requires_arc = true
s.ios.deployment_target = '5.0'
s.osx.deployment_target = '10.7'
s.compiler_flags = '-DOS_OBJECT_USE_OBJC=0'
s.subspec 'no-arc' do |sp|
sp.source_files = 'ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.{h,m}'
sp.requires_arc = false
end
s.subspec 'Core' do |sp|
sp.dependency 'ReactiveCocoa/no-arc'
sp.source_files = 'ReactiveCocoaFramework/ReactiveCocoa/**/*.{h,m}'
sp.exclude_files = 'ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.{h,m}'
sp.ios.exclude_files = '**/*{AppKit,NSControl,NSText}*'
sp.osx.exclude_files = '**/*{UIActionSheet,UIAlertView,UIBarButtonItem,UIButton,UIControl,UIGestureRecognizer,UIText}*'
sp.header_dir = 'ReactiveCocoa'
sp.pre_install do |pod, _|
pod.source_files.each { |source|
contents = source.read
if contents.gsub!(%r{\"(EXT\w+|metamacros)\.h}, '"ReactiveCocoa/\1.h')
File.open(source, 'w') { |file| file.puts(contents) }
end
}
end
end
s.subspec 'RACExtensions' do |sp|
sp.source_files = 'RACExtensions/*.{h,m}'
sp.dependency 'ReactiveCocoa/Core'
end
end
@claybridges
Copy link
Author

Handy Podfile line:

pod 'ReactiveCocoa', :podspec => 'https://gist.github.com/claybridges/6061314/raw/6ffd3b154154af10ccb2134d9a9e7124e78cc746/ReactiveCocoa.podspec'

@tonyarnold
Copy link

What's the reasoning behind the sp.header directory? When I used that, CocoaPods just added another directory named "ReactiveCocoa" (inside a directory named "ReactiveCocoa") to the structure.

@gonzalezreal
Copy link

Fixed a couple of things in my fork: exclude UITableViewCell category from OSX builds and add fishhook subtree to iOS builds.

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