Comments (15)
@keith it's implemented here #100. Have a look and see if this suits your needs ๐
from xcodegen.
@keith, I've added a followup PR #101 that allows you to fully control the setting presets. Setting this to none
removes the need for the commit I noticed you have here:
lyft@3d2fe09
from xcodegen.
Interesting. This mirrors the thoughts in #77
from xcodegen.
Ah yes, I think that kind of only half captures the problem though, since even if you're not overriding the setting, you may not want it to be set in the project. This happens for us a lot in our all Swift app, where we don't really want Objective-C build settings to be set, since future developers won't know if we actually need it, or if it was just set by default by Xcode
from xcodegen.
What do you suggest as way to opt out of setting presets? There are presets for the project, debug and release configurations, each platform and each target
from xcodegen.
I guess maybe a top level attribute for this? In theory it could also be per-target, but that seems like overkill?
from xcodegen.
What about this?
options:
clearBaseSettings: true
You can already clear debug and release settings by simply providing a different type other than debug
or release
configs:
Debug: none
Release: none
from xcodegen.
You can already clear debug and release settings by simply providing a different type other than debug or release
Oh interesting, is that all that is used for?
from xcodegen.
Yep, that's all that does. It's documented in the Project spec
from xcodegen.
Another option is to not apply the base settings if the config type is cleared.
From this:
buildSettings += SettingsPresetFile.base.getBuildSettings()
if let type = config.type {
buildSettings += SettingsPresetFile.config(type).getBuildSettings()
}
to this:
if let type = config.type {
buildSettings += SettingsPresetFile.base.getBuildSettings()
buildSettings += SettingsPresetFile.config(type).getBuildSettings()
}
from xcodegen.
I'm more for the clearBaseSettings
solution. I think it's more explicit and the attribute is at the level of the project, where it's getting applied. Modifying the project configuration based on a target attribute might be too implicit for the developer who wouldn't expect the base settings to be cleared. This could be solved by adding some documentation though.
from xcodegen.
The configs arenโt a target level attribute, they live on the top level project. Also those debug and release settings actually get applied to the project, not the target
from xcodegen.
Cool! then I'd go with the solution that you proposed.
from xcodegen.
There could still be another solution to clear all the presets including those in targets. Maybe an options.applySettingPresets
which could be one of the following:
- all (default)
- targets (don't apply any project settings ie, base, debug or release)
- none
What do you think?
Maybe if we had that #100 wouldn't be needed as it would be strange to set all
here and none
on the configs?
from xcodegen.
Awesome!!
from xcodegen.
Related Issues (20)
- Why Isn't watchOS a Supported Destination? HOT 1
- Add DESTDIR support to Makefile HOT 2
- Can't specify preferredScreenCaptureFormat in scheme's test actions HOT 1
- XcodeGenKit/resource_bundle_accessor.swift:44: Fatal error: unable to find bundle named XcodeGen_XcodeGenKit HOT 17
- XcodeGen doesn't support the full set of C++ file extensions that Xcode itself does
- [BUG] Optional source path doesn't work if executing xcodegen from outer directory
- Where should I set the App version? HOT 2
- Specify additional build/run targets for target-scheme HOT 2
- Xcodegen cache bug? HOT 2
- Strange behavior of SwiftUI App HOT 2
- Exclude PrivacyInfo.xcprivacy from Copy Bundle Resources HOT 11
- Xcodegen remove SPM package after generate, and resolving from Xcode adds it again HOT 6
- Indentation options are not applied to files being part of Packages HOT 1
- Deintegration of GraphViz HOT 1
- Using 'supportedDestinations' with watchOS app doesn't generate an 'Embed Watch Content' build phase HOT 12
- Setting a default device target HOT 1
- Prefetch resource tags (ODR, On Demand Resources) HOT 1
- Specify multiple package products broken HOT 1
- settings DEVELOPMENT_TEAM doesn't work HOT 1
- Sources "name" property ignored if specifying "group"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcodegen.