Skip to content

Instantly share code, notes, and snippets.

@tonyarnold
Last active December 20, 2015 01:59
Show Gist options
  • Save tonyarnold/6053439 to your computer and use it in GitHub Desktop.
Save tonyarnold/6053439 to your computer and use it in GitHub Desktop.
ReactiveCocoa 2.0 needs to include it's own version of libextobjc specifically. Until ReactiveCocoa 2.0 is properly released, you'll need to specify `pod "ReactiveCocoa", :head` in your project's Podfile.
Pod::Spec.new do |s|
s.name = "ReactiveCocoa"
s.version = "2.0-development"
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" => "[email protected]" }
s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveCocoa.git", :branch => "fishhook-off-device" }
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}', 'external/fishhook/*.{h,c}'
sp.exclude_files = 'ReactiveCocoaFramework/ReactiveCocoa/RACObjCRuntime.{h,m}'
sp.ios.exclude_files = '**/*{AppKit,NSControl,NSText}*'
sp.osx.exclude_files = '**/*{UIActionSheet,UIAlertView,UIBarButtonItem,UIButton,UIControl,UIDatePicker,UIGestureRecognizer,UISegmentedControl,UISlider,UIStepper,UISwitch,UIText,UITableView}*'
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
@brynbellomy
Copy link

By the way, I have a fork of this gist with the above changes at https://gist.github.com/brynbellomy/6060338 ... probably better to update this gist, though, and I'll delete mine.

@claybridges
Copy link

Fixed a couple of things in my fork, works (for me!) now. Usage (in Podfile):

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

@claybridges
Copy link

@brynbellomy: I saw yours, but it wasn't clear how you were getting the 2.0 stuff (versus 1.9.x). Also, the header file spec was missing (and so "ReactiveCocoa.h" wasn't getting found).

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