-
Notifications
You must be signed in to change notification settings - Fork 822
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
Fix handling of SWIFT_INSTALL_OBJC_HEADER when its value is YES/NO. #827
Fix handling of SWIFT_INSTALL_OBJC_HEADER when its value is YES/NO. #827
Conversation
Thanks. @yonaskolb Do you think we need to keep true/false literal compatibility that is invalid value on Xcode? |
3c27dc1
to
8b24d99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ileitch!
Yeah we probably don't need to maintain compatibility with true/false for this one specific case. Having said that it might be useful to have a wrapper around getCombinedBuildSetting
called getBoolBuildSetting
which checks for YES/NO and true/false. That could be used here if you'd like to add it @ileitch
let swiftInstallObjCHeader = project.getCombinedBuildSetting("SWIFT_INSTALL_OBJC_HEADER", target: target, config: project.configs[0]) as? Bool | ||
let swiftInstallObjCHeaderValue = project.getCombinedBuildSetting("SWIFT_INSTALL_OBJC_HEADER", target: target, config: project.configs[0]) | ||
|
||
var swiftInstallObjCHeader = true // Xcode default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that this is a non optional, can we update the confusing line below
&& swiftInstallObjCHeader != false
to just:
&& swiftInstallObjCHeader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
8b24d99
to
c3ecf4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic, thanks @ikesyo!
I'm not sure if true/false literals are valid values for xcconfig, but I guess we'll need to continue supporting it for backwards compatibility.
For reference: #805
/cc @kateinoigakukun