[Xcode] No single source of truth for the list of files to compile for multi-platform frameworks

Originator:info
Number:rdar://22645037 Date Originated:10-Sep-2015 10:12 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6, 7, 7.1
Classification:UI/Usability Reproducible:Always
 
Summary:
Xcode’s only way of creating frameworks that can be used across multiple platforms is duplicating them, and sharing the same product name.
This is ridiculous in itself and a clear limitation of Xcode’s legacy.

At least their configuration can be shared with .xcconfig files, but the list of files to be compiled in them cannot be shared, **resulting in multiple sources of truth**.

Steps to Reproduce:
- Create a project.
- Create a framework X.
- Duplicate the framework THREE times, for a total of 4 frameworks: Mac OS X, iOS, tvOS, and watchOS.
- Make them share the same product name.
- Create a new file.

Expected Results:
You're not forced to select all 4 frameworks. These 4 should just be ONE thing, that happens to compile to 4 different platforms. That’s an IDE implementation detail that's leaking to the UI.

Actual Results:
You need to select all 4 frameworks, which isn't a problem in itself (just annoying), but it means that the list of files that the 4 frameworks will build does not come from a single source of truth, leading to hard to maintain projects and error prone configurations. This does not scale.

Regression:
Other IDEs, like IntelliJ, provide declarative ways to represent this list of files. I can think of several ways in which this (and by this I mean unifying frameworks that are actually just one thing) could be accomplished at the UI level.

IDEs should provide non-leaky abstractions.

Notes:
I know this Radar will just end up in a blackhole, but at least I did my job.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!