Commit 9374330f authored by Eloy Durán's avatar Eloy Durán

Merge pull request #1352 from CocoaPods/xcode-5-support

Problems with 64-bit Builds and Xcode 5 GM
parents 50e19aea 07b875d7
......@@ -2,41 +2,69 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master
## 0.25.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.24.0...0.25.0)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.24.0...0.25.0)
[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.10.1...0.11.0)
###### Enhancements
* Added support for Xcode 5.
The generated Pods Xcode project is now compatible with `arm64` projects and
is updated to use Xcode 5’s default settings removing all warnings.
**NOTE to Xcode 4 users:**
1. This means that the Pods Xcode project now sets the `ONLY_ACTIVE_ARCH`
build setting to `YES` in the `Debug` configuration. You’ll have to set the
same on your project/target, otherwise the build _will_ fail.
2. When building a **iOS** project from the command-line with the `xcodebuild`
tool you’ll need to completely disable this setting by appending to your
build command: `ONLY_ACTIVE_ARCH=NO`.
* Speed up project generation in `pod install` and `pod update`.
* The pre and post install hooks that have been deprecated now include the name
and version of the spec that’s using them.
###### Bug Fixes
* Only create a single resource bundle for all targets. Prior to this change a resource bundle included
into multiple targets within the project would create duplicately named targets in the Pods Xcode project,
causing duplicately named Schemes to be created on each invocation of `pod install`. All targets that reference
a given resource bundle now have dependencies on a single common target.
* Only create a single resource bundle for all targets. Prior to this change a
resource bundle included into multiple targets within the project would create
duplicately named targets in the Pods Xcode project, causing duplicately named
Schemes to be created on each invocation of `pod install`. All targets that
reference a given resource bundle now have dependencies on a single common
target.
[Blake Watters](https://github.com/blakewatters)
[#1338](https://github.com/CocoaPods/CocoaPods/issues/1338)
* Solved outstanding issues with CocoaPods resource bundles and Archive builds:
1. The rsync task copies symlinks into the App Bundle, producing an invalid app. This change add `--copy-links`
to the rsync invocation to ensure the target files are copied rather than the symlink.
2. The Copy Resources script uses `TARGET_BUILD_DIR` which points to the App Archiving folder during an Archive action.
Switching to `BUILT_PRODUCTS_DIR` instead ensures that the path is correct for all actions and configurations.
1. The rsync task copies symlinks into the App Bundle, producing an invalid
app. This change add `--copy-links` to the rsync invocation to ensure the
target files are copied rather than the symlink.
2. The Copy Resources script uses `TARGET_BUILD_DIR` which points to the App
Archiving folder during an Archive action. Switching to
`BUILT_PRODUCTS_DIR` instead ensures that the path is correct for all
actions and configurations.
[Blake Watters](https://github.com/blakewatters)
[#1309](https://github.com/CocoaPods/CocoaPods/issues/1309)
[#1329](https://github.com/CocoaPods/CocoaPods/issues/1329)
* Ensure resource bundles are copied to installation location on install actions
[Chris Gummer](https://github.com/chrisgummer)
[#1364](https://github.com/CocoaPods/CocoaPods/issues/1364)
## 0.24.0
* Various bugfixes in Xcodeproj, refer to its [CHANGELOG](https://github.com/CocoaPods/Xcodeproj/blob/0.11.0/CHANGELOG.md)
for details.
###### Enhancements
## 0.24.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.22.3...0.23.0.rc1)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.22.3...0.23.0.rc1)
[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.8.1...0.9.0)
[cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.1.1...0.1.2)
[cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.1.1...0.2.0)
###### Enhancements
......@@ -45,7 +73,6 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
stored in the `~/.cocoapods/templates` folder. Two templates are supported:
- the `Podfile.default` template for regular targets.
- and the `Podfile.test` template for test targets.
[Ian Ynda-Hummel](https://github.com/ianyh)
[#1106](https://github.com/CocoaPods/CocoaPods/issues/1106)
[#1045](https://github.com/CocoaPods/CocoaPods/issues/1045)
......@@ -100,13 +127,13 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
## 0.23.0.rc1
###### Enhancements
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.22.3...0.23.0.rc1)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.22.3...0.23.0.rc1)
[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.8.1...0.9.0)
[cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.1.1...0.1.2)
###### Enhancements
* Added `prepare_command` attribute to Specification DSL. The prepare command
will replace the `pre_install` hook. The `post_install` hook has also been
deprecated.
......
......@@ -7,7 +7,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: d7d34813894b7b08c8e19f137a3b04cd6fcc92b0
revision: faa9df47370af19677e66cda11986de025b2e948
branch: master
specs:
cocoapods-core (0.24.0)
......@@ -17,7 +17,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: d7bacd932526540b6d447dcb4358cec2822a68f9
revision: b47feb937af209f6c3c96bd39c76c15c64ba31f5
branch: master
specs:
xcodeproj (0.10.1)
......@@ -49,9 +49,9 @@ GIT
GIT
remote: https://github.com/lemurheavy/coveralls-ruby.git
revision: 2576b7d37545c6f28f0ad43f56cddc09ca2740f4
revision: b1a5dcc23a4a9cb02a6a1560c63861d102530cd9
specs:
coveralls (0.6.7)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
......@@ -112,7 +112,7 @@ GEM
yajl-ruby (~> 1.1.0)
rake (10.1.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.1)
rb-inotify (0.9.2)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
......@@ -128,9 +128,9 @@ GEM
term-ansicolor (1.2.2)
tins (~> 0.8)
thor (0.18.1)
tins (0.9.0)
tins (0.10.0)
yajl-ruby (1.1.0)
yard (0.8.7)
yard (0.8.7.2)
PLATFORMS
ruby
......
......@@ -358,6 +358,8 @@ namespace :examples do
command << " -sdk "
command << Dir.glob("#{`xcode-select -print-path`.chomp}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk").last
end
command << " ONLY_ACTIVE_ARCH=NO"
end
execute_command(command)
end
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
......@@ -22,7 +23,7 @@
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
......@@ -39,11 +40,12 @@
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
......
......@@ -204,7 +204,7 @@
F8E469571395739C00DB05C8 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = Gowalla;
};
buildConfigurationList = F8E4695A1395739C00DB05C8 /* Build configuration list for PBXProject "AFNetworking iOS Example" */;
......@@ -287,7 +287,6 @@
F8E4697F1395739D00DB05C8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
......@@ -297,6 +296,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
......@@ -304,7 +304,6 @@
F8E469801395739D00DB05C8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvmgcc42;
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
......@@ -22,7 +23,7 @@
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
......@@ -39,11 +40,12 @@
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
......
......@@ -14,7 +14,6 @@
51887BC7147465E00005EA71 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 51887BC6147465E00005EA71 /* main.m */; };
51887BCB147465E00005EA71 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 51887BCA147465E00005EA71 /* AppDelegate.m */; };
51887BDA1474663A0005EA71 /* libPods-test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51887BD91474663A0005EA71 /* libPods-test.a */; };
51887BDC1474664E0005EA71 /* Pods-test.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 51887BDB1474664E0005EA71 /* Pods-test.xcconfig */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
......@@ -124,7 +123,7 @@
51887BAD147465E00005EA71 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
LastUpgradeCheck = 0500;
};
buildConfigurationList = 51887BB0147465E00005EA71 /* Build configuration list for PBXProject "TargetTest" */;
compatibilityVersion = "Xcode 3.2";
......@@ -149,7 +148,6 @@
buildActionMask = 2147483647;
files = (
51887BC5147465E00005EA71 /* InfoPlist.strings in Resources */,
51887BDC1474664E0005EA71 /* Pods-test.xcconfig in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -200,7 +198,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
......@@ -212,10 +215,15 @@
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
......@@ -225,13 +233,22 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
......@@ -22,7 +23,7 @@
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
......@@ -39,11 +40,12 @@
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
......
......@@ -35,6 +35,7 @@ module Pod
@update_mode = false
@allow_pre_downloads = true
@archs_by_target_def = {}
end
# Performs the analysis.
......@@ -176,6 +177,7 @@ module Pod
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)
target.archs = @archs_by_target_def[target_definition]
else
target.client_root = config.installation_root
target.user_target_uuids = []
......@@ -189,6 +191,7 @@ module Pod
grouped_specs.each do |pod_specs|
pod_target = PodTarget.new(pod_specs, target_definition, sandbox)
pod_target.user_build_configurations = target.user_build_configurations
pod_target.archs = @archs_by_target_def[target_definition]
target.pod_targets << pod_target
end
end
......@@ -437,6 +440,31 @@ module Pod
Platform.new(name, deployment_target)
end
# @return [Platform] The platform for the library.
#
# @note This resolves to the lowest deployment target across the user
# targets.
#
# @todo Is assigning the platform to the target definition the best way
# to go?
#
def compute_archs_for_target_definition(target_definition, user_targets)
archs = []
user_targets.each do |target|
target.build_configurations.each do |configuration|
archs << configuration.build_settings['ARCHS']
end
end
archs = archs.compact.uniq.sort
if archs.count > 1
UI.warn "Found multiple values (`#{archs.join('`, `')}`) for the " \
"architectures (`ARCHS`) build setting for the " \
"`#{target_definition}` target definition. Using the first."
end
archs.first
end
# Precompute the platforms for each target_definition in the Podfile
#
# @note The platforms are computed and added to each target_definition
......@@ -452,6 +480,8 @@ module Pod
user_project = Xcodeproj::Project.open(project_path)
targets = compute_user_project_targets(target_definition, user_project)
platform = compute_platform_for_target_definition(target_definition, targets)
archs = compute_archs_for_target_definition(target_definition, targets)
@archs_by_target_def[target_definition] = archs
else
unless target_definition.platform
raise Informative, "It is necessary to specify the platform in the Podfile if not integrating."
......
......@@ -44,8 +44,10 @@ module Pod
@target = project.new_target(:static_library, name, platform, deployment_target)
settings = {}
if library.platform.requires_legacy_ios_archs?
settings['ARCHS'] = "armv6 armv7"
if library.archs
settings['ARCHS'] = library.archs
else
settings.delete('ARCHS')
end
@target.build_settings('Debug').merge!(settings)
......
......@@ -62,6 +62,10 @@ module Pod
@platform ||= target_definition.platform
end
# @return [String] The value for the ARCHS build setting.
#
attr_accessor :archs
#-------------------------------------------------------------------------#
# @!group Support files
......
Subproject commit 3067d2bec5f8aba74db9fdda7c28fcc28ef3d6aa
Subproject commit 2d44ad5751549e199fe9069bd90ed071c97095f5
......@@ -29,20 +29,5 @@ module Pod
@installer = Installer::TargetInstaller.new(config.sandbox, @pod_target)
end
it "sets the ARCHS" do
@installer.send(:add_target)
target = @project.targets.first
target.build_settings('Debug')["ONLY_ACTIVE_ARCH"].should.be.nil
target.build_settings('AppStore')["ONLY_ACTIVE_ARCH"].should.be.nil
end
it "sets ARCHS to 'armv6 armv7' for both configurations if the deployment target is less than 4.3 for iOS targets" do
@pod_target.stubs(:platform).returns(Platform.new(:ios, '4.0'))
@installer.send(:add_target)
target = @project.targets.first
target.build_settings('Debug')["ARCHS"].should == "armv6 armv7"
target.build_settings('Release')["ARCHS"].should == "armv6 armv7"
end
end
end
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