Juanpe / SkeletonView

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
MIT License
12.53k stars 1.1k forks source link

Deprecation warning fix for AssociatedObjects protocol from `class` to `AnyObject` #376

Closed brunnerjosh closed 3 years ago

brunnerjosh commented 3 years ago

Summary

I was updating my iOS app to be able to run on Xcode 12.5 (beta) and noticed that Apple is now flagging the use of class inherited protocols as deprecated in favor of inheriting from AnyObject. In my iOS app, we flag warnings as errors so now our app won't compile. I wanted to be able to pitch in and help modernize the code so I went ahead and fixed this deprecation here.

Screen Shot 2021-02-08 at 12 32 59 PM

After a little bit of research, I came across this forum Swift.org post which seems to point to the discussion where this deprecation discussion started.

Requirements (place an x in each of the [ ])

Juanpe commented 3 years ago

Hi @brunnerjosh, thanks for contributing.

You are right, Apple recommends using AnyObject instead of class.

This fix will be included in the next release