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

Extract the INFOPLIST_KEY build settings into a/the Info.plist file #98

Open
iKenndac opened this issue Oct 4, 2023 · 2 comments
Open
Assignees
Labels
✚✚ Enhancement

Comments

@iKenndac
Copy link

iKenndac commented Oct 4, 2023

Newer versions of Xcode, by default, have no Info.plist file in new projects, instead having the values all in various build settings.

After a while, I invariably have to switch to using a “real” Info.plist file, and extracting all of the build settings into the real file is a pain - even from an .xcconfig file.

Having this done for me would be wonderful!

@dempseyatgithub dempseyatgithub self-assigned this Oct 4, 2023
@dempseyatgithub dempseyatgithub added the ✚✚ Enhancement label Oct 4, 2023
@dempseyatgithub
Copy link
Owner

Thank you for filing an issue about this. It's an interesting idea that had not occurred to me.

@dempseyatgithub
Copy link
Owner

dempseyatgithub commented Oct 8, 2023

Thinking about this a bit.

Currently, BuildSettingExtractor does a single thing and therefore has a very simple interface. You drag in or select an Xcode project file and the app generates xccofing files from the build settings in the project file.

Adding this to BSE would mean the simple interface would now need some way for the user to specify what they want from the app. That could be something fairly lightweight, like a toggle on the drag destination window that chooses between two things to generate. But, since the app also allows dragging to the app icon to launch the app, there’d probably also need to be an extra step / decision point.

Another thought is that BSE currently does not change the existing Xcode project. After generated the xcconfig files, there are two relatively straightforward steps the user needs to perform in the Xcode project:

  • Set the xcconfig files in the ‘Based on Configuration File’ settings in Xcode
  • Delete the existing build settings from the project

Both are fairly straightforward.

But moving from a fully file-based Info.plist has many more manual steps besides generated the Info.plist itself:

  • The correct build settings must be updated to indicate whether to use an Info.plist file as opposed to a generated Info.plist
  • In some cases, there is an existing Info.plist that holds values not representable in build settings and those values must be merged
  • Build settings that contain Info.plist values should generally be removed so the Info.plist file serves as the single source of truth
  • If there is not already an existing Info.plist file in the project, the new file would need to be added to the project and the correct targets
  • Some Info.plist values should remain build settings and use variable substitution in the generated Info.plist file
  • Potentially others I am not thinking of off the top of my head.

As I think more about it, this sounds more like a separate tool than an extension of BuildSettingExtractor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✚✚ Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants