07-21-2023, 07:08 PM
Actually an easier way to fix this is to move the `#import` statement to the top of the `.m` file instead (instead of having it in your `.h` header file). This way it won't complain that it's including a non-modular header file. I had this problem where `Allow non-module includes` set to `YES` did ***NOT*** work for me, so by moving it to the implementation file, it stopped complaining. This is in fact the preferred way of importing and including header files anyway. Once you've done this, setting this back to `NO` should work.
Ideally we should try and aim to have `Allow non-module includes` set to `NO`. Setting this to `YES` in most cases means you're doing something wrong. The setting translates to "Allow importing random header files on disk that aren't otherwise part of the module". This applies to a very few use cases in practice, and so this setting should always be `NO` (i.e. the default value).
Ideally we should try and aim to have `Allow non-module includes` set to `NO`. Setting this to `YES` in most cases means you're doing something wrong. The setting translates to "Allow importing random header files on disk that aren't otherwise part of the module". This applies to a very few use cases in practice, and so this setting should always be `NO` (i.e. the default value).