AndreiBogdan
04/10/2024, 12:33 PMobject MyObject{ ... }
when it'll create the obj-c code it'll have an init()
method apparently, that confuses the iOS developer and she doesn't know if she should instantiate that class or use it as a singleton.
With the exception of explicitly naming them using the word xxxSingletonxxx, is there a way I can hide/stop that init() method from being generated ? I can't do a private constructor()
because it's not a class, it's an object.
If I try to instantiate the object in Android it nicely shows an error that the constructor is private, but for iOS ... not so much
Ideas ?!ian.shaun.thomas
04/10/2024, 12:39 PM.shared
if I understand the issue correctly.AndreiBogdan
04/10/2024, 12:44 PM.shared
Besides naming it to be more clear, it would be great to block the possibility of her creating her own instance of it