Sending text or making a call to the user's phone programmatically

Hi, So I am currently trying to create an app and for one of its functions I want to text the user from let's say my number or call the user from my number after they enter their number in the textfields. So, the idea is to send a text message or make a call to the user from the app after they press a button. How can I achieve that?

P.S: I do not want to use any third-party app but if there are any libraries that can do this then please let me know. I used MFMailComposer that pops up the imessage app and then asks the users to send the text. I don't want that. Instead, I want to send a text to the user.

For a clearer explanation you can imagine this as sending an OTP to the user after they provide their phone number. I will be sending them a reminder sort of text not an OTP in this case.