Skip to content

Instantly share code, notes, and snippets.

@neonichu
Created January 20, 2015 21:16
Show Gist options
  • Save neonichu/aadebaa4c1f4584455b3 to your computer and use it in GitHub Desktop.
Save neonichu/aadebaa4c1f4584455b3 to your computer and use it in GitHub Desktop.
Using existing Xcode projects via `prepare_command`
Pod::Spec.new do |s|
s.name = "ReactiveCocoa"
s.version = "3.0.0-alpha.1"
s.summary = "A framework for composing and transforming streams of values."
s.description = "ReactiveCocoa (RAC) is an Objective-C framework for Functional Reactive Programming. It provides APIs for composing and transforming streams of values."
s.homepage = "https://github.com/ReactiveCocoa/ReactiveCocoa/"
s.license = "MIT"
s.author = { "Josh Abernathy" => "josh@github.com" }
#s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.10"
s.source = { :git => "https://github.com/ashfurrow/ReactiveCocoa.git", :tag => s.version }
s.prepare_command = <<-CMD
xcodebuild -workspace ReactiveCocoa.xcworkspace -configuration Release -scheme 'ReactiveCocoa Mac'
BUILT_PRODUCTS_DIR=`xcodebuild -workspace ReactiveCocoa.xcworkspace -configuration Release -scheme 'ReactiveCocoa Mac' -showBuildSettings|grep BUILT_PRODUCTS_DIR|head -n 1|awk '{ print $3 }'`
rm -rf ReactiveCocoa.framework
cp -a "$BUILT_PRODUCTS_DIR/ReactiveCocoa.framework" .
CMD
s.osx.preserve_paths = 'ReactiveCocoa.framework'
s.osx.public_header_files = 'ReactiveCocoa.framework/Versions/A/Headers/*.h'
s.osx.vendored_frameworks = 'ReactiveCocoa.framework'
s.osx.frameworks = ["Foundation", "AppKit"]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment