r/jailbreakdevelopers • • Mar 15 '19

Sending SMS Programatically iOS 12

Hello there, I'm trying to send SMS/iMessages programaticaly on iOS. I found two ways of doing it:

1. Use CTMessageCenter:

[[%c(CTMessageCenter) sharedMessageCenter] sendSMSWithText:@"Test SMS" serviceCenter:nil toAddress:@"1234567890"]

This works but does not handle iMessage and does not save the sms on the stock Messages app.

2. Use ChatKit: Example here

However this does not send anything because

CKConversationList* conversationList = [[%c(CKConversationList) sharedConversationList] hasActiveConversations];

is always false. Meaning I can not get any CKConversation to send a message to.

Is ChatKit still working on iOS 12? If yes, what am I doing wrong ? And how to send SMS/iMessages according to what is available?

Thanks

30 Upvotes

1 comment sorted by

1

u/Str8AWay Mar 16 '19

I would also like to know this