MFMessageComposeViewController and iMessage

2019-07-04 03:50发布

问题:

I'm building an app that has a button. If you touch that button, an MFMessageComposeViewController will show, with the body filled in and one recipient. This recipient is '4343', a shortcode for texting in Belgium.

The wrong thing here is that the MFMessageComposeViewController will setup everything as an iMessage: the 'send' button is blue and the recipient is formatted as '(434) 3' and is also colored in blue.

Shortly, this means that iOS chooses for iMessage, but i want to override that. Does anyone know how I can override this behavior and make it send real text messages (SMS).

What I can see is that if the text is sent, it appears as a normal text in my Messages app. But this is still confusing...

回答1:

From just looking at the MFMessageComposeViewController class reference, there’s no public way to do this.

If you type 4343 into the regular Messages app, does it also highlight it in blue? (I realise this question is months old…)



回答2:

I think the problem is that the MFMessageComposeViewController only displays a blue 'send' button in any case. So as a user you can't see whether it's sending an iMessage, an SMS (because of the receiver not being registered to iMessage) or even a MMS (when sending text to a Mail-address or sending something like a contact from Contacts.app or a photo or something else which is not text-only).



标签: ios5 sms