Skip to content

Conversation

@johnarn
Copy link
Contributor

@johnarn johnarn commented Sep 10, 2021

Description

In Xcode 12.5 the following warning occurs
the class keyword for protocol inheritance is deprecated

As the proposal #0156 says:

This proposal merges the concepts of class and AnyObject , which now have the same meaning: they represent an existential for classes. To get rid of the duplication, we suggest only keeping AnyObject around. To reduce source-breakage to a minimum, class could be redefined as typealias class = AnyObject and give a deprecation warning on class for the first version of Swift this proposal is implemented in. Later, class could be removed in a subsequent version of Swift.

Both keywords behave identically. AnyObject is preferred because it is the name of a type and can appear anywhere that a type can. "class" is just special syntax in that one place in a protocol's inheritance clause, and it parses identically to "AnyObject".

Changes

The changes that have been made were to replace class with AnyObject as class is deprecated.

Review code

Please check my code and let me know if there are any problems.

@johnarn johnarn mentioned this pull request Sep 10, 2021
@AliSoftware
Copy link
Owner

AliSoftware commented Sep 10, 2021

Thanks for the fix, this looks great!

Could you also add an entry in the CHANGELOG.md file to credit yourself? That would be 👌

Just add a ## WIP section at the top (before the 4.1.1 section) then add a bullet point describing your change and link to this PR and your profile 🙂

@AliSoftware AliSoftware self-assigned this Sep 10, 2021
@AliSoftware AliSoftware self-requested a review September 10, 2021 20:21
@johnarn
Copy link
Contributor Author

johnarn commented Sep 10, 2021

Also can I ask when the change will be live at a new version?

@AliSoftware
Copy link
Owner

I'm hoping to take a look at a couple of PRs this weekend to hopefully get them all merged so I can release a new version right after that.

@johnarn
Copy link
Contributor Author

johnarn commented Sep 10, 2021

I'm really glad to hear that!! I'm looking forward for the new version.
I also want to congratulate you for your work!!!
Good job 😎

@AliSoftware AliSoftware merged commit 964bcb4 into AliSoftware:master Sep 12, 2021
@AliSoftware
Copy link
Owner

--------------------------------------------------------------------------------
 🎉  Congrats

 🚀  Reusable (4.1.2) successfully published
 📅  September 12th, 15:36
 🌎  https://cocoapods.org/pods/Reusable
 👍  Tell your friends!
--------------------------------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants