Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get ready for Xcode 7.0 #271

Merged
merged 6 commits into from
Jun 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
[Boris Bügling](https://github.com/neonichu)
[Xcodeproj#272](https://github.com/CocoaPods/Xcodeproj/pull/272)

* Update default build and scheme settings for Xcode 7.0.
[Marius Rackwitz](https://github.com/mrackwitz)
[Boris Bügling](https://github.com/neonichu)
[Xcodeproj#271](https://github.com/CocoaPods/Xcodeproj/pull/271)

##### Bug Fixes

* Fix the help output for `xcodeproj config-dump`.
Expand Down
14 changes: 14 additions & 0 deletions lib/xcodeproj/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ module Constants
#
LAST_UPGRADE_CHECK = '0700'

# @return [String] The last known object version to Xcodeproj.
#
LAST_SWIFT_UPGRADE_CHECK = '0700'

# @return [Hash] The all the known ISAs grouped by superclass.
#
KNOWN_ISAS = {
Expand Down Expand Up @@ -153,6 +157,16 @@ module Constants
}.freeze,
[:debug, :application, :swift] => {
'SWIFT_OPTIMIZATION_LEVEL' => '-Onone',
'ENABLE_TESTABILITY' => 'YES',
}.freeze,
[:debug, :dynamic_library, :swift] => {
'ENABLE_TESTABILITY' => 'YES',
}.freeze,
[:debug, :framework, :swift] => {
'ENABLE_TESTABILITY' => 'YES',
}.freeze,
[:debug, :static_library, :swift] => {
'ENABLE_TESTABILITY' => 'YES',
}.freeze,
[:framework] => {
'VERSION_INFO_PREFIX' => '',
Expand Down
4 changes: 3 additions & 1 deletion lib/xcodeproj/project/object/root_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class PBXProject < AbstractObject
# - `LastUpgradeCheck`
# - `ORGANIZATIONNAME`
#
attribute :attributes, Hash, 'LastUpgradeCheck' => Constants::LAST_UPGRADE_CHECK
attribute :attributes, Hash,
'LastSwiftUpdateCheck' => Constants::LAST_SWIFT_UPGRADE_CHECK,
'LastUpgradeCheck' => Constants::LAST_UPGRADE_CHECK

# @return [XCConfigurationList] the configuration list of the project.
#
Expand Down
4 changes: 4 additions & 0 deletions lib/xcodeproj/scheme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def initialize
@test_action.attributes['shouldUseLaunchSchemeArgsEnv'] = 'YES'
@test_action.attributes['buildConfiguration'] = 'Debug'

@test_action_additional_options = @test_action.add_element 'AdditionalOptions'

@testables = @test_action.add_element 'Testables'

@launch_action = @scheme.add_element 'LaunchAction'
Expand All @@ -43,6 +45,7 @@ def initialize
@launch_action.attributes['buildConfiguration'] = 'Debug'
@launch_action.attributes['ignoresPersistentStateOnLaunch'] = 'NO'
@launch_action.attributes['debugDocumentVersioning'] = 'YES'
@launch_action.attributes['debugServiceExtension'] = 'internal'
@launch_action.attributes['allowLocationSimulation'] = 'YES'
@launch_action.add_element('AdditionalOptions')

Expand Down Expand Up @@ -117,6 +120,7 @@ def add_test_target(test_target)
#
def set_launch_target(build_target)
launch_product_runnable = @launch_action.add_element 'BuildableProductRunnable'
launch_product_runnable.attributes['runnableDebuggingMode'] = '0'

launch_buildable_reference = launch_product_runnable.add_element 'BuildableReference'
launch_buildable_reference.attributes['BuildableIdentifier'] = 'primary'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "Swift_OSX_Native/Swift_OSX_Native_base.xcconfig"
COPY_PHASE_STRIP = NO
GCC_PREPROCESSOR_DEFINITIONS = ["DEBUG=1", "$(inherited)"]
ENABLE_TESTABILITY = YES
MTL_ENABLE_DEBUG_INFO = YES
SWIFT_OPTIMIZATION_LEVEL = -Onone
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "Swift_iOS_Native/Swift_iOS_Native_base.xcconfig"
COPY_PHASE_STRIP = NO
ENABLE_TESTABILITY = YES
GCC_PREPROCESSOR_DEFINITIONS = ["DEBUG=1", "$(inherited)"]
MTL_ENABLE_DEBUG_INFO = YES
SWIFT_OPTIMIZATION_LEVEL = -Onone
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
ReferencedContainer = "container:Cocoa Application.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
Expand All @@ -95,6 +97,7 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
ReferencedContainer = "container:Cocoa Application.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
Expand All @@ -57,8 +59,10 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E52523F316245AB20012E2BA"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
Expand All @@ -48,6 +50,7 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
Expand All @@ -32,6 +34,7 @@
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
Expand Down