It is recommended to enable C / ObjC Modules in the project build settings.
Currently this is not possible, because there seems to be a name collision with our Category class. This needs a clean-up.
How to enable this setting after clean-up:
- in the File View, click the very top line (karatasi project)
- in the project, select the Build Settings tab.
- Show 'All' | 'Levels'
- Scroll down to the section 'Apple LLVM 5.0 - Language - Modules'
and configure to 'Yes'.
How to test this setting:
- connect the iPhone device.
- set the active scheme to the iOS7 version of the device
- build successfully.
needs investigation, not an issue at the moment, will move this tracker to refactoring
Ticket moved from /p/karatasi/bugs/370/
Ticket moved from /p/karatasi/refactoring/33/
Can't be converted:
As of today (svn 3885), our current configuration is Default compiler (Apple LLVM 8.1).
The section Apple LLVM 8.1 - Language - Modules shows 4 entries, we have configured all four to the iOS default value:
Allow Non-modular Includes In FrameworkModules: NO
Enable Clang Module Debugging: YES
Enable Modules (C and Objective C): NO
Link Frameworks Automatically: YES
So it seems that the recommendation has changed meanwhile?
Googled a bit for a better understanding of the topic.
1) Using modules is required when I build a framework (which we don't)
https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html
If you’re working with frameworks, make sure the Defines Module (DEFINES_MODULE) build setting under Packaging is set to “Yes”.
2) Using modules seems to give faster compile times.
https://www.raywenderlich.com/49850/whats-new-in-objective-c-and-foundation-in-ios-7
All new projects created with Xcode 5 have this enabled by default, but you should definitely enable it on all your existing projects.
3) I verified the statement about new projects created (we have currently XCode 8.3.3.). Still even these projects show iOS defaults = NO modules enabled. What is the reason?
4) https://clang.llvm.org/docs/Modules.html
lists a lot of possible side effects.
I think we should not just modify this setting (without full understanding of the consequences and dependencies to other settings).
Better strategy is to setup the karatasi project from scratch.
A good time for this seems after the 1.9.x release.
Moving the tracker to 1.10 milestone.