ClassyKit / Classy

Expressive, flexible, and powerful stylesheets for UIView and friends.
http://classykit.github.io/Classy/
MIT License
740 stars 76 forks source link

Compile Error when used in App Extension with Cocoapods and use_frameworks! option (Swift) #92

Open spifd opened 9 years ago

spifd commented 9 years ago

With latest Cocoapods 0.36.0, when using use_frameworks! option to build dependencies as frameworks (Swift), the Classy Pod dependency fails to compile because of a couple of calls to UIApplication.sharedApplication. UIApplication.sharedApplication is not relevant for app extensions (ex: custom keyboard).

In case of app extension, the live reload feature may have to be either disabled, or an additional top view controller property shall be set by clients on CASStyler. One possible workaround might be to use preprocessor macros to make that conditional on its definition through client Cocoapods post_install step.

At this time, I'm not quite sure it is very elegant and if there are better alternatives. Any thoughts?