Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"use of @import when modules are disabled error" #77

Closed
4ntoine opened this issue Mar 9, 2015 · 5 comments
Closed

"use of @import when modules are disabled error" #77

4ntoine opened this issue Mar 9, 2015 · 5 comments

Comments

@4ntoine
Copy link

4ntoine commented Mar 9, 2015

I've just updated pods for my project and now i'm having "use of @import when modules are disabled error" because of SCLAlertView.h:

@import UIKit;

Modules are switched ON for the project:
2015-03-09 13 09 55

How can i fix it?

@4ntoine
Copy link
Author

4ntoine commented Mar 9, 2015

It's because of commit: 27e6dbf

@dogo
Copy link
Owner

dogo commented Mar 9, 2015

Modules are enabled by default in new projects since XCode 5. To enable them, go into your project build settings, search for "Modules" and set "Enable Modules" to "YES". The "Link Frameworks" should be "YES" too:

723su

PS : You can still release for older OSs (say iOS 4.3 or whatever). Modules don't change how your code is built or any of the source code.

@4ntoine
Copy link
Author

4ntoine commented Mar 9, 2015

I've attached the screenshot where you can see modules are turned ON. Using latest XCode

@dogo
Copy link
Owner

dogo commented Mar 10, 2015

It's very weird, was enable before?
My Xcode is Version 6.2 (6C131e)

@dogo dogo changed the title WTH: "use of @import when modules are disabled error" "use of @import when modules are disabled error" Mar 25, 2015
@dogo dogo closed this as completed Mar 26, 2015
@robmaceachern
Copy link

I'm also having this issue. According to this comment, using @import isn't necessary since #import will be automatically mapped if modules are enabled, so I think 27e6dbf should be reverted.
jessesquires/JSQMessagesViewController#541 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants