facebookarchive / pop

An extensible iOS and OS X animation library, useful for physics-based interactions.
Other
19.66k stars 2.88k forks source link

Fix build for clients using pop through Carthage / Modules, clear warnings #256

Closed patr1ck closed 9 years ago

patr1ck commented 9 years ago

Prior to 9e44015664c5d6b8c8b21c0f8344633f8cec8b08, DEFINES_MODULE was set to YES, so pop worked fine in clients that were using in through Carthage or otherwise as a module. It was removed in that commit, so client projects then failed to build with a no such module 'pop' error.

This PR simply re-enables that flag, as well as adds a modulemap file for the iOS target which excludes the private headers, so that warnings are no longer generated in client project builds.

grp commented 9 years ago

I'm going to merge this, but we generally don't support using an Xcode project to use Pop. Xcode projects are an opaque, generally unmaintainable format and it's better to generate them from something human readable (like a Podfile) if you can...

grp commented 9 years ago

Like, for example this patch adds GCC_NO_COMMON_BLOCKS = NO, which isn't easy to discover what that's for or why it was added. :)

patr1ck commented 9 years ago

@grp Cool, thanks! GCC_NO_COMMON_BLOCKS = NO was added as part of the LastUpgradeCheck bump. It's simply a recommended new setting.

I'm a bit confused by what you're suggesting ("we generally don't support using an Xcode project to use Pop") – Carthage aside, even when using cocoapods in the client app, the .xcodeproj file (however annoyingly opaque) is required for building the framework target.

Is there a better/more correct fix for this?

patr1ck commented 9 years ago

FWIW, Apple/llvm seem to be pushing for Modules as the future of frameworks, so this may be required sooner or later anyways, just wondering if there's something I can do that's more helpful. :)

grp commented 9 years ago

@patr1ck Sorry about that — I meant 'the' Xcode project not 'an'. As in the one that's checked in and I have no clue how it works at all. :)

Cocoapods generates something that usually works, and is a little better since it moves that responsibilities for getting that right to a group of pretty smart people who know a lot about it rather than the library maintainers who probably don't. For example I'm sure there's a better way of exporting headers for a static library than what the Pop project is doing right now!

I'm totally happy to take patches to it, but it's not used internally so it's hard to claim it's supported.