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

Update configs and constants for Xcode 16 #987

Merged
merged 4 commits into from
Oct 27, 2024
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
14 changes: 7 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2021-01-15 10:50:09 -0800 using RuboCop version 0.47.1.
# on 2024-10-26 17:01:43 -0700 using RuboCop version 0.47.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# Offense count: 3
Lint/IneffectiveAccessModifier:
Exclude:
- 'lib/xcodeproj/differ.rb'
Expand Down Expand Up @@ -37,11 +37,11 @@ Lint/UselessAccessModifier:
- 'lib/xcodeproj/project/object_list.rb'
- 'lib/xcodeproj/scheme.rb'

# Offense count: 1365
# Offense count: 1486
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 186
Max: 212

# Offense count: 3
# Configuration parameters: CountKeywordArgs.
Expand All @@ -54,7 +54,7 @@ Performance/Casecmp:
Exclude:
- 'lib/xcodeproj/project/object/helpers/file_references_factory.rb'

# Offense count: 13
# Offense count: 14
# Cop supports --auto-correct.
# Configuration parameters: MaxKeyValuePairs.
Performance/RedundantMerge:
Expand Down Expand Up @@ -109,7 +109,7 @@ Style/MultilineMethodCallIndentation:
- 'spec/scheme/environment_variables_spec.rb'
- 'spec/scheme_spec.rb'

# Offense count: 12
# Offense count: 13
# Cop supports --auto-correct.
Style/MutableConstant:
Exclude:
Expand All @@ -133,7 +133,7 @@ Style/RedundantSelf:
- 'lib/xcodeproj/project/object.rb'
- 'lib/xcodeproj/project/object/group.rb'

# Offense count: 4
# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/SpaceAroundOperators:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
[Brett-Best](https://github.com/Brett-Best), [gui17aume](https://github.com/gui17aume)
[#985](https://github.com/CocoaPods/Xcodeproj/pull/985)

* Update default build settings for Xcode 16.0.
[Eric Amorde](https://github.com/amorde)
[#987](https://github.com/CocoaPods/Xcodeproj/pull/987)

##### Bug Fixes

* None.
Expand Down
92 changes: 71 additions & 21 deletions lib/xcodeproj/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ module Xcodeproj
module Constants
# @return [String] The last known iOS SDK (stable).
#
LAST_KNOWN_IOS_SDK = '14.0'
LAST_KNOWN_IOS_SDK = '18.0'

# @return [String] The last known OS X SDK (stable).
#
LAST_KNOWN_OSX_SDK = '10.15'
LAST_KNOWN_OSX_SDK = '15.0'

# @return [String] The last known tvOS SDK (stable).
#
LAST_KNOWN_TVOS_SDK = '14.0'
LAST_KNOWN_TVOS_SDK = '18.0'

# @return [String] The last known visionOS SDK (unstable).
#
LAST_KNOWN_VISIONOS_SDK = '1.0'
LAST_KNOWN_VISIONOS_SDK = '2.0'

# @return [String] The last known watchOS SDK (stable).
#
LAST_KNOWN_WATCHOS_SDK = '7.0'
LAST_KNOWN_WATCHOS_SDK = '11.0'

# @return [String] The last known archive version to Xcodeproj.
#
Expand All @@ -36,15 +36,15 @@ module Constants

# @return [String] The last known object version to Xcodeproj.
#
LAST_KNOWN_OBJECT_VERSION = 70
LAST_KNOWN_OBJECT_VERSION = 77

# @return [String] The last known Xcode version to Xcodeproj.
#
LAST_UPGRADE_CHECK = '1500'
LAST_UPGRADE_CHECK = '1600'

# @return [String] The last known Xcode version to Xcodeproj.
#
LAST_SWIFT_UPGRADE_CHECK = '1500'
LAST_SWIFT_UPGRADE_CHECK = '1600'

# @return [String] The version of `.xcscheme` files supported by Xcodeproj
#
Expand Down Expand Up @@ -132,7 +132,7 @@ module Constants
# @return [Hash] The compatibility version string for different object versions.
#
COMPATIBILITY_VERSION_BY_OBJECT_VERSION = {
70 => 'Xcode 16.0',
77 => 'Xcode 16.0',
63 => 'Xcode 15.3',
60 => 'Xcode 15.0',
56 => 'Xcode 14.0',
Expand Down Expand Up @@ -272,22 +272,47 @@ module Constants
'DYLIB_COMPATIBILITY_VERSION' => '1',
'DYLIB_CURRENT_VERSION' => '1',
'DYLIB_INSTALL_NAME_BASE' => '@rpath',
'ENABLE_MODULE_VERIFIER' => 'YES',
'GENERATE_INFOPLIST_FILE' => 'YES',
'INSTALL_PATH' => '$(LOCAL_LIBRARY_DIR)/Frameworks',
'MARKETING_VERSION' => '1.0',
'MODULE_VERIFIER_SUPPORTED_LANGUAGES' => 'objective-c objective-c++',
'MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS' => 'gnu17 gnu++20',
'PRODUCT_NAME' => '$(TARGET_NAME:c99extidentifier)',
'SKIP_INSTALL' => 'YES',
'SWIFT_EMIT_LOC_STRINGS' => 'YES',
'VERSION_INFO_PREFIX' => '',
'VERSIONING_SYSTEM' => 'apple-generic',
}.freeze,
[:ios, :framework] => {
'ENABLE_MODULE_VERIFIER' => 'YES',
'GENERATE_INFOPLIST_FILE' => 'YES',
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks @loader_path/Frameworks',
'MARKETING_VERSION' => '1.0',
'TARGETED_DEVICE_FAMILY' => '1,2',
'SWIFT_EMIT_LOC_STRINGS' => 'YES',
}.freeze,
[:osx, :framework] => {
'COMBINE_HIDPI_IMAGES' => 'YES',
'ENABLE_MODULE_VERIFIER' => 'YES',
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/../Frameworks @loader_path/Frameworks',
'SWIFT_EMIT_LOC_STRINGS' => 'YES',
}.freeze,
[:osx, :framework, :objc] => {
'ENABLE_MODULE_VERIFIER' => 'YES',
'GENERATE_INFOPLIST_FILE' => 'YES',
'MARKETING_VERSION' => '1.0',
'SWIFT_EMIT_LOC_STRINGS' => 'YES',
}.freeze,
[:osx, :framework, :swift] => {
'ENABLE_MODULE_VERIFIER' => 'YES',
'GENERATE_INFOPLIST_FILE' => 'YES',
'MARKETING_VERSION' => '1.0',
'MODULE_VERIFIER_SUPPORTED_LANGUAGES' => 'objective-c objective-c++',
'MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS' => 'gnu17 gnu++20',
'SWIFT_EMIT_LOC_STRINGS' => 'YES',
}.freeze,
[:watchos, :framework] => {
'APPLICATION_EXTENSION_API_ONLY' => 'YES',
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks @loader_path/Frameworks',
'TARGETED_DEVICE_FAMILY' => '4',
}.freeze,
Expand All @@ -297,6 +322,8 @@ module Constants
}.freeze,
[:framework, :swift] => {
'DEFINES_MODULE' => 'YES',
'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES',
'SWIFT_INSTALL_OBJC_HEADER' => 'NO',
}.freeze,
[:osx, :static_library] => {
'EXECUTABLE_PREFIX' => 'lib',
Expand Down Expand Up @@ -326,30 +353,47 @@ module Constants
[:application] => {
'ASSETCATALOG_COMPILER_APPICON_NAME' => 'AppIcon',
'ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME' => 'AccentColor',
'CURRENT_PROJECT_VERSION' => '1',
'GENERATE_INFOPLIST_FILE' => 'YES',
'MARKETING_VERSION' => '1.0',
'SWIFT_EMIT_LOC_STRINGS' => 'YES',
}.freeze,
[:ios, :application] => {
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks',
'TARGETED_DEVICE_FAMILY' => '1,2',
}.freeze,
[:ios, :application, :swift] => {
'INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents' => 'YES',
'INFOPLIST_KEY_UIMainStoryboardFile' => 'Main',
'INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad' => 'UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight',
'INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone' => 'UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight',
}.freeze,
[:osx, :application] => {
'COMBINE_HIDPI_IMAGES' => 'YES',
'CURRENT_PROJECT_VERSION' => '1',
'GENERATE_INFOPLIST_FILE' => 'YES',
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/../Frameworks',
'MARKETING_VERSION' => '1.0',
'SWIFT_EMIT_LOC_STRINGS' => 'YES',
}.freeze,
[:watchos, :application] => {
'ENABLE_PREVIEWS' => 'YES',
'INFOPLIST_KEY_UISupportedInterfaceOrientations' => 'UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown',
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks',
'SKIP_INSTALL' => 'YES',
'TARGETED_DEVICE_FAMILY' => '4',
}.freeze,
[:tvos, :application] => {
'ASSETCATALOG_COMPILER_APPICON_NAME' => 'App Icon & Top Shelf Image',
'INFOPLIST_KEY_UILaunchStoryboardName' => 'LaunchScreen',
'INFOPLIST_KEY_UIMainStoryboardFile' => 'Main',
'INFOPLIST_KEY_UIUserInterfaceStyle' => 'Automatic',
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks',
'TARGETED_DEVICE_FAMILY' => '3',
}.freeze,
[:tvos, :application, :swift] => {
'ENABLE_PREVIEWS' => 'YES',
}.freeze,
[:watchos, :application, :swift] => {
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => 'YES',
}.freeze,
[:bundle] => {
'WRAPPER_EXTENSION' => 'bundle',
'SKIP_INSTALL' => 'YES',
Expand All @@ -358,9 +402,14 @@ module Constants
'SDKROOT' => 'iphoneos',
}.freeze,
[:osx, :bundle] => {
'COMBINE_HIDPI_IMAGES' => 'YES',
'INSTALL_PATH' => '$(LOCAL_LIBRARY_DIR)/Bundles',
'SDKROOT' => 'macosx',
'COMBINE_HIDPI_IMAGES' => 'YES',
'CURRENT_PROJECT_VERSION' => '1',
'GENERATE_INFOPLIST_FILE' => 'YES',
'INFOPLIST_KEY_NSPrincipalClass' => '',
'INSTALL_PATH' => '$(LOCAL_LIBRARY_DIR)/Bundles',
'MARKETING_VERSION' => '1.0',
'SDKROOT' => 'macosx',
'SWIFT_EMIT_LOC_STRINGS' => 'YES',
}.freeze,
}.freeze

Expand All @@ -369,10 +418,10 @@ module Constants
PROJECT_DEFAULT_BUILD_SETTINGS = {
:all => {
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
'ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS' => 'YES',
'CLANG_ANALYZER_NONNULL' => 'YES',
'CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION' => 'YES_AGGRESSIVE',
'CLANG_CXX_LANGUAGE_STANDARD' => 'gnu++14',
'CLANG_CXX_LIBRARY' => 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD' => 'gnu++20',
'CLANG_ENABLE_MODULES' => 'YES',
'CLANG_ENABLE_OBJC_ARC' => 'YES',
'CLANG_ENABLE_OBJC_WEAK' => 'YES',
Expand Down Expand Up @@ -400,14 +449,16 @@ module Constants
'CLANG_WARN_UNREACHABLE_CODE' => 'YES',
'COPY_PHASE_STRIP' => 'NO',
'ENABLE_STRICT_OBJC_MSGSEND' => 'YES',
'GCC_C_LANGUAGE_STANDARD' => 'gnu11',
'ENABLE_USER_SCRIPT_SANDBOXING' => 'YES',
'GCC_C_LANGUAGE_STANDARD' => 'gnu17',
'GCC_NO_COMMON_BLOCKS' => 'YES',
'GCC_WARN_64_TO_32_BIT_CONVERSION' => 'YES',
'GCC_WARN_ABOUT_RETURN_TYPE' => 'YES_ERROR',
'GCC_WARN_UNDECLARED_SELECTOR' => 'YES',
'GCC_WARN_UNINITIALIZED_AUTOS' => 'YES_AGGRESSIVE',
'GCC_WARN_UNUSED_FUNCTION' => 'YES',
'GCC_WARN_UNUSED_VARIABLE' => 'YES',
'LOCALIZATION_PREFERS_STRING_CATALOGS' => 'YES',
'MTL_FAST_MATH' => 'YES',
'PRODUCT_NAME' => '$(TARGET_NAME)',
'SWIFT_VERSION' => '5.0',
Expand All @@ -417,7 +468,6 @@ module Constants
'ENABLE_NS_ASSERTIONS' => 'NO',
'MTL_ENABLE_DEBUG_INFO' => 'NO',
'SWIFT_COMPILATION_MODE' => 'wholemodule',
'SWIFT_OPTIMIZATION_LEVEL' => '-O',
}.freeze,
:debug => {
'DEBUG_INFORMATION_FORMAT' => 'dwarf',
Expand All @@ -427,7 +477,7 @@ module Constants
'GCC_PREPROCESSOR_DEFINITIONS' => ['DEBUG=1', '$(inherited)'],
'MTL_ENABLE_DEBUG_INFO' => 'INCLUDE_SOURCE',
'ONLY_ACTIVE_ARCH' => 'YES',
'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'DEBUG',
'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'DEBUG $(inherited)',
'SWIFT_OPTIMIZATION_LEVEL' => '-Onone',
}.freeze,
}.freeze
Expand Down
2 changes: 1 addition & 1 deletion lib/xcodeproj/project/object/root_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class PBXProject < AbstractObject

# @return [String] preferred project object version
#
attribute :preferred_project_object_version, String, '70'
attribute :preferred_project_object_version, String, Constants::LAST_KNOWN_OBJECT_VERSION.to_s

# @return [PBXGroup] the group containing the references to products of
# the project.
Expand Down
2 changes: 1 addition & 1 deletion lib/xcodeproj/project/object_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def validate_value(object)
"for attribute: #{inspect}" unless acceptable
else
raise "[Xcodeproj] Type checking error: got `#{object.isa}` for " \
"attribute: #{inspect}" unless acceptable
"attribute: #{inspect} - #{object.uuid} #{object.to_ascii_plist}" unless acceptable
end
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
COMBINE_HIDPI_IMAGES = YES
INFOPLIST_FILE = ___PACKAGENAME___/Info.plist
CURRENT_PROJECT_VERSION = 1
GENERATE_INFOPLIST_FILE = YES
INFOPLIST_KEY_NSPrincipalClass =
INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Bundles
MACOSX_DEPLOYMENT_TARGET = ___BESTMACOSVERSION___
MARKETING_VERSION = 1.0
PRODUCT_BUNDLE_IDENTIFIER = ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.___PACKAGENAMEASRFC1034IDENTIFIER___
SDKROOT = macosx
SKIP_INSTALL = YES
SWIFT_EMIT_LOC_STRINGS = YES
WRAPPER_EXTENSION = bundle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ DEFINES_MODULE = YES
DYLIB_COMPATIBILITY_VERSION = 1
DYLIB_CURRENT_VERSION = 1
DYLIB_INSTALL_NAME_BASE = @rpath
INFOPLIST_FILE = ___PACKAGENAME___/Info.plist
ENABLE_MODULE_VERIFIER = YES
GENERATE_INFOPLIST_FILE = YES
INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/Frameworks
MACOSX_DEPLOYMENT_TARGET = ___BESTMACOSVERSION___
MARKETING_VERSION = 1.0
MODULE_VERIFIER_SUPPORTED_LANGUAGES = objective-c objective-c++
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = gnu17 gnu++20
PRODUCT_BUNDLE_IDENTIFIER = ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.___PACKAGENAMEASRFC1034IDENTIFIER___
PRODUCT_NAME = $(TARGET_NAME:c99extidentifier)
SDKROOT = macosx
SKIP_INSTALL = YES
SWIFT_EMIT_LOC_STRINGS = YES
VERSIONING_SYSTEM = apple-generic
VERSION_INFO_PREFIX =
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor
CODE_SIGN_ENTITLEMENTS = ___PACKAGENAME___/___PACKAGENAMEASIDENTIFIER___.entitlements
COMBINE_HIDPI_IMAGES = YES
INFOPLIST_FILE = ___PACKAGENAME___/Info.plist
CURRENT_PROJECT_VERSION = 1
GENERATE_INFOPLIST_FILE = YES
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks
MACOSX_DEPLOYMENT_TARGET = ___BESTMACOSVERSION___
MARKETING_VERSION = 1.0
PRODUCT_BUNDLE_IDENTIFIER = ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.___PACKAGENAMEASRFC1034IDENTIFIER___
SDKROOT = macosx
SWIFT_EMIT_LOC_STRINGS = YES
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ DEFINES_MODULE = YES
DYLIB_COMPATIBILITY_VERSION = 1
DYLIB_CURRENT_VERSION = 1
DYLIB_INSTALL_NAME_BASE = @rpath
INFOPLIST_FILE = ___PACKAGENAME___/Info.plist
ENABLE_MODULE_VERIFIER = YES
GENERATE_INFOPLIST_FILE = YES
INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks
IPHONEOS_DEPLOYMENT_TARGET = latest_iphoneos
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks
MARKETING_VERSION = 1.0
MODULE_VERIFIER_SUPPORTED_LANGUAGES = objective-c objective-c++
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = gnu17 gnu++20
PRODUCT_BUNDLE_IDENTIFIER = ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.___PACKAGENAMEASRFC1034IDENTIFIER___
PRODUCT_NAME = $(TARGET_NAME:c99extidentifier)
SDKROOT = iphoneos
SKIP_INSTALL = YES
SWIFT_EMIT_LOC_STRINGS = YES
TARGETED_DEVICE_FAMILY = 1,2
VERSIONING_SYSTEM = apple-generic
VERSION_INFO_PREFIX =

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading