CocoaPods / CocoaPods/Xcodeproj
inability to specify platform or type on creation of aggregate targets leads to incorrect default configuration
- Dominant language
- Ruby
- Stars
- 2.4k
- Forks
- 488
- PR merge metrics
- No merged PRs in 30d
Description
I'm using this library to clone a project of mine during an obfuscation process that manipulates the source code directly when renaming. When I execute this code to create my aggregate target (used to create a universal framework):
```
new_proj = Xcodeproj::Project.new("Framework.xcodeproj")
agg = new_proj.new_aggregate_target("aggregate_target")
agg.build_configurations.map do |config|
puts config.build_settings
end
```
I get back `{"ASSETCATALOG_COMPILER_APPICON_NAME"=>"AppIcon"}` which leads to this error: `None of the input catalogs contained a matching stickers icon set or app icon set named "AppIcon".` upon executing my framework build.
Why is this the default behavior? I'm building a framework which has no requirement on `ASSETCATALOG_COMPILER_APPICON_NAME`
I looked around and saw in the `project_helper` class:
`self.new_target(project, type, name, platform, deployment_target, product_group, language)` allows you to pass the type, aka `:framework` in this case but aggregate target does not:
```
def self.new_aggregate_target(project, name)
target = project.new(PBXAggregateTarget)
project.targets << target
target.name = name
target.build_configuration_list = configuration_list(project)
target
end
```
Since I can't specify the platform or type, I'm having to workaround with:
```
agg.build_configurations.map do |config|
config.build_settings['SUPPORTED_PLATFORMS'] = 'iphonesimulator iphoneos'
config.build_settings['ASSETCATALOG_COMPILER_APPICON_NAME'] = nil
end
```
Thanks for all the hardwork on this super helpful gem :)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.