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

Remove UIKit import #39

Closed
nathanhosselton opened this issue Jul 7, 2015 · 5 comments
Closed

Remove UIKit import #39

nathanhosselton opened this issue Jul 7, 2015 · 5 comments

Comments

@nathanhosselton
Copy link

A nit-pick perhaps, but this library doesn't utilize any part of UIKit so its inclusion is puzzling and seemingly unnecessary. Please correct me if I'm wrong though.

@granoff
Copy link
Owner

granoff commented Jul 7, 2015

You're probably right. :-) Thanks for pointing this out.

@stannedelchev
Copy link
Contributor

Just to test this, I removed all references of "UIKit" in the source code, but not the .pbxproj.
Everything compiles, the unit tests run fine.
The test app seems to be ok in the simulator, but I only did a few clicks.

The only place I didn't clean was the precompiled header in the app - LockBox/LockBox/LockBox-Prefix.pch

If the #import <UIKit/UIKit.h> statement there is removed, the app doesn't compile (expectedly so).

We can either leave the import in the precompiled header, or have separate imports in each viewcontroller/appdelegate, etc.

@granoff
Copy link
Owner

granoff commented Jul 8, 2015

I think the appropriate fix here is to remove the import of UIKit.h from Lockbox.h, but leave any UIKit references in files under Lockbox/ unchanged. The latter is a sample project that does require UIKit. When incorporating Lockbox into your own project, you need only include Lockbox.[hm] there in. If Lockbox is incorporated via CocoaPods, this is what happens.

@nathanhosselton
Copy link
Author

Apologies. Yes, I was speaking only to the import within the Lockbox header file.

@granoff
Copy link
Owner

granoff commented Jul 10, 2015

Thanks!

@granoff granoff closed this as completed Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants