iOS Question Send SMS programmatically

luke2012

Well-Known Member
Licensed User
Longtime User
Hi all,
within an Android App I can use the belove code in order to send a SMS.

What about iOS Apps?

1) Is there a library to do this?
2) The OS allow to send SMS programmatically ?

Code: Copy
Sub Event_Click
Dim Sms As PhoneSms
Sms.Send2(NumberPhone,Body,False,False)
End Sub
 
tru this (use iPhone Library):
Code: Copy
Private Sub Event_Click
    Dim smsc As MessageComposer
    smsc.Initialize("smsc")
    smsc.SetRecipients(Array As String("123332323")) 'must be strings!
    smsc.Body = "Hello!!!"
    smsc.Show(Page1)
End Sub

Sub smsc_Complete (Result As Int)
    If Result = smsc.RESULT_SENT Then
        hd.ToastMessageShow("Message sent", True)
    Else
        hd.ToastMessageShow("Message was not sent", True)
    End If
End Sub

see this: https://www.b4x.com/android/forum/threads/mails-and-sms-messages.46131/#content
 
Upvote 0
If I'm not wrong the only difference with Android is that you can't send SMS silently. With the above code the user must confirm and click "send" in the message application.
 
Upvote 0
You are right - Apple Policy unfortunately.
 
Upvote 0
Back
Top