vtourraine / AcknowList

Acknowledgements screen displaying a list of licenses, for example from CocoaPods and Swift Package Manager dependencies.
MIT License
784 stars 59 forks source link

Make all designated initializers in AcknowListViewController public #66

Closed klmitchell2 closed 4 years ago

klmitchell2 commented 4 years ago

init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) initializer needs to be public in order for a subclass of AcknowListViewController to use the convenience initializer.

Xcode release notes:

Convenience initializer inheritance for subclasses defined outside the module that defines the base class now comes with additional restrictions. When these subclasses have a base class with non-public designated initializers, they no longer automatically inherit convenience initializers from their superclasses. To restore this automatic inheritance behavior, the base class must ensure that all of its designated initializers are public or open. (51249311)

https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_release_notes

vtourraine commented 4 years ago

Thank you for the pull request! You’re totally right, this needs to be fixed.

But now that I’m looking at it, I just don’t see the need to override this particular initializer, since it only forwards to the super implementation. Am I missing something, or can we just remove this function?

klmitchell2 commented 4 years ago

You could also remove the function. I can update this PR with that change if you'd like.

vtourraine commented 4 years ago

Yes, please, that’d be great 🙌

vtourraine commented 4 years ago

Great, thank you! Less code, less problems (I guess).

I’ll wait for a couple of days to make sure no one has any problem with it, then I’ll tag it as a new pod version.

klmitchell2 commented 4 years ago

Awesome thanks for the help!