How to log out from facebook testing an ios app on real device [ruby]

Hi everyone.

I’m automating a game natively on iOS and Android. On Android each time you want to Log in it redirects you to a sign in form. But on iOS it takes the session opened inside Safari and there is no option there for logging out.
Is there a way to delete the cookies from Safari or something which can help of logging out from Facebook if I’m inside my app?

Thank you all

is it possible to clear safari’s cookies or cache from Appium launching an app?