IOS fetch OTP using mac

Hi ,

In ios , I want to read message to read OTP.
Please suggest a solution for same.