Commit aa6a4cf6 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'master' into sandbox_reorganization_544

* master: (67 commits)
  [Bundle] update
  Update CHANGELOG.md
  Release 0.21.0.rc1
  [Gemspec] Update Xcodeproj
  [Bundle] update
  Changelog
  [Bundle] Update
  [Fixtures] Update for release
  [Bundle] Update
  [Rakefile] Examples robustness for future versions of Xcode
  [Changelog] Add #1099
  [CHANGELOG]
  [Generator::Xcconfig] Docs
  [Bundle] Use Xcodeproj from master
  [Installer] Rename #targets to #aggregate_targets
  Add files which were creating issues with git
  Delete files creating issues with git
  Update integration test fixtures
  Case change for case-sensitive file systems
  Update tests
  ...

Conflicts:
	lib/cocoapods/installer.rb
	lib/cocoapods/installer/target_installer.rb
	spec/integration/install_add_pod/after/Pods/Manifest.lock
	spec/integration/install_add_pod/after/Pods/Pods-JSONKit-prefix.pch
	spec/integration/install_add_pod/after/Pods/Pods-Reachability-prefix.pch
	spec/integration/install_add_pod/after/Pods/Pods-acknowledgements.markdown
	spec/integration/install_add_pod/after/Pods/Pods-acknowledgements.plist
	spec/integration/install_add_pod/after/Pods/Pods-resources.sh
	spec/integration/install_add_pod/after/Pods/Pods.xcconfig
	spec/integration/install_add_pod/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_add_pod/after/execution_output.txt
	spec/integration/install_custom_workspace/after/Pods/Manifest.lock
	spec/integration/install_custom_workspace/after/Pods/Pods-SampleApp_1-Reachability-prefix.pch
	spec/integration/install_custom_workspace/after/Pods/Pods-SampleApp_1-resources.sh
	spec/integration/install_custom_workspace/after/Pods/Pods-SampleApp_1.xcconfig
	spec/integration/install_custom_workspace/after/Pods/Pods-SampleApp_2-Reachability-prefix.pch
	spec/integration/install_custom_workspace/after/Pods/Pods-SampleApp_2-resources.sh
	spec/integration/install_custom_workspace/after/Pods/Pods-SampleApp_2.xcconfig
	spec/integration/install_custom_workspace/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_custom_workspace/after/execution_output.txt
	spec/integration/install_external_source/after/Pods/Manifest.lock
	spec/integration/install_external_source/after/Pods/Pods-PodTest-prefix.pch
	spec/integration/install_external_source/after/Pods/Pods-acknowledgements.markdown
	spec/integration/install_external_source/after/Pods/Pods-acknowledgements.plist
	spec/integration/install_external_source/after/Pods/Pods-resources.sh
	spec/integration/install_external_source/after/Pods/Pods.xcconfig
	spec/integration/install_external_source/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_external_source/after/execution_output.txt
	spec/integration/install_local_source/after/Pods/Manifest.lock
	spec/integration/install_local_source/after/Pods/Pods-Reachability-prefix.pch
	spec/integration/install_local_source/after/Pods/Pods-acknowledgements.markdown
	spec/integration/install_local_source/after/Pods/Pods-acknowledgements.plist
	spec/integration/install_local_source/after/Pods/Pods-resources.sh
	spec/integration/install_local_source/after/Pods/Pods.xcconfig
	spec/integration/install_local_source/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_local_source/after/execution_output.txt
	spec/integration/install_multiple_targets/after/Pods/Manifest.lock
	spec/integration/install_multiple_targets/after/Pods/Pods-Reachability-prefix.pch
	spec/integration/install_multiple_targets/after/Pods/Pods-SampleApp_2-Reachability-prefix.pch
	spec/integration/install_multiple_targets/after/Pods/Pods-SampleApp_2-acknowledgements.markdown
	spec/integration/install_multiple_targets/after/Pods/Pods-SampleApp_2-acknowledgements.plist
	spec/integration/install_multiple_targets/after/Pods/Pods-SampleApp_2-resources.sh
	spec/integration/install_multiple_targets/after/Pods/Pods-SampleApp_2.xcconfig
	spec/integration/install_multiple_targets/after/Pods/Pods-acknowledgements.markdown
	spec/integration/install_multiple_targets/after/Pods/Pods-acknowledgements.plist
	spec/integration/install_multiple_targets/after/Pods/Pods-resources.sh
	spec/integration/install_multiple_targets/after/Pods/Pods-test-JSONKit-prefix.pch
	spec/integration/install_multiple_targets/after/Pods/Pods-test-acknowledgements.markdown
	spec/integration/install_multiple_targets/after/Pods/Pods-test-acknowledgements.plist
	spec/integration/install_multiple_targets/after/Pods/Pods-test-resources.sh
	spec/integration/install_multiple_targets/after/Pods/Pods-test.xcconfig
	spec/integration/install_multiple_targets/after/Pods/Pods.xcconfig
	spec/integration/install_multiple_targets/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_multiple_targets/after/execution_output.txt
	spec/integration/install_new/after/Pods/Manifest.lock
	spec/integration/install_new/after/Pods/Pods-Reachability-prefix.pch
	spec/integration/install_new/after/Pods/Pods-acknowledgements.markdown
	spec/integration/install_new/after/Pods/Pods-acknowledgements.plist
	spec/integration/install_new/after/Pods/Pods-resources.sh
	spec/integration/install_new/after/Pods/Pods.xcconfig
	spec/integration/install_new/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_new/after/execution_output.txt
	spec/integration/install_podfile_callbacks/after/Pods/Manifest.lock
	spec/integration/install_podfile_callbacks/after/Pods/Pods-Reachability-prefix.pch
	spec/integration/install_podfile_callbacks/after/Pods/Pods-resources.sh
	spec/integration/install_podfile_callbacks/after/Pods/Pods.xcconfig
	spec/integration/install_podfile_callbacks/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_podfile_callbacks/after/execution_output.txt
	spec/integration/install_podspec/after/Pods/Manifest.lock
	spec/integration/install_podspec/after/Pods/Pods-acknowledgements.markdown
	spec/integration/install_podspec/after/Pods/Pods-acknowledgements.plist
	spec/integration/install_podspec/after/Pods/Pods-resources.sh
	spec/integration/install_podspec/after/Pods/Pods.xcconfig
	spec/integration/install_podspec/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_podspec/after/execution_output.txt
	spec/integration/install_remove_pod/after/Pods/Manifest.lock
	spec/integration/install_remove_pod/after/Pods/Pods-resources.sh
	spec/integration/install_remove_pod/after/Pods/Pods.xcconfig
	spec/integration/install_remove_pod/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_remove_pod/after/execution_output.txt
	spec/integration/install_spec_callbacks/after/Pods/Manifest.lock
	spec/integration/install_spec_callbacks/after/Pods/Pods-acknowledgements.markdown
	spec/integration/install_spec_callbacks/after/Pods/Pods-acknowledgements.plist
	spec/integration/install_spec_callbacks/after/Pods/Pods-resources.sh
	spec/integration/install_spec_callbacks/after/Pods/Pods.xcconfig
	spec/integration/install_spec_callbacks/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_spec_callbacks/after/execution_output.txt
	spec/integration/install_subspecs/after/Pods/Manifest.lock
	spec/integration/install_subspecs/after/Pods/Pods-OS X App-PodTest-prefix.pch
	spec/integration/install_subspecs/after/Pods/Pods-OS X App-acknowledgements.markdown
	spec/integration/install_subspecs/after/Pods/Pods-OS X App-acknowledgements.plist
	spec/integration/install_subspecs/after/Pods/Pods-OS X App-resources.sh
	spec/integration/install_subspecs/after/Pods/Pods-OS X App.xcconfig
	spec/integration/install_subspecs/after/Pods/Pods-iOS App-PodTest-prefix.pch
	spec/integration/install_subspecs/after/Pods/Pods-iOS App-acknowledgements.markdown
	spec/integration/install_subspecs/after/Pods/Pods-iOS App-acknowledgements.plist
	spec/integration/install_subspecs/after/Pods/Pods-iOS App-resources.sh
	spec/integration/install_subspecs/after/Pods/Pods-iOS App.xcconfig
	spec/integration/install_subspecs/after/Pods/Pods.xcodeproj.yaml
	spec/integration/install_subspecs/after/execution_output.txt
	spec/integration/update/after/Pods/Manifest.lock
	spec/integration/update/after/Pods/Pods-resources.sh
	spec/integration/update/after/Pods/Pods.xcconfig
	spec/integration/update/after/Pods/Pods.xcodeproj.yaml
	spec/integration/update/after/execution_output.txt
	spec/unit/installer/analyzer_spec.rb
	spec/unit/installer/target_installer_spec.rb
	spec/unit/sandbox_spec.rb
