markohlebar / Peckham

Add #import-s from anywhere in the code.
MIT License
714 stars 94 forks source link

Adding a framework header from Peckham links framework to the target #20

Open markohlebar opened 10 years ago

markohlebar commented 10 years ago

Let's say sou are working on an iOS app and want to add MKMapView to the project, and you haven't linked the framework or did anything to start working with MapKit API.

squarefrog commented 10 years ago

Couldn't this be better achieved with

@import MapKit;

That way you don't need to link the framework with your target. Should be compatible with Xcode 5 onwards.

markohlebar commented 10 years ago

Yeah that is also in the roadmap, maybe a quicker solution as well... My idea was that I didn't want to force people to use modules if they don't want to, I think a better approach would be to check if modules are enabled for the project and then do the logic based on that. Does that make sense?

squarefrog commented 10 years ago

Completely - I actually only noticed this issue as I came to request the @import feature. I would say module support would initially be more important, as any project created in the last year or so should support them. Also they should be much easier to implement.

But you are right that you shouldn't force people to use them if they have a legacy project. It'd probably be worth doing a straw poll with other devs to see what the effective base of developers not using modules is.