boredzo / iso-8601-date-formatter

A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.
http://boredzo.org/iso8601dateformatter/
Other
600 stars 140 forks source link

watchOS Compilation Compatibility #52

Closed neildaniels closed 9 years ago

neildaniels commented 9 years ago

Currently, master cannot be compiled for watchOS because it attempts to deal with an UIApplication memory warning. The memory warning and the class UIApplication are both unavailable on watchOS.

This pull request ensures that a watchOS compilation does not try to compile this existing code.

Notes:

This PR could have been simplified by doing #if TARGET_OS_IOS and removing TARGET_OS_IPHONE altogether, but that would cause issues for previous SDKs. This approach works for current, past, and “future” SDK/Xcode versions.

boredzo commented 9 years ago

Thank you!