It is definitely more convenient to use Category. The disadvantage is that you should pay attention to the extended method names so that they do not conflict. It is best to add a prefix. Also, if you use KVO or Notification, you must write the corresponding logout method in the dealloc method of the class that uses the extension method. This is not as convenient as Util. Util can directly write the logout in Util's dealloc method.
It is definitely more convenient to use Category. The disadvantage is that you should pay attention to the extended method names so that they do not conflict. It is best to add a prefix. Also, if you use KVO or Notification, you must write the corresponding logout method in the dealloc method of the class that uses the extension method. This is not as convenient as Util. Util can directly write the logout in Util's dealloc method.