Where to store API key

Hi, I want to make an app with Swift and I want to use the google translate API. Where can I store my API key safely? When I try to find an answer on google everyone just says that it is not safe to store it in the code or that it is not possible to store it safely but I can not find some real examples of where could I store it. So can you give me some real examples please? Should I store the API key in a firebase database or cloudKit database or is it safe to use keychain? Thank you in advance :)

Where to store API key
 
 
Q