metova / ThunderCats

ThunderCats is a lightweight collection of utility extensions added to existing Foundation & UIKit classes.
https://metova.com
MIT License
19 stars 4 forks source link

Added deprecation warnings for ALAsset functions #21

Closed wibs closed 8 years ago

wibs commented 8 years ago

Since ALAsset has been deprecated in iOS 9+ and the more powerful Photos framework was introduced in iOS 8+, I suggest we deprecate the functions that deal with ALAsset. The Photos framework has a baked-in function for retrieving image assets, which does almost the exact same thing as the imageFromAsset function. In addition to this, the imageOrientationFromAssetOrientation would no longer be needed since that is a property on ALAsset. This PR would be the resolution to issue #18

wibs commented 8 years ago

Since I deprecated those functions, the build isn't passing because of the deprecation warning. We'll need to handle that.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.02%) to 95.721% when pulling 647eb62912448abb061a91ec5020573db6d02949 on feature/PHAsset into 956a045a47def1584f167d0938010b7be6548345 on develop.

wibs commented 8 years ago

Deprecation is handled correctly now. The deprecated function is simply a call to an unexposed function that contains all of the logic. This way we can avoid calling the deprecated function within our code and avoid the deprecation warning.