parents c38244aa 2fa29fb1
......@@ -3,10 +3,22 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master
## 0.21.0.rc1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.20.2...0.21.0.rc1)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.20.2...0.21.0.rc1)
[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.6.0...0.7.0)
###### Enhancements
* Pods are now built in dedicated targets. This enhancement isolates the build
environment of each Pod from other ones eliminating pollution issues. It also
introduces an important architectural improvement which lays the foundation
for the upcoming CocoaPods features. Stay tuned! This feature has been
implemented by [Jeremy Slater](https://github.com/jasl8r).
[#1011](https://github.com/CocoaPods/CocoaPods/issues/1011)
[#983](https://github.com/CocoaPods/CocoaPods/issues/983)
[#841](https://github.com/CocoaPods/CocoaPods/issues/841)
* Reduced external dependencies and deprecation of Rake::FileList.
[#1080](https://github.com/CocoaPods/CocoaPods/issues/1080)
......@@ -14,6 +26,9 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
* Fixed crash due to Podfile.lock containing multiple version requirements for
a Pod. [#1076](https://github.com/CocoaPods/CocoaPods/issues/1076)
* Fixed a build error due to the copy resources script using the same temporary
file for multiple targets.
[#1099](https://github.com/CocoaPods/CocoaPods/issues/1099)
## 0.20.2
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.20.1...0.20.2)
......
# Contributing
# Do’s and Don’ts
Before creating a issue or pull-request, be sure to search for existing tickets
first and provide additional feedback on those instead.
* **Search tickets before you file a new one.** Add to tickets if you have new information about the issue.
* **Only file tickets about the CocoaPods tool itself.** This includes [CocoaPods](https://github.com/CocoaPods/CocoaPods/issues),
[CocoaPods/Core](https://github.com/CocoaPods/Core/issues), and [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/issues).
If your question is “How do I []”, then please ask on [StackOverflow](http://stackoverflow.com/search?q=CocoaPods) or our [mailing-list](http://groups.google.com/group/cocoapods).
* **Keep tickets short but sweet.** Make sure you include all the context needed to solve the issue. Don't overdo it. Great tickets allow us to focus on solving problems instead of discussing them.
* **Take care of your ticket.** When you spend time to report a ticket with care we'll enjoy fixing it for you.
## Issues
The issues of this repository refer **only** to the development of the CocoaPods
tool. These resources include:
- [CocoaPods](https://github.com/CocoaPods/CocoaPods/issues)
- [CocoaPods/Core](https://github.com/CocoaPods/Core/issues)
- [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/issues)
Please refer to these other resources for things unrelated to the tool itself:
- [Mailing List](http://groups.google.com/group/cocoapods): Usage & general
questions.
- [CocoaPods/Specs](https://github.com/CocoaPods/Specs/issues): Submit new Pods and
report broken ones.
Properly written and formatted issues are more likely to receive the
appropriate attention. Or, as we say at Keeping-Sanity-in-OSS-HQ™: _“If you don’t care, we won’t care.”_
#### Bug reports
## Bug reports
Please include _all_ relevant information, including the version of CocoaPods and
any template printed by the tool.
......@@ -45,7 +29,7 @@ add an [integration test](https://github.com/CocoaPods/CocoaPods/tree/master/spe
which doesn't require any ruby knowledge.
#### Feature requests
## Feature requests
Please try to be precise about the proposed outcome of the feature and how it
would related to existing features.
......
......@@ -7,20 +7,20 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 1dfeece9a5970654588719f2c8228918ab9af0c2
revision: 6e817dc96cdaf7b76d1ecb87e4676465b948f105
branch: master
specs:
cocoapods-core (0.20.2)
cocoapods-core (0.21.0.rc1)
activesupport (~> 3.2.13)
json (~> 1.8.0)
nap (~> 0.5.1)
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: 0571050275fa11c7bb0ad50bd7945624c1d45111
revision: af8b52abcf0849d8e7f4326615c6f2dc3846aacb
branch: master
specs:
xcodeproj (0.6.0)
xcodeproj (0.7.0)
activesupport (~> 3.2.13)
colored (~> 1.2)
......@@ -61,16 +61,16 @@ GIT
PATH
remote: .
specs:
cocoapods (0.20.2)
cocoapods (0.21.0.rc1)
activesupport (~> 3.2.13)
claide (~> 0.3.2)
cocoapods-core (= 0.20.2)
cocoapods-core (= 0.21.0.rc1)
cocoapods-downloader (~> 0.1.1)
colored (~> 1.2)
escape (~> 0.0.4)
json (~> 1.8.0)
open4 (~> 1.3.0)
xcodeproj (~> 0.6.0)
xcodeproj (~> 0.7.0)
GEM
remote: http://rubygems.org/
......@@ -84,11 +84,11 @@ GEM
colored (1.2)
diffy (2.1.4)
escape (0.0.4)
ffi (1.8.1)
ffi (1.9.0)
github-markup (0.7.5)
i18n (0.6.1)
json (1.8.0)
listen (1.1.4)
listen (1.1.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
......@@ -99,7 +99,7 @@ GEM
metaclass (~> 0.0.1)
mocha-on-bacon (0.2.2)
mocha (>= 0.13.0)
multi_json (1.7.4)
multi_json (1.7.7)
nap (0.5.1)
open4 (1.3.0)
posix-spawn (0.3.6)
......@@ -128,7 +128,7 @@ GEM
term-ansicolor (1.2.2)
tins (~> 0.8)
thor (0.18.1)
tins (0.8.0)
tins (0.8.2)
yajl-ruby (1.1.0)
yard (0.8.6.1)
......
......@@ -329,11 +329,18 @@ namespace :examples do
execute_command "rm -rf Pods DerivedData"
execute_command "#{'../../bin/' unless ENV['FROM_GEM']}sandbox-pod install --verbose --no-repo-update"
command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'"
if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing.
command << " -sdk "
command << Dir.glob("#{`xcode-select -print-path`.chomp}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk").last
end
if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing.
xcode_version = `xcodebuild -version`.scan(/Xcode (.*)\n/).first.first
major_version = xcode_version.split('.').first.to_i
destination_flag_supported = major_version > 4
if destination_flag_supported
command << " -destination 'platform=iOS Simulator,name=iPhone'"
else
command << " -sdk "
command << Dir.glob("#{`xcode-select -print-path`.chomp}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk").last
end
end
execute_command(command)
end
end
......@@ -379,3 +386,4 @@ def title(title)
puts "-" * 80
puts
end
......@@ -30,7 +30,7 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA
s.add_runtime_dependency 'cocoapods-core', "= #{Pod::VERSION}"
s.add_runtime_dependency 'claide', '~> 0.3.2'
s.add_runtime_dependency 'cocoapods-downloader', '~> 0.1.1'
s.add_runtime_dependency 'xcodeproj', '~> 0.6.0'
s.add_runtime_dependency 'xcodeproj', '~> 0.7.0'
s.add_runtime_dependency 'colored', '~> 1.2'
s.add_runtime_dependency 'escape', '~> 0.0.4'
......
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:AFNetworking iOS Example.xcodeproj'/><FileRef location='group:Pods/Pods.xcodeproj'/><FileRef location='group:Pods/Generated/Pods.xcodeproj'/></Workspace>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:AFNetworking iOS Example.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Generated/Pods.xcodeproj">
</FileRef>
</Workspace>
......@@ -42,7 +42,9 @@ module Pod
autoload :ExternalSources, 'cocoapods/external_sources'
autoload :Installer, 'cocoapods/installer'
autoload :SourcesManager, 'cocoapods/sources_manager'
autoload :Library, 'cocoapods/library'
autoload :Target, 'cocoapods/target'
autoload :AggregateTarget, 'cocoapods/target/aggregate_target'
autoload :PodTarget, 'cocoapods/target/pod_target'
autoload :Project, 'cocoapods/project'
autoload :Resolver, 'cocoapods/resolver'
autoload :Sandbox, 'cocoapods/sandbox'
......@@ -51,14 +53,17 @@ module Pod
module Generator
autoload :Acknowledgements, 'cocoapods/generator/acknowledgements'
autoload :Markdown, 'cocoapods/generator/acknowledgements/markdown'
autoload :Plist, 'cocoapods/generator/acknowledgements/plist'
autoload :BridgeSupport, 'cocoapods/generator/bridge_support'
autoload :CopyResourcesScript, 'cocoapods/generator/copy_resources_script'
autoload :DummySource, 'cocoapods/generator/dummy_source'
autoload :Markdown, 'cocoapods/generator/acknowledgements/markdown'
autoload :Plist, 'cocoapods/generator/acknowledgements/plist'
autoload :PrefixHeader, 'cocoapods/generator/prefix_header'
autoload :TargetEnvironmentHeader, 'cocoapods/generator/target_environment_header'
autoload :XCConfig, 'cocoapods/generator/xcconfig'
autoload :AggregateXCConfig, 'cocoapods/generator/xcconfig/aggregate_xcconfig'
autoload :PublicPodXCConfig, 'cocoapods/generator/xcconfig/public_pod_xcconfig'
autoload :PrivatePodXCConfig, 'cocoapods/generator/xcconfig/private_pod_xcconfig'
end
module Hooks
......
module Pod
# The version of the cocoapods command line tool.
#
VERSION = '0.20.2' unless defined? Pod::VERSION
VERSION = '0.21.0.rc1' unless defined? Pod::VERSION
end
......@@ -80,7 +80,7 @@ module Pod
INSTALL_RESOURCES_FUCTION = <<EOS
#!/bin/sh
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy.txt
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
install_resource()
......
module Pod
module Generator
# Generates an xcconfig file for each target of the Pods project. The
# configuration file should be used by the user target as well.
# Generates Xcode configuration files. A configuration file is generated
# for each Pod and for each Pod target definition. The aggregates the
# configurations of the Pods and define target specific settings.
#
class XCConfig
# @return [Sandbox] the sandbox where the Pods project is installed.
# @return [Target] the target represented by this xcconfig.
#
attr_reader :target
attr_reader :sandbox
# @return [Array<Specification::Consumer>] the consumers for the
# specifications of the library which needs the xcconfig.
# @param [Target] target @see target
#
attr_reader :spec_consumers
# @return [String] the relative path of the Pods root respect the user
# project that should be integrated by this library.
#
attr_reader :relative_pods_root
# @param [Sandbox] sandbox @see sandbox
# @param [Array<LocalPod>] pods @see pods
# @param [String] relative_pods_root @see relative_pods_root
#
def initialize(sandbox, spec_consumers, relative_pods_root)
@sandbox = sandbox
@spec_consumers = spec_consumers
@relative_pods_root = relative_pods_root
end
# @return [Bool] whether the Podfile specifies to add the `-fobjc-arc`
# flag for compatibility.
#
attr_accessor :set_arc_compatibility_flag
#-----------------------------------------------------------------------#
# Generates the xcconfig for the library.
#
# @return [Xcodeproj::Config]
#
# @note The value `PODS_HEADERS_SEARCH_PATHS` is used to store the headers
# so xcconfig can reference the variable.
#
def generate
ld_flags = '-ObjC'
if set_arc_compatibility_flag && spec_consumers.any? { |consumer| consumer.requires_arc }
ld_flags << ' -fobjc-arc'
end
@xcconfig = Xcodeproj::Config.new({
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
'OTHER_LDFLAGS' => ld_flags,
'HEADER_SEARCH_PATHS' => '${PODS_HEADERS_SEARCH_PATHS}',
'PODS_ROOT' => relative_pods_root,
'PODS_HEADERS_SEARCH_PATHS' => '${PODS_PUBLIC_HEADERS_SEARCH_PATHS}',
'PODS_BUILD_HEADERS_SEARCH_PATHS' => quote(sandbox.build_headers.search_paths),
'PODS_PUBLIC_HEADERS_SEARCH_PATHS' => quote(sandbox.public_headers.search_paths),
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1'
})
spec_consumers.each do |consumer|
add_spec_build_settings_to_xcconfig(consumer, @xcconfig)
end
@xcconfig
def initialize(target)
@target = target
@sandbox = target.sandbox
end
# @return [Xcodeproj::Config] The generated xcconfig.
#
attr_reader :xcconfig
# @return [Hash] The settings of the xcconfig that the Pods project
# needs to override.
#
def self.pods_project_settings
{ 'PODS_ROOT' => '${SRCROOT}',
'PODS_HEADERS_SEARCH_PATHS' => '${PODS_BUILD_HEADERS_SEARCH_PATHS}' }
end
# Generates and saves the xcconfig to the given path.
#
# @param [Pathname] path
......@@ -88,7 +31,7 @@ module Pod
# @return [void]
#
def save_as(path)
path.open('w') { |file| file.write(generate) }
generate.save_as(path)
end
#-----------------------------------------------------------------------#
......@@ -102,12 +45,12 @@ module Pod
# Podfile.
#
def default_ld_flags
flags = %w[ -ObjC ]
requires_arc = pods.any? { |pod| pod.requires_arc? }
if requires_arc && set_arc_compatibility_flag
flags << '-fobjc-arc'
ld_flags = '-ObjC'
if target.target_definition.podfile.set_arc_compatibility_flag? and
target.spec_consumers.any? { |consumer| consumer.requires_arc? }
ld_flags << ' -fobjc-arc'
end
flags.join(" ")
ld_flags
end
# Converts an array of strings to a single string where the each string
......@@ -132,8 +75,6 @@ module Pod
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
# @return [void]
#
def add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.merge!(consumer.xcconfig)
xcconfig.libraries.merge(consumer.libraries)
......@@ -153,7 +94,7 @@ module Pod
]
# Adds the search paths of the developer frameworks to the specification
# if needed. This is done because the `SenTestingKit` requires them and
# if needed. This is done because the `SenTestingKit` requires them and
# adding them to each specification which requires it is repetitive and
# error prone.
#
......
module Pod
module Generator
# Generates the xcconfigs for the aggregate targets.
#
class AggregateXCConfig < XCConfig
# Generates the xcconfig.
#
# @note The xcconfig file for a Pods integration target includes the
# namespaced xcconfig files for each spec target dependency.
# Each namespaced configuration value is merged into the Pod
# xcconfig file.
#
# @return [Xcodeproj::Config]
#
def generate
config = {
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
'OTHER_LDFLAGS' => default_ld_flags,
'HEADER_SEARCH_PATHS' => quote(sandbox.public_headers.search_paths),
'PODS_ROOT' => target.relative_pods_root,
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
}
target.pod_targets.each do |pod_target|
xcconfig = Xcodeproj::Config.new
pod_target.spec_consumers.each do |consumer|
add_spec_build_settings_to_xcconfig(consumer, xcconfig)
end
xcconfig.to_hash.each do |k, v|
prefixed_key = pod_target.xcconfig_prefix + k
config[k] = "#{config[k]} ${#{prefixed_key}}"
end
end
@xcconfig = Xcodeproj::Config.new(config)
@xcconfig.includes = target.pod_targets.map(&:name)
@xcconfig
end
#-----------------------------------------------------------------------#
end
end
end
module Pod
module Generator
# Generates the private xcconfigs for the pod targets.
#
# The private xcconfig file for a Pod target merges the configuration
# values of the public namespaced xcconfig with the default private
# configuration values required by CocoaPods.
#
class PrivatePodXCConfig < XCConfig
# Generates the xcconfig.
#
# @return [Xcodeproj::Config]
#
def generate
config = {
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
'OTHER_LDFLAGS' => default_ld_flags,
'PODS_ROOT' => '${SRCROOT}',
'HEADER_SEARCH_PATHS' => quote(target.build_headers.search_paths) + ' ' + quote(sandbox.public_headers.search_paths),
'GCC_PREPROCESSOR_DEFINITIONS' => 'COCOAPODS=1',
# 'USE_HEADERMAP' => 'NO'
}
xcconfig = Xcodeproj::Config.new
target.spec_consumers.each do |consumer|
add_spec_build_settings_to_xcconfig(consumer, xcconfig)
end
xcconfig.to_hash.each do |k, v|
prefixed_key = target.xcconfig_prefix + k
config[k] = "#{config[k]} ${#{prefixed_key}}"
end
@xcconfig = Xcodeproj::Config.new(config)
@xcconfig.includes = [target.name]
@xcconfig
end
#-----------------------------------------------------------------------#
end
end
end
module Pod
module Generator
# Generates the public xcconfigs for the pod targets.
#
# The public xcconfig file for a Pod is completely namespaced to prevent
# configuration value collision with the build settings of other Pods. This
# xcconfig includes the standard podspec defined values including
# libraries, frameworks, weak frameworks and xcconfig overrides.
#
class PublicPodXCConfig < XCConfig
# Generates and saves the xcconfig to the given path.
#
# @param [Pathname] path
# the path where the prefix header should be stored.
#
# @return [void]
#
def save_as(path)
generate.save_as(path, target.xcconfig_prefix)
end
# Generates the xcconfig for the target.
#
# @return [Xcodeproj::Config]
#
def generate
@xcconfig = Xcodeproj::Config.new
target.spec_consumers.each do |consumer|
add_spec_build_settings_to_xcconfig(consumer, @xcconfig)
end
@xcconfig
end
#-----------------------------------------------------------------------#
end
end
end
......@@ -59,7 +59,7 @@ module Pod
#
def specs_by_lib
result = {}
installer.libraries.each do |lib|
installer.pod_targets.each do |lib|
result[installer.library_rep(lib)] = lib.specs
end
result
......@@ -70,8 +70,8 @@ module Pod
#
def pods_by_lib
result = {}
installer.libraries.each do |lib|
pod_names = lib.specs.map { |spec| spec.root.name }.uniq
installer.aggregate_targets.map(&:pod_targets).flatten.each do |lib|
pod_names = [lib.root_spec.name]
pod_reps = pods.select { |rep| pod_names.include?(rep.name) }
result[lib.target_definition] = pod_reps
end
......
......@@ -28,12 +28,14 @@ module Pod
#
class Installer
autoload :Analyzer, 'cocoapods/installer/analyzer'
autoload :FileReferencesInstaller, 'cocoapods/installer/file_references_installer'
autoload :Migrator, 'cocoapods/installer/migrator'
autoload :PodSourceInstaller, 'cocoapods/installer/pod_source_installer'
autoload :TargetInstaller, 'cocoapods/installer/target_installer'
autoload :UserProjectIntegrator, 'cocoapods/installer/user_project_integrator'
autoload :AggregateTargetInstaller, 'cocoapods/installer/target_installer/aggregate_target_installer'
autoload :Analyzer, 'cocoapods/installer/analyzer'
autoload :FileReferencesInstaller, 'cocoapods/installer/file_references_installer'
autoload :Migrator, 'cocoapods/installer/migrator'
autoload :PodSourceInstaller, 'cocoapods/installer/pod_source_installer'
autoload :PodTargetInstaller, 'cocoapods/installer/target_installer/pod_target_installer'
autoload :TargetInstaller, 'cocoapods/installer/target_installer'
autoload :UserProjectIntegrator, 'cocoapods/installer/user_project_integrator'
include Config::Mixin
......@@ -117,7 +119,8 @@ module Pod
UI.section "Generating Pods project" do
prepare_pods_project
install_file_references
install_targets
install_libraries
link_aggregate_target
run_post_install_hooks
write_pod_project
write_lockfiles
......@@ -143,10 +146,10 @@ module Pod
#
attr_reader :names_of_pods_to_install
# @return [Array<Library>] The libraries generated by the installation
# process.
# @return [Array<AggregateTarget>] The Podfile targets containing library
# dependencies.
#
attr_reader :libraries
attr_reader :aggregate_targets
# @return [Array<Specification>] The specifications that where installed.
#
......@@ -174,7 +177,7 @@ module Pod
analyzer = Analyzer.new(sandbox, podfile, lockfile)
analyzer.update_mode = update_mode
@analysis_result = analyzer.analyze
@libraries = analyzer.result.libraries
@aggregate_targets = analyzer.result.targets
end
# Prepares the Pods folder in order to be compatible with the most recent
......@@ -195,8 +198,10 @@ module Pod
# @todo [#247] Clean the headers of only the pods to install.
#
def clean_sandbox
sandbox.build_headers.implode!
sandbox.public_headers.implode!
pod_targets.each do |pod_target|
pod_target.build_headers.implode!
end
unless sandbox_state.deleted.empty?
title_options = { :verbose_prefix => "-> ".red }
......@@ -212,13 +217,15 @@ module Pod
# created by the Pod source installer as well.
#
def create_file_accessors
libraries.each do |library|
library.specs.each do |spec|
pod_root = sandbox.pod_dir(spec.root.name)
aggregate_targets.each do |target|
target.pod_targets.each do |pod_target|
pod_root = sandbox.pod_dir(pod_target.root_spec.name)
path_list = Sandbox::PathList.new(pod_root)
file_accessor = Sandbox::FileAccessor.new(path_list, spec.consumer(library.platform))
library.file_accessors ||= []
library.file_accessors << file_accessor
file_accessors = pod_target.specs.map do |spec|
Sandbox::FileAccessor.new(path_list, spec.consumer(pod_target.platform))
end
pod_target.file_accessors ||= []
pod_target.file_accessors.concat(file_accessors)
end
end
end
......@@ -251,12 +258,10 @@ module Pod
#
def install_source_of_pod(pod_name)
specs_by_platform = {}
libraries.each do |library|
specs = library.specs.select { |spec| spec.root.name == pod_name }
unless specs.empty?
specs_by_platform[library.platform] ||= []
specs_by_platform[library.platform].concat(specs)
pod_targets.each do |pod_target|
if pod_target.root_spec.name == pod_name
specs_by_platform[pod_target.platform] ||= []
specs_by_platform[pod_target.platform].concat(pod_target.specs)
end
end
......@@ -293,7 +298,7 @@ module Pod
@pods_project.add_podfile(config.podfile_path)
end
sandbox.project = @pods_project
platforms = libraries.map(&:platform)
platforms = aggregate_targets.map(&:platform)
osx_deployment_target = platforms.select { |p| p.name == :osx }.map(&:deployment_target).min
ios_deployment_target = platforms.select { |p| p.name == :ios }.map(&:deployment_target).min
@pods_project.build_configurations.each do |build_configuration|
......@@ -305,30 +310,53 @@ module Pod
# Installs the file references in the Pods project. This is done once per
# Pod as the same file reference might be shared by multiple targets.
# Pod as the same file reference might be shared by multiple aggregate
# targets.
#
# @return [void]
#
def install_file_references
installer = FileReferencesInstaller.new(sandbox, libraries, pods_project)
installer = FileReferencesInstaller.new(sandbox, pod_targets, pods_project)
installer.install!
end
# Installs the targets of the Pods projects and generates their support
# files.
# Installs the aggregate targets of the Pods projects and generates their
# support files.
#
# @return [void]
#
def install_targets
UI.message"- Installing targets" do
libraries.sort_by(&:name).each do |library|
next if library.target_definition.empty?
target_installer = TargetInstaller.new(sandbox, library)
def install_libraries
UI.message"- Installing libraries" do
pod_targets.sort_by(&:name).each do |pod_target|
next if pod_target.target_definition.empty?
target_installer = PodTargetInstaller.new(sandbox, pod_target)
target_installer.install!
end
aggregate_targets.sort_by(&:name).each do |target|
next if target.target_definition.empty?
target_installer = AggregateTargetInstaller.new(sandbox, target)
target_installer.install!
end
end
end
# Links the aggregate targets with all the dependent libraries.
#
# @note This is run in the integration step to ensure that targets
# have been created for all per spec libraries.
#
def link_aggregate_target
aggregate_targets.each do |aggregate_target|
native_target = pods_project.targets.select { |t| t.name == aggregate_target.name }.first
products = pods_project.products_group
aggregate_target.pod_targets.each do |pod_target|
product = products.files.select { |f| f.path == pod_target.product_name }.first
native_target.frameworks_build_phase.add_file_reference(product)
end
end
end
# Writes the Pods project to the disk.
#
# @return [void]
......@@ -373,9 +401,9 @@ module Pod
# information in the lockfile.
#
def integrate_user_project
UI.section "Integrating client #{'project'.pluralize(libraries.map(&:user_project_path).uniq.count) }" do
UI.section "Integrating client #{'project'.pluralize(aggregate_targets.map(&:user_project_path).uniq.count) }" do
installation_root = config.installation_root
integrator = UserProjectIntegrator.new(podfile, sandbox, installation_root, libraries)
integrator = UserProjectIntegrator.new(podfile, sandbox, installation_root, aggregate_targets)
integrator.integrate!
end
end
......@@ -521,7 +549,7 @@ module Pod
# @return [PodRepresentation] The pod representation.
#
def pod_rep(pod)
all_file_accessors = libraries.map(&:file_accessors).flatten.compact
all_file_accessors = pod_targets.map(&:file_accessors).flatten.compact
file_accessors = all_file_accessors.select { |fa| fa.spec.root.name == pod }
Hooks::PodRepresentation.new(pod, file_accessors)
end
......@@ -535,7 +563,7 @@ module Pod
# @return [Array<LibraryRepresentation>]
#
def library_reps
@library_reps ||= libraries.map { |lib| library_rep(lib) }
@library_reps ||= pod_targets.map { |lib| library_rep(lib) }
end
# @return [Array<PodRepresentation>]
......@@ -552,7 +580,14 @@ module Pod
# @return [Array<Library>] The library.
#
def libraries_using_spec(spec)
libraries.select { |lib| lib.specs.include?(spec) }
pod_targets.select { |pod_target| pod_target.specs.include?(spec) }
end
# @return [Array<Library>] The libraries generated by the installation
# process.
#
def pod_targets
aggregate_targets.map(&:pod_targets).flatten
end
#-------------------------------------------------------------------------#
......
......@@ -51,10 +51,11 @@ module Pod
@result.podfile_state = generate_podfile_state
@locked_dependencies = generate_version_locking_dependencies
@result.libraries = generated_libraries
compute_target_platforms
fetch_external_sources if allow_fetches
@result.specs_by_target = resolve_dependencies
@result.specifications = generate_specifications
@result.targets = generate_targets
@result.sandbox_state = generate_sandbox_state
@result
end
......@@ -158,44 +159,40 @@ module Pod
# Creates the models that represent the libraries generated by CocoaPods.
#
# @note The libraries are generated before the resolution process
# because it might be necessary to infer the platform from the
# user targets, which in turns requires to identify the user
# project.
#
# @note The specification of the libraries are added in the
# {#resolve_dependencies} step.
#
# @return [Array<Libraries>] the generated libraries.
#
def generated_libraries
libraries = []
podfile.target_definition_list.each do |target_definition|
lib = Library.new(target_definition)
lib.support_files_root = sandbox.library_support_files_dir(lib.name)
def generate_targets
targets = []
result.specs_by_target.each do |target_definition, specs|
target = AggregateTarget.new(target_definition, sandbox)
targets << target
if config.integrate_targets?
project_path = compute_user_project_path(target_definition)
user_project = Xcodeproj::Project.new(project_path)
targets = compute_user_project_targets(target_definition, user_project)
native_targets = compute_user_project_targets(target_definition, user_project)
lib.user_project_path = project_path
lib.client_root = project_path.dirname
lib.user_target_uuids = targets.map(&:uuid)
lib.user_build_configurations = compute_user_build_configurations(target_definition, targets)
lib.platform = compute_platform_for_target_definition(target_definition, targets)
target.user_project_path = project_path
target.client_root = project_path.dirname
target.user_target_uuids = native_targets.map(&:uuid)
target.user_build_configurations = compute_user_build_configurations(target_definition, native_targets)
else
unless target_definition.platform
raise Informative, "It is necessary to specify the platform in the Podfile if not integrating."
end
lib.client_root = config.installation_root
lib.user_target_uuids = []
lib.user_build_configurations = {}
lib.platform = target_definition.platform
target.client_root = config.installation_root
target.user_target_uuids = []
target.user_build_configurations = {}
end
grouped_specs = specs.map do |spec|
specs.select { |s| s.root == spec.root }
end.uniq
grouped_specs.each do |pod_specs|
pod_target = PodTarget.new(pod_specs, target_definition, sandbox)
pod_target.user_build_configurations = target.user_build_configurations
target.pod_targets << pod_target
end
libraries << lib
end
libraries
targets
end
# Generates dependencies that require the specific version of the Pods
......@@ -263,8 +260,6 @@ module Pod
# Converts the Podfile in a list of specifications grouped by target.
#
# @note In this step the specs are added to the libraries.
#
# @note As some dependencies might have external sources the resolver
# is aware of the {Sandbox} and interacts with it to download the
# podspecs of the external sources. This is necessary because the
......@@ -284,17 +279,10 @@ module Pod
#
def resolve_dependencies
specs_by_target = nil
UI.section "Resolving dependencies of #{UI.path podfile.defined_in_file}" do
resolver = Resolver.new(sandbox, podfile, locked_dependencies)
specs_by_target = resolver.resolve
end
specs_by_target.each do |target_definition, specs|
lib = result.libraries.find { |l| l.target_definition == target_definition}
lib.specs = specs
end
specs_by_target
end
......@@ -449,6 +437,29 @@ module Pod
Platform.new(name, deployment_target)
end
# Precompute the platforms for each target_definition in the Podfile
#
# @note The platforms are computed and added to each target_definition
# because it might be necessary to infer the platform from the
# user targets.
#
# @return [void]
#
def compute_target_platforms
podfile.target_definition_list.each do |target_definition|
if config.integrate_targets?
project_path = compute_user_project_path(target_definition)
user_project = Xcodeproj::Project.new(project_path)
targets = compute_user_project_targets(target_definition, user_project)
platform = compute_platform_for_target_definition(target_definition, targets)
else
unless target_definition.platform
raise Informative, "It is necessary to specify the platform in the Podfile if not integrating."
end
end
end
end
#-----------------------------------------------------------------------#
class AnalysisResult
......@@ -472,10 +483,10 @@ module Pod
#
attr_accessor :sandbox_state
# @return [Array<Library>] the libraries generated by the target
# definitions.
# @return [Array<Target>] The Podfile targets containing library
# dependencies.
#
attr_accessor :libraries
attr_accessor :targets
end
......
......@@ -107,18 +107,19 @@ module Pod
#
def link_headers
UI.message "- Linking headers" do
file_accessors.each do |file_accessor|
headers_sandbox = Pathname.new(file_accessor.spec.root.name)
sandbox.build_headers.add_search_path(headers_sandbox)
sandbox.public_headers.add_search_path(headers_sandbox)
header_mappings(headers_sandbox, file_accessor, file_accessor.headers).each do |namespaced_path, files|
sandbox.build_headers.add_files(namespaced_path, files)
end
header_mappings(headers_sandbox, file_accessor, file_accessor.public_headers).each do |namespaced_path, files|
sandbox.public_headers.add_files(namespaced_path, files)
libraries.each do |library|
library.file_accessors.each do |file_accessor|
headers_sandbox = Pathname.new(file_accessor.spec.root.name)
library.build_headers.add_search_path(headers_sandbox)
sandbox.public_headers.add_search_path(headers_sandbox)
header_mappings(headers_sandbox, file_accessor, file_accessor.headers).each do |namespaced_path, files|
library.build_headers.add_files(namespaced_path, files)
end
header_mappings(headers_sandbox, file_accessor, file_accessor.public_headers).each do |namespaced_path, files|
sandbox.public_headers.add_files(namespaced_path, files)
end
end
end
end
......
......@@ -33,6 +33,11 @@ module Pod
# @!group Migration Steps
# TODO: Fix copy resources script
# TODO: Fix manifest check
# TODO: Fix xcconfig
# TODO: Group target support files
#
def migrate_to_0_20
title_options = { :verbose_prefix => "-> ".green }
UI.titled_section("Migrating to CocoaPods 0.20".green, title_options) do
......
This diff is collapsed.
module Pod
class Installer
# Creates the targets which aggregate the Pods libraries in the Pods
# project and the relative support files.
#
class AggregateTargetInstaller < TargetInstaller
# Creates the target in the Pods project and the relative support files.
#
# @return [void]
#
def install!
UI.message "- Installing target `#{library.name}` #{library.platform}" do
add_target
create_suport_files_group
create_xcconfig_file
create_target_environment_header
create_bridge_support_file
create_copy_resources_script
create_acknowledgements
create_dummy_source
end
end
#-----------------------------------------------------------------------#
private
# Generates the contents of the xcconfig file and saves it to disk.
#
# @note The `ALWAYS_SEARCH_USER_PATHS` flag is enabled to support
# libraries like `EmbedReader`.
#
# @return [void]
#
def create_xcconfig_file
path = library.xcconfig_path
UI.message "- Generating xcconfig file at #{UI.path(path)}" do
gen = Generator::AggregateXCConfig.new(library)
gen.save_as(path)
library.xcconfig = gen.xcconfig
xcconfig_file_ref = add_file_to_support_group(path)
target.build_configurations.each do |c|
c.base_configuration_reference = xcconfig_file_ref
end
end
end
# Generates a header which allows to inspect at compile time the installed
# pods and the installed specifications of a pod.
#
def create_target_environment_header
path = library.target_environment_header_path
UI.message "- Generating target environment header at #{UI.path(path)}" do
generator = Generator::TargetEnvironmentHeader.new(library.pod_targets.map { |l| l.specs }.flatten)
generator.save_as(path)
add_file_to_support_group(path)
end
end
# Generates the bridge support metadata if requested by the {Podfile}.
#
# @note The bridge support metadata is added to the resources of the
# library because it is needed for environments interpreted at
# runtime.
#
# @return [void]
#
def create_bridge_support_file
if target_definition.podfile.generate_bridge_support?
path = library.bridge_support_path
UI.message "- Generating BridgeSupport metadata at #{UI.path(path)}" do
headers = target.headers_build_phase.files.map { |bf| sandbox.root + bf.file_ref.path }
generator = Generator::BridgeSupport.new(headers)
generator.save_as(path)
add_file_to_support_group(path)
@bridge_support_file = path.relative_path_from(sandbox.root)
end
end
end
# Creates a script that copies the resources to the bundle of the client
# target.
#
# @note The bridge support file needs to be created before the prefix
# header, otherwise it will not be added to the resources script.
#
# @return [void]
#
def create_copy_resources_script
path = library.copy_resources_script_path
UI.message "- Generating copy resources script at #{UI.path(path)}" do
file_accessors = library.pod_targets.map(&:file_accessors).flatten
resources = file_accessors.map { |accessor| accessor.resources.flatten.map {|res| project.relativize(res)} }.flatten
resources << bridge_support_file if bridge_support_file
generator = Generator::CopyResourcesScript.new(resources, library.platform)
generator.save_as(path)
add_file_to_support_group(path)
end
end
# Generates the acknowledgement files (markdown and plist) for the target.
#
# @return [void]
#
def create_acknowledgements
basepath = library.acknowledgements_basepath
Generator::Acknowledgements.generators.each do |generator_class|
path = generator_class.path_from_basepath(basepath)
UI.message "- Generating acknowledgements at #{UI.path(path)}" do
file_accessors = library.pod_targets.map(&:file_accessors).flatten
generator = generator_class.new(file_accessors)
generator.save_as(path)
add_file_to_support_group(path)
end
end
end
# @return [Pathname] the path of the bridge support file relative to the
# sandbox.
#
# @return [Nil] if no bridge support file was generated.
#
attr_reader :bridge_support_file
#-----------------------------------------------------------------------#
end
end
end
module Pod
class Installer
# Creates the target for the Pods libraries in the Pods project and the
# relative support files.
#
class PodTargetInstaller < TargetInstaller
# Creates the target in the Pods project and the relative support files.
#
# @return [void]
#
def install!
UI.message "- Installing target `#{library.name}` #{library.platform}" do
add_target
add_files_to_build_phases
create_suport_files_group
create_xcconfig_file
create_prefix_header
create_dummy_source
end
end
#-----------------------------------------------------------------------#
private
# Adds the build files of the pods to the target and adds a reference to
# the frameworks of the Pods.
#
# @note The Frameworks are used only for presentation purposes as the
# xcconfig is the authoritative source about their information.
#
# @return [void]
#
def add_files_to_build_phases
UI.message "- Adding Build files" do
library.file_accessors.each do |file_accessor|
consumer = file_accessor.spec_consumer
flags = compiler_flags_for_consumer(consumer)
source_files = file_accessor.source_files
file_refs = source_files.map { |sf| project.file_reference(sf) }
target.add_file_references(file_refs, flags)
file_accessor.spec_consumer.frameworks.each do |framework|
project.add_system_framework(framework, target)
end
end
end
end
# Generates the contents of the xcconfig file and saves it to disk.
#
# @note The `ALWAYS_SEARCH_USER_PATHS` flag is enabled to support
# libraries like `EmbedReader`.
#
# @return [void]
#
def create_xcconfig_file
path = library.xcconfig_path
UI.message "- Generating public xcconfig file at #{UI.path(path)}" do
gen = Generator::PublicPodXCConfig.new(library)
gen.save_as(path)
add_file_to_support_group(path)
end
path = library.xcconfig_private_path
UI.message "- Generating private xcconfig file at #{UI.path(path)}" do
gen = Generator::PrivatePodXCConfig.new(library)
gen.save_as(path)
xcconfig_file_ref = add_file_to_support_group(path)
target.build_configurations.each do |c|
c.base_configuration_reference = xcconfig_file_ref
end
end
end
# Creates a prefix header file which imports `UIKit` or `Cocoa` according
# to the platform of the target. This file also include any prefix header
# content reported by the specification of the pods.
#
# @return [void]
#
def create_prefix_header
path = library.prefix_header_path
UI.message "- Generating prefix header at #{UI.path(path)}" do
generator = Generator::PrefixHeader.new(library.file_accessors, library.platform)
generator.imports << library.target_environment_header_path.basename
generator.save_as(path)
add_file_to_support_group(path)
target.build_configurations.each do |c|
relative_path = path.relative_path_from(project.root)
c.build_settings['GCC_PREFIX_HEADER'] = relative_path.to_s
end
end
end
ENABLE_OBJECT_USE_OBJC_FROM = {
:ios => Version.new('6'),
:osx => Version.new('10.8')
}
# Returns the compiler flags for the source files of the given specification.
#
# The following behavior is regarding the `OS_OBJECT_USE_OBJC` flag. When
# set to `0`, it will allow code to use `dispatch_release()` on >= iOS 6.0
# and OS X 10.8.
#
# * New libraries that do *not* require ARC don’t need to care about this
# issue at all.
#
# * New libraries that *do* require ARC _and_ have a deployment target of
# >= iOS 6.0 or OS X 10.8:
#
# These no longer use `dispatch_release()` and should *not* have the
# `OS_OBJECT_USE_OBJC` flag set to `0`.
#
# **Note:** this means that these libraries *have* to specify the
# deployment target in order to function well.
#
# * New libraries that *do* require ARC, but have a deployment target of
# < iOS 6.0 or OS X 10.8:
#
# These contain `dispatch_release()` calls and as such need the
# `OS_OBJECT_USE_OBJC` flag set to `1`.
#
# **Note:** libraries that do *not* specify a platform version are
# assumed to have a deployment target of < iOS 6.0 or OS X 10.8.
#
# For more information, see: http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h
#
# @param [Specification::Consumer] consumer
# The consumer for the specification for which the compiler flags
# are needed.
#
# @return [String] The compiler flags.
#
def compiler_flags_for_consumer(consumer)
flags = consumer.compiler_flags.dup
if consumer.requires_arc
flags << '-fobjc-arc'
platform_name = consumer.platform_name
spec_deployment_target = consumer.spec.deployment_target(platform_name)
if spec_deployment_target.nil? || Version.new(spec_deployment_target) < ENABLE_OBJECT_USE_OBJC_FROM[platform_name]
flags << '-DOS_OBJECT_USE_OBJC=0'
end
end
if target_definition.inhibits_warnings_for_pod?(consumer.spec.root.name)
flags << '-w -Xanalyzer -analyzer-disable-checker'
end
flags * " "
end
#-----------------------------------------------------------------------#
end
end
end
......@@ -35,9 +35,9 @@ module Pod
#
attr_reader :installation_root
# @return [Library] the libraries generated by the installer.
# @return [Array<Target>] the targets represented in the Podfile.
#
attr_reader :libraries
attr_reader :targets
# @param [Podfile] podfile @see #podfile
# @param [Sandbox] sandbox @see #sandbox
......@@ -46,11 +46,11 @@ module Pod
#
# @todo Too many initialization arguments
#
def initialize(podfile, sandbox, installation_root, libraries)
def initialize(podfile, sandbox, installation_root, targets)
@podfile = podfile
@sandbox = sandbox
@installation_root = installation_root
@libraries = libraries
@targets = targets
end
# Integrates the user projects associated with the {TargetDefinitions}
......@@ -110,8 +110,8 @@ module Pod
# @return [void]
#
def integrate_user_targets
libraries_to_integrate.sort_by(&:name).each do |lib|
TargetIntegrator.new(lib).integrate!
targets_to_integrate.sort_by(&:name).each do |target|
TargetIntegrator.new(target).integrate!
end
end
......@@ -163,14 +163,14 @@ module Pod
# @note Empty target definitions are ignored.
#
def user_project_paths
libraries.map do |lib|
lib.user_project_path
targets.map do |target|
target.user_project_path
end.compact.uniq
end
def libraries_to_integrate
libraries.reject { |lib| lib.target_definition.empty? }
def targets_to_integrate
targets.reject { |target| target.target_definition.empty? }
end
#-----------------------------------------------------------------------#
......
......@@ -55,10 +55,6 @@ module Pod
#
attr_reader :root
# @return [HeadersStore] the header directory for the Pods libraries.
#
attr_reader :build_headers
# @return [HeadersStore] the header directory for the user targets.
#
attr_reader :public_headers
......@@ -67,13 +63,13 @@ module Pod
#
def initialize(root)
@root = Pathname.new(root)
@build_headers = HeadersStore.new(self, "BuildHeaders")
@public_headers = HeadersStore.new(self, "Headers")
@predownloaded_pods = []
@head_pods = []
@checkout_sources = {}
@local_pods = {}
FileUtils.mkdir_p(@root)
FileUtils.mkdir_p(generated_dir_root)
end
# @return [Lockfile] the manifest which contains the information about the
......
......@@ -33,7 +33,8 @@ module Pod
# root with the `${PODS_ROOT}` variable.
#
def search_paths
@search_paths.uniq.map { |path| "${PODS_ROOT}/#{path}" }
headers_dir = root.relative_path_from(sandbox.generated_dir_root).dirname
@search_paths.uniq.map { |path| "${PODS_ROOT}/#{headers_dir}/#{path}" }
end
# Removes the directory as it is regenerated from scratch during each
......
module Pod
# Model class which describes a Pods target.
#
# The Target class stores and provides the information necessary for
# working with a target in the Podfile and it's dependent libraries.
# This class is used to represent both the targets and their libraries.
#
class Target
# @return [PBXNativeTarget] the target definition of the Podfile that
# generated this target.
#
attr_reader :target_definition
# @return [Sandbox] The sandbox where the Pods should be installed.
#
attr_reader :sandbox
# @return [String] the name of the library.
#
def name
label
end
# @return [String] the name of the library.
#
def product_name
"lib#{label}.a"
end
# @return [String] the XCConfig namespaced prefix.
#
def xcconfig_prefix
label.upcase.gsub(/[^A-Z]/, '_') + '_'
end
# @return [String] A string suitable for debugging.
#
def inspect
"<#{self.class} name=#{name} platform=#{platform}>"
end
#-------------------------------------------------------------------------#
# @!group Information storage
# @return [Hash{String=>Symbol}] A hash representing the user build
# configurations where each key corresponds to the name of a
# configuration and its value to its type (`:debug` or `:release`).
#
attr_accessor :user_build_configurations
# @return [PBXNativeTarget] the target generated in the Pods project for
# this library.
#
attr_accessor :target
# @return [Platform] the platform for this library.
#
def platform
@platform ||= target_definition.platform
end
#-------------------------------------------------------------------------#
# @!group Support files
# @return [Pathname] the folder where to store the support files of this
# library.
#
def support_files_root
@sandbox.library_support_files_dir(name)
end
# @return [Pathname] the absolute path of the xcconfig file.
#
def xcconfig_path
support_files_root + "#{label}.xcconfig"
end
# @return [Pathname] the absolute path of the private xcconfig file.
#
def xcconfig_private_path
support_files_root + "#{label}-Private.xcconfig"
end
# @return [Pathname] the absolute path of the header file which contains
# the information about the installed pods.
#
def target_environment_header_path
support_files_root + "#{target_definition.label.to_s}-environment.h"
end
# @return [Pathname] the absolute path of the prefix header file.
#
def prefix_header_path
support_files_root + "#{label}-prefix.pch"
end
# @return [Pathname] the absolute path of the bridge support file.
#
def bridge_support_path
support_files_root + "#{label}.bridgesupport"
end
# @return [Pathname] the path of the dummy source generated by CocoaPods
#
def dummy_source_path
support_files_root + "#{label}-dummy.m"
end
#-------------------------------------------------------------------------#
end
end
module Pod
# Model class which describes a Pods library.
# Stores the information relative to the target used to cluster the targets
# of the single Pods. The client targets will then depend on this one.
#
# The Library class stores and provides the information necessary for
# working with a library in the Pods project and in the user projects
# through the installation process.
#
class Library
# @return [PBXNativeTarget] the target definition of the Podfile that
# generated this library.
#
attr_reader :target_definition
class AggregateTarget < Target
# @param [TargetDefinition] target_definition @see target_definition
# @param [PBXNativeTarget] target @see target
# @param [TargetDefinition] target_definition @see target_definition
# @param [Sandbox] sandbox @see sandbox
#
def initialize(target_definition)
def initialize(target_definition, sandbox)
@target_definition = target_definition
@sandbox = sandbox
@pod_targets = []
@file_accessors = []
end
# @return [String] the label for the library.
# @return [String] the label for the target.
#
def label
target_definition.label.to_s
end
# @return [String] the name of the library.
#
def name
target_definition.label.to_s
end
# @return [String] the name of the library.
#
def product_name
"lib#{target_definition.label}.a"
end
# @return [String] A string suitable for debugging.
#
def inspect
"<#{self.class} name=#{name} platform=#{platform}>"
end
#-------------------------------------------------------------------------#
# @!group Information storage
# @return [Pathname] the folder where to store the support files of this
# library.
#
attr_accessor :support_files_root
# @return [Pathname] the folder where the client is stored used for
# computing the relative paths. If integrating it should be the
# folder where the user project is stored, otherwise it should
......@@ -60,7 +28,7 @@ module Pod
#
attr_accessor :client_root
# @return [Pathname] the path of the user project that this library will
# @return [Pathname] the path of the user project that this target will
# integrate as identified by the analyzer.
#
# @note The project instance is not stored to prevent editing different
......@@ -69,29 +37,14 @@ module Pod
attr_accessor :user_project_path
# @return [String] the list of the UUIDs of the user targets that will be
# integrated by this library as identified by the analizer.
# integrated by this target as identified by the analizer.
#
# @note The target instances are not stored to prevent editing different
# instances.
#
attr_accessor :user_target_uuids
# @return [Hash{String=>Symbol}] A hash representing the user build
# configurations where each key corresponds to the name of a
# configuration and its value to its type (`:debug` or `:release`).
#
attr_accessor :user_build_configurations
# @return [Platform] the platform for this library.
#
attr_accessor :platform
# @return [PBXNativeTarget] the target generated in the Pods project for
# this library.
#
attr_accessor :target
# @return [Xcodeproj::Config] the configuration file of the library
# @return [Xcodeproj::Config] The configuration file of the target.
#
# @note The configuration is generated by the {TargetInstaller} and
# used by {UserProjectIntegrator} to check for any overridden
......@@ -99,51 +52,16 @@ module Pod
#
attr_accessor :xcconfig
# @return [Array<Specification>] the specifications of this library.
#
attr_accessor :specs
# @return [Array<Sandbox::FileAccessor>] the file accessors for the
# specifications of this library.
# @return [Array<PodTarget>] The dependencies for this target.
#
attr_accessor :file_accessors
#-------------------------------------------------------------------------#
# @!group Support files
# @return [Pathname] the absolute path of the xcconfig file.
#
def xcconfig_path
support_files_root + "#{label}.xcconfig"
end
attr_accessor :pod_targets
# @return [Pathname] the absolute path of the copy resources script.
#
def copy_resources_script_path
support_files_root + "#{label}-resources.sh"
end
# @return [Pathname] the absolute path of the header file which contains
# the information about the installed pods.
#
def target_environment_header_path
support_files_root + "#{label}-environment.h"
# @return [Array<SpecConsumer>]
def spec_consumers
pod_targets.map(&:specs).flatten.map { |spec| spec.consumer(platform) }
end
# @return [Pathname] the absolute path of the prefix header file.
#
def prefix_header_path
support_files_root + "#{label}-prefix.pch"
end
# @return [Pathname] the absolute path of the bridge support file.
#
def bridge_support_path
support_files_root + "#{label}.bridgesupport"
end
# @return [Pathname] the absolute path of acknowledgements file.
# @return [Pathname] The absolute path of acknowledgements file.
#
# @note The acknowledgements generators add the extension according to
# the file type.
......@@ -152,14 +70,12 @@ module Pod
support_files_root + "#{label}-acknowledgements"
end
# @return [Pathname] the path of the dummy source generated by CocoaPods
# @return [Pathname] The absolute path of the copy resources script.
#
def dummy_source_path
support_files_root + "#{label}-dummy.m"
def copy_resources_script_path
support_files_root + "#{label}-resources.sh"
end
#--------------------------------------#
# @return [String] The xcconfig path of the root from the `$(SRCROOT)`
# variable of the user's project.
#
......@@ -167,14 +83,14 @@ module Pod
"${SRCROOT}/#{support_files_root.relative_path_from(client_root)}"
end
# @return [String] the path of the xcconfig file relative to the root of
# @return [String] The path of the xcconfig file relative to the root of
# the user project.
#
def xcconfig_relative_path
relative_to_srcroot(xcconfig_path).to_s
end
# @return [String] the path of the copy resources script relative to the
# @return [String] The path of the copy resources script relative to the
# root of the user project.
#
def copy_resources_script_relative_path
......@@ -193,10 +109,13 @@ module Pod
# @param [Pathname] path
# A relative path from the root of the sandbox.
#
# @return [String] the computed path.
# @return [String] The computed path.
#
def relative_to_srcroot(path)
path.relative_path_from(client_root).to_s
end
#-------------------------------------------------------------------------#
end
end
module Pod
# Stores the information relative to the target used to compile a single Pod.
# A pod can have one or more activated spec/subspecs.
#
class PodTarget < Target
# @return [Specification] the spec for the target.
#
attr_reader :specs
# @return [HeadersStore] the header directory for the target.
#
attr_reader :build_headers
# @param [Specification] spec @see spec
# @param [TargetDefinition] target_definition @see target_definition
# @param [Sandbox] sandbox @see sandbox
#
def initialize(specs, target_definition, sandbox)
@specs = specs
@target_definition = target_definition
@sandbox = sandbox
@build_headers = Sandbox::HeadersStore.new(sandbox, "BuildHeaders")
@file_accessors = []
end
# @return [String] the label for the target.
#
def label
"#{target_definition.label.to_s}-#{root_spec.name}"
end
# @return [Array<Sandbox::FileAccessor>] the file accessors for the
# specifications of this target.
#
attr_accessor :file_accessors
# @return [Array<Specification::Consumer>] the specification consumers for
# the target.
#
def spec_consumers
specs.map { |spec| spec.consumer(platform) }
end
# @return [Specification] the root specification for the target.
#
def root_spec
specs.first.root
end
end
end
......@@ -208,7 +208,7 @@ module Pod
installer = Installer.new(sandbox, podfile)
installer.install!
file_accessors = installer.libraries.first.file_accessors
file_accessors = installer.aggregate_targets.first.pod_targets.first.file_accessors
@file_accessor = file_accessors.find { |accessor| accessor.spec == spec }
config.silent
end
......
......@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.20.2
COCOAPODS: 0.21.0.rc1
../../../Sources/Reachability/Reachability.h
\ No newline at end of file
../../../Sources/JSONKit/JSONKit.h
\ No newline at end of file
../../../Sources/Reachability/Reachability.h
\ No newline at end of file
PODS:
- JSONKit (1.5pre)
- Reachability (3.1.0)
DEPENDENCIES:
- JSONKit (= 1.5pre)
- Reachability (= 3.1.0)
SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.21.0.rc1
#include "Pods-JSONKit"
ALWAYS_SEARCH_USER_PATHS = YES
GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/BuildHeaders" "${PODS_ROOT}/Headers/BuildHeaders/JSONKit" "${PODS_ROOT}/Headers/Headers" "${PODS_ROOT}/Headers/Headers/JSONKit" "${PODS_ROOT}/Headers/Headers/Reachability"
OTHER_LDFLAGS = -ObjC
PODS_ROOT = ${SRCROOT}
\ No newline at end of file
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_JSONKit : NSObject
@end
@implementation PodsDummy_Pods_JSONKit
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "Pods-environment.h"
#include "Pods-Reachability"
ALWAYS_SEARCH_USER_PATHS = YES
GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/BuildHeaders" "${PODS_ROOT}/Headers/BuildHeaders/Reachability" "${PODS_ROOT}/Headers/Headers" "${PODS_ROOT}/Headers/Headers/JSONKit" "${PODS_ROOT}/Headers/Headers/Reachability"
OTHER_LDFLAGS = -ObjC ${PODS_REACHABILITY_OTHER_LDFLAGS}
PODS_ROOT = ${SRCROOT}
\ No newline at end of file
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_Reachability : NSObject
@end
@implementation PodsDummy_Pods_Reachability
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "Pods-environment.h"
PODS_REACHABILITY_OTHER_LDFLAGS = -framework SystemConfiguration
\ No newline at end of file
# Acknowledgements
This application makes use of the following third party libraries:
## Reachability
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Generated by CocoaPods - http://cocoapods.org
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</string>
<key>Title</key>
<string>Reachability</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - http://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods : NSObject
@end
@implementation PodsDummy_Pods
@end
// To check if a library is compiled with CocoaPods you
// can use the `COCOAPODS` macro definition which is
// defined in the xcconfigs so it is available in
// headers also when they are imported in the client
// project.
// JSONKit
#define COCOAPODS_POD_AVAILABLE_JSONKit
// This library does not follow semantic-versioning,
// so we were not able to define version macros.
// Please contact the author.
// Version: 1.5pre.
// Reachability
#define COCOAPODS_POD_AVAILABLE_Reachability
#define COCOAPODS_VERSION_MAJOR_Reachability 3
#define COCOAPODS_VERSION_MINOR_Reachability 1
#define COCOAPODS_VERSION_PATCH_Reachability 0
#!/bin/sh
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
install_resource()
{
case $1 in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.framework)
echo "rsync -rp ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -rp "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodeld)
echo "xcrun momc ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd"
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd"
;;
*)
echo "${PODS_ROOT}/$1"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
;;
esac
}
rsync -avr --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rm "$RESOURCES_TO_COPY"
#include "Pods-JSONKit"
#include "Pods-Reachability"
ALWAYS_SEARCH_USER_PATHS = YES
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Headers" "${PODS_ROOT}/Headers/Headers/JSONKit" "${PODS_ROOT}/Headers/Headers/Reachability"
OTHER_LDFLAGS = -ObjC ${PODS_REACHABILITY_OTHER_LDFLAGS}
PODS_ROOT = ${SRCROOT}/Pods/Generated
\ No newline at end of file
File References:
- Frameworks:
- Foundation.framework
- SystemConfiguration.framework
- Pods:
- JSONKit:
- JSONKit.h
- JSONKit.m
- Reachability:
- Reachability.h
- Reachability.m
- Products:
- libPods-JSONKit.a
- libPods-Reachability.a
- libPods.a
- Targets Support Files:
- Pods-JSONKit:
- Pods-JSONKit.xcconfig
- Pods-JSONKit-Private.xcconfig
- Pods-JSONKit-prefix.pch
- Pods-JSONKit-dummy.m
- Pods-Reachability:
- Pods-Reachability.xcconfig
- Pods-Reachability-Private.xcconfig
- Pods-Reachability-prefix.pch
- Pods-Reachability-dummy.m
- Pods:
- Pods.xcconfig
- Pods-environment.h
- Pods-resources.sh
- Pods-acknowledgements.plist
- Pods-acknowledgements.markdown
- Pods-dummy.m
- Podfile
Targets:
- Pods-JSONKit:
Build Phases:
- SourcesBuildPhase:
- JSONKit.m
- Pods-JSONKit-dummy.m
- FrameworksBuildPhase:
- Foundation.framework
- HeadersBuildPhase:
- JSONKit.h
Build Configurations:
- Release:
Build Settings:
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
SDKROOT: iphoneos
VALIDATE_PRODUCT: 'YES'
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_C_LANGUAGE_STANDARD: gnu99
SKIP_INSTALL: 'YES'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
DSTROOT: /tmp/xcodeproj.dst
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ALWAYS_SEARCH_USER_PATHS: 'NO'
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ARCHS: $(ARCHS_STANDARD_32_BIT)
PRODUCT_NAME: $(TARGET_NAME)
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
OTHER_LDFLAGS: ''
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
COPY_PHASE_STRIP: 'YES'
GCC_PREFIX_HEADER: Pods-JSONKit-prefix.pch
Base Configuration: Pods-JSONKit-Private.xcconfig
- Debug:
Build Settings:
OTHER_LDFLAGS: ''
PRODUCT_NAME: $(TARGET_NAME)
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
SDKROOT: iphoneos
GCC_C_LANGUAGE_STANDARD: gnu99
SKIP_INSTALL: 'YES'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
DSTROOT: /tmp/xcodeproj.dst
GCC_DYNAMIC_NO_PIC: 'NO'
GCC_OPTIMIZATION_LEVEL: '0'
GCC_SYMBOLS_PRIVATE_EXTERN: 'NO'
ARCHS: $(ARCHS_STANDARD_32_BIT)
ALWAYS_SEARCH_USER_PATHS: 'NO'
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
GCC_PREPROCESSOR_DEFINITIONS:
- DEBUG=1
- $(inherited)
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
COPY_PHASE_STRIP: 'NO'
GCC_PREFIX_HEADER: Pods-JSONKit-prefix.pch
Base Configuration: Pods-JSONKit-Private.xcconfig
- Pods-Reachability:
Build Phases:
- SourcesBuildPhase:
- Reachability.m
- Pods-Reachability-dummy.m
- FrameworksBuildPhase:
- Foundation.framework
- HeadersBuildPhase:
- Reachability.h
Build Configurations:
- Release:
Build Settings:
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
SDKROOT: iphoneos
VALIDATE_PRODUCT: 'YES'
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_C_LANGUAGE_STANDARD: gnu99
SKIP_INSTALL: 'YES'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
DSTROOT: /tmp/xcodeproj.dst
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ALWAYS_SEARCH_USER_PATHS: 'NO'
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ARCHS: $(ARCHS_STANDARD_32_BIT)
PRODUCT_NAME: $(TARGET_NAME)
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
OTHER_LDFLAGS: ''
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
COPY_PHASE_STRIP: 'YES'
GCC_PREFIX_HEADER: Pods-Reachability-prefix.pch
Base Configuration: Pods-Reachability-Private.xcconfig
- Debug:
Build Settings:
OTHER_LDFLAGS: ''
PRODUCT_NAME: $(TARGET_NAME)
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
SDKROOT: iphoneos
GCC_C_LANGUAGE_STANDARD: gnu99
SKIP_INSTALL: 'YES'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
DSTROOT: /tmp/xcodeproj.dst
GCC_DYNAMIC_NO_PIC: 'NO'
GCC_OPTIMIZATION_LEVEL: '0'
GCC_SYMBOLS_PRIVATE_EXTERN: 'NO'
ARCHS: $(ARCHS_STANDARD_32_BIT)
ALWAYS_SEARCH_USER_PATHS: 'NO'
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
GCC_PREPROCESSOR_DEFINITIONS:
- DEBUG=1
- $(inherited)
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
COPY_PHASE_STRIP: 'NO'
GCC_PREFIX_HEADER: Pods-Reachability-prefix.pch
Base Configuration: Pods-Reachability-Private.xcconfig
- Pods:
Build Phases:
- SourcesBuildPhase:
- Pods-dummy.m
- FrameworksBuildPhase:
- Foundation.framework
- libPods-JSONKit.a
- libPods-Reachability.a
Build Configurations:
- Release:
Build Settings:
SDKROOT: iphoneos
VALIDATE_PRODUCT: 'YES'
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_C_LANGUAGE_STANDARD: gnu99
SKIP_INSTALL: 'YES'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
DSTROOT: /tmp/xcodeproj.dst
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ALWAYS_SEARCH_USER_PATHS: 'NO'
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ARCHS: $(ARCHS_STANDARD_32_BIT)
PRODUCT_NAME: $(TARGET_NAME)
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
OTHER_LDFLAGS: ''
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
COPY_PHASE_STRIP: 'YES'
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
Base Configuration: Pods.xcconfig
- Debug:
Build Settings:
PRODUCT_NAME: $(TARGET_NAME)
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
SDKROOT: iphoneos
GCC_C_LANGUAGE_STANDARD: gnu99
SKIP_INSTALL: 'YES'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
DSTROOT: /tmp/xcodeproj.dst
GCC_DYNAMIC_NO_PIC: 'NO'
GCC_SYMBOLS_PRIVATE_EXTERN: 'NO'
GCC_OPTIMIZATION_LEVEL: '0'
ARCHS: $(ARCHS_STANDARD_32_BIT)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
GCC_PREPROCESSOR_DEFINITIONS:
- DEBUG=1
- $(inherited)
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
COPY_PHASE_STRIP: 'NO'
OTHER_LDFLAGS: ''
Base Configuration: Pods.xcconfig
Build Configurations:
- Release:
Build Settings:
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
- Debug:
Build Settings:
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
# Reachability
This is a drop-in replacement for Apples Reachability class. It is ARC compatible, uses the new GCD methods to notify of network interface changes.
In addition to the standard NSNotification it supports the use of Blocks for when the network becomes reachable and unreachable.
Finally you can specify wether or not a WWAN connection is considered "reachable".
## A Simple example
This sample uses Blocks to tell you when the interface state has changed. The blocks will be called on a BACKGROUND THREAD so you need to dispatch UI updates onto the main thread.
// allocate a reachability object
Reachability* reach = [Reachability reachabilityWithHostname:@"www.google.com"];
// set the blocks
reach.reachableBlock = ^(Reachability*reach)
{
NSLog(@"REACHABLE!");
};
reach.unreachableBlock = ^(Reachability*reach)
{
NSLog(@"UNREACHABLE!");
};
// start the notifier which will cause the reachability object to retain itself!
[reach startNotifier];
## Another simple example
This sample will use NSNotifications to tell you when the interface has changed, they will be delivered on the MAIN THREAD so you *can* do UI updates from within the function.
In addition it asks the Reachability object to consider the WWAN (3G/EDGE/CDMA) as a non-reachable connection (you might use this if you are writing a video streaming app, for example, to save the users data plan).
// allocate a reachability object
Reachability* reach = [Reachability reachabilityWithHostname:@"www.google.com"];
// tell the reachability that we DONT want to be reachable on 3G/EDGE/CDMA
reach.reachableOnWWAN = NO;
// here we set up a NSNotification observer. The Reachability that caused the notification
// is passed in the object parameter
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reachabilityChanged:)
name:kReachabilityChangedNotification
object:nil];
[reach startNotifier]
\ No newline at end of file
/*
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <sys/socket.h>
#import <netinet/in.h>
#import <netinet6/in6.h>
#import <arpa/inet.h>
#import <ifaddrs.h>
#import <netdb.h>
/**
* Does ARC support support GCD objects?
* It does if the minimum deployment target is iOS 6+ or Mac OS X 8+
**/
#if TARGET_OS_IPHONE
// Compiling for iOS
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 // iOS 6.0 or later
#define NEEDS_DISPATCH_RETAIN_RELEASE 0
#else // iOS 5.X or earlier
#define NEEDS_DISPATCH_RETAIN_RELEASE 1
#endif
#else
// Compiling for Mac OS X
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 // Mac OS X 10.8 or later
#define NEEDS_DISPATCH_RETAIN_RELEASE 0
#else
#define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
#endif
#endif
extern NSString *const kReachabilityChangedNotification;
typedef enum
{
// Apple NetworkStatus Compatible Names.
NotReachable = 0,
ReachableViaWiFi = 2,
ReachableViaWWAN = 1
} NetworkStatus;
@class Reachability;
typedef void (^NetworkReachable)(Reachability * reachability);
typedef void (^NetworkUnreachable)(Reachability * reachability);
@interface Reachability : NSObject
@property (nonatomic, copy) NetworkReachable reachableBlock;
@property (nonatomic, copy) NetworkUnreachable unreachableBlock;
@property (nonatomic, assign) BOOL reachableOnWWAN;
+(Reachability*)reachabilityWithHostname:(NSString*)hostname;
+(Reachability*)reachabilityForInternetConnection;
+(Reachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress;
+(Reachability*)reachabilityForLocalWiFi;
-(Reachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref;
-(BOOL)startNotifier;
-(void)stopNotifier;
-(BOOL)isReachable;
-(BOOL)isReachableViaWWAN;
-(BOOL)isReachableViaWiFi;
// WWAN may be available, but not active until a connection has been established.
// WiFi may require a connection for VPN on Demand.
-(BOOL)isConnectionRequired; // Identical DDG variant.
-(BOOL)connectionRequired; // Apple's routine.
// Dynamic, on demand connection?
-(BOOL)isConnectionOnDemand;
// Is user intervention required?
-(BOOL)isInterventionRequired;
-(NetworkStatus)currentReachabilityStatus;
-(SCNetworkReachabilityFlags)reachabilityFlags;
-(NSString*)currentReachabilityString;
-(NSString*)currentReachabilityFlags;
@end
# Acknowledgements
This application makes use of the following third party libraries:
## Reachability
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Generated by CocoaPods - http://cocoapods.org
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</string>
<key>Title</key>
<string>Reachability</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - http://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
......@@ -27,9 +27,7 @@ Downloading dependencies
$ /usr/bin/git rev-list --max-count=1 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce
0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce
> Cloning to Pods folder
$ /usr/bin/git clone
"CACHES_DIR/GitHub/de3e1c97c03ac13b29e7533beea2d2131589900f"
"ROOT/tmp/install_add_pod/Pods/Generated/Sources/JSONKit"
$ /usr/bin/git clone "CACHES_DIR/GitHub/de3e1c97c03ac13b29e7533beea2d2131589900f" "ROOT/tmp/install_add_pod/Pods/Generated/Sources/JSONKit"
Cloning into 'ROOT/tmp/install_add_pod/Pods/Generated/Sources/JSONKit'...
done.
$ /usr/bin/git checkout -b activated-pod-commit 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce 2>&1
......@@ -45,8 +43,7 @@ Downloading dependencies
f7176f4798d068d233dca5223ae4bd9c8059e830
$ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/install_add_pod/Pods/Generated/Sources/Reachability/.git/
$ /usr/bin/git remote add origin
'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
$ /usr/bin/git fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
......@@ -61,12 +58,22 @@ Generating Pods project
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `Pods` iOS 6.0
- Installing libraries
- Installing target `Pods-JSONKit` iOS 6.0
- Adding Build files
- Generating public xcconfig file at `Pods/Generated/Pods-JSONKit.xcconfig`
- Generating private xcconfig file at `Pods/Generated/Pods-JSONKit-Private.xcconfig`
- Generating prefix header at `Pods/Generated/Pods-JSONKit-prefix.pch`
- Generating dummy source file at `Pods/Generated/Pods-JSONKit-dummy.m`
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Generating public xcconfig file at `Pods/Generated/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Generated/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Generated/Pods-Reachability-prefix.pch`
- Generating dummy source file at `Pods/Generated/Pods-Reachability-dummy.m`
- Installing target `Pods` iOS 6.0
- Generating xcconfig file at `Pods/Generated/Pods.xcconfig`
- Generating target environment header at `Pods/Generated/Pods-environment.h`
- Generating prefix header at `Pods/Generated/Pods-prefix.pch`
- Generating copy resources script at `Pods/Generated/Pods-resources.sh`
- Generating acknowledgements at `Pods/Generated/Pods-acknowledgements.plist`
- Generating acknowledgements at `Pods/Generated/Pods-acknowledgements.markdown`
......
......@@ -8,4 +8,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.20.2
COCOAPODS: 0.21.0.rc1
../../../Sources/Reachability/Reachability.h
\ No newline at end of file
PODS:
- Reachability (3.1.0)
DEPENDENCIES:
- Reachability
- Reachability (= 3.1.0)
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.21.0.rc1
#include "Pods-SampleApp_1-Reachability"
ALWAYS_SEARCH_USER_PATHS = YES
GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/BuildHeaders" "${PODS_ROOT}/Headers/BuildHeaders/Reachability" "${PODS_ROOT}/Headers/Headers" "${PODS_ROOT}/Headers/Headers/Reachability"
OTHER_LDFLAGS = -ObjC ${PODS_SAMPLEAPP___REACHABILITY_OTHER_LDFLAGS}
PODS_ROOT = ${SRCROOT}
\ No newline at end of file
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_SampleApp_1_Reachability : NSObject
@end
@implementation PodsDummy_Pods_SampleApp_1_Reachability
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "Pods-SampleApp_1-environment.h"
PODS_SAMPLEAPP___REACHABILITY_OTHER_LDFLAGS = -framework SystemConfiguration
\ No newline at end of file
# Acknowledgements
This application makes use of the following third party libraries:
## Reachability
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Generated by CocoaPods - http://cocoapods.org
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</string>
<key>Title</key>
<string>Reachability</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - http://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_SampleApp_1 : NSObject
@end
@implementation PodsDummy_Pods_SampleApp_1
@end
// To check if a library is compiled with CocoaPods you
// can use the `COCOAPODS` macro definition which is
// defined in the xcconfigs so it is available in
// headers also when they are imported in the client
// project.
// Reachability
#define COCOAPODS_POD_AVAILABLE_Reachability
#define COCOAPODS_VERSION_MAJOR_Reachability 3
#define COCOAPODS_VERSION_MINOR_Reachability 1
#define COCOAPODS_VERSION_PATCH_Reachability 0
#!/bin/sh
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
install_resource()
{
case $1 in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.framework)
echo "rsync -rp ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -rp "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodeld)
echo "xcrun momc ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd"
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd"
;;
*)
echo "${PODS_ROOT}/$1"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
;;
esac
}
rsync -avr --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rm "$RESOURCES_TO_COPY"
#include "Pods-SampleApp_1-Reachability"
ALWAYS_SEARCH_USER_PATHS = YES
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Headers" "${PODS_ROOT}/Headers/Headers/Reachability"
OTHER_LDFLAGS = -ObjC ${PODS_SAMPLEAPP___REACHABILITY_OTHER_LDFLAGS}
PODS_ROOT = ${SRCROOT}/Pods/Generated
\ No newline at end of file
#include "Pods-SampleApp_2-Reachability"
ALWAYS_SEARCH_USER_PATHS = YES
GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/BuildHeaders" "${PODS_ROOT}/Headers/BuildHeaders/Reachability" "${PODS_ROOT}/Headers/Headers" "${PODS_ROOT}/Headers/Headers/Reachability"
OTHER_LDFLAGS = -ObjC ${PODS_SAMPLEAPP___REACHABILITY_OTHER_LDFLAGS}
PODS_ROOT = ${SRCROOT}
\ No newline at end of file
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_SampleApp_2_Reachability : NSObject
@end
@implementation PodsDummy_Pods_SampleApp_2_Reachability
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "Pods-SampleApp_2-environment.h"
PODS_SAMPLEAPP___REACHABILITY_OTHER_LDFLAGS = -framework SystemConfiguration
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment