mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
Compare commits
5 Commits
c7fd10b2c2
...
311a0ed5b7
Author | SHA1 | Date | |
---|---|---|---|
|
311a0ed5b7 | ||
|
8beb3b2d2d | ||
|
c442558e73 | ||
|
52f8206325 | ||
|
d1382f18e8 |
@ -1039,7 +1039,7 @@ The different actions share some properties:
|
||||
- [ ] **askForAppToLaunch**: **Bool** - `run` and `profile` actions can define the executable set to ask to launch. This defaults to false.
|
||||
- [ ] **launchAutomaticallySubstyle**: **String** - `run` action can define the launch automatically substyle ('2' for extensions).
|
||||
- [ ] **storeKitConfiguration**: **String** - `run` action can specify a storekit configuration. See [Options](#options).
|
||||
- [ ] **macroExpansion**: **String** - `run` and `test` action can define the macro expansion from other target. This defaults to nil.
|
||||
- [ ] **macroExpansion**: **String** - `run` and `test` actions can define the macro expansion from other target. This defaults to nil.
|
||||
|
||||
### Execution Action
|
||||
|
||||
|
@ -185,18 +185,23 @@ extension Target {
|
||||
let newTargetName = platformPrefix + targetName + platformSuffix
|
||||
|
||||
var settings = platformTarget["settings"] as? JSONDictionary ?? [:]
|
||||
var newProductName: String?
|
||||
if settings["configs"] != nil || settings["groups"] != nil || settings["base"] != nil {
|
||||
var base = settings["base"] as? JSONDictionary ?? [:]
|
||||
if base["PRODUCT_NAME"] == nil {
|
||||
if let baseProductName = base["PRODUCT_NAME"] as? String {
|
||||
newProductName = baseProductName
|
||||
} else {
|
||||
base["PRODUCT_NAME"] = targetName
|
||||
}
|
||||
settings["base"] = base
|
||||
} else {
|
||||
if settings["PRODUCT_NAME"] == nil {
|
||||
if let productName = settings["PRODUCT_NAME"] as? String {
|
||||
newProductName = productName
|
||||
} else {
|
||||
settings["PRODUCT_NAME"] = targetName
|
||||
}
|
||||
}
|
||||
platformTarget["productName"] = targetName
|
||||
platformTarget["productName"] = ((platformTarget["productNameFromSettings"] as? Bool == true) ? newProductName : nil) ?? targetName
|
||||
platformTarget["settings"] = settings
|
||||
if let deploymentTargets = target["deploymentTarget"] as? [String: Any] {
|
||||
platformTarget["deploymentTarget"] = deploymentTargets[platform]
|
||||
|
Loading…
Reference in New Issue
Block a user