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

Make Pods targets inherit deployment target from the app when higher #23679

Closed
wants to merge 2 commits into from
Closed
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
10 changes: 7 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,16 @@ end
post_install do |installer|
gutenberg_post_install(installer: installer)

# Fix a code signing issue in Xcode 14 beta.
# This solution is suggested here: https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1189861270
# ====================================
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# Fix a code signing issue in Xcode 14 beta.
# This solution is suggested here: https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1189861270
config.build_settings['CODE_SIGN_IDENTITY'] = ''

# Let Pods targets inherit deployment target from the app
# This solution is suggested here: https://github.com/CocoaPods/CocoaPods/issues/4859
pod_ios_deployment_target = Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if pod_ios_deployment_target <= APP_IOS_DEPLOYMENT_TARGET
Comment on lines +115 to +118
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting that the warning Xcode gives is that the deployment target is set to a version lower than the minimum supported one. An alternative fix would have been to set the target to the minimum supported version. The solution here is more portable, though, because it doesn't require updating the override every time the minimum supported target changes.

end
end

Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ SPEC CHECKSUMS:
WordPress-Aztec-iOS: 3732c6d865a5c9f35788377bdeda8a80ea10d0a1
WordPress-Editor-iOS: 453345420ced3d3ef20f0051b3df46ff10281e0c

PODFILE CHECKSUM: f30ae9db730f660b2c300f7761c19ab78f244d90
PODFILE CHECKSUM: 5929f96fe170623f0e4abff76bffc6ce69432409

COCOAPODS: 1.15.2
4 changes: 0 additions & 4 deletions WordPress/WordPress.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27084,7 +27084,6 @@
);
INFOPLIST_FILE = Info.plist;
INFOPLIST_PREPROCESS = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
JP_SCHEME = jpdebug;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -27153,7 +27152,6 @@
);
INFOPLIST_FILE = Info.plist;
INFOPLIST_PREPROCESS = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
JP_SCHEME = jetpack;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -29148,7 +29146,6 @@
);
INFOPLIST_FILE = "WordPress-Alpha-Info.plist";
INFOPLIST_PREPROCESS = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
JP_SCHEME = jpalpha;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -29592,7 +29589,6 @@
);
INFOPLIST_FILE = "WordPress-Internal-Info.plist";
INFOPLIST_PREPROCESS = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
JP_SCHEME = jpinternal;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down