4

I am using code to send SMS in iOS application from the link: Twilio SMS sending in IOS

But i am getting below error while sending the SMS.

  • The 'To' number +91********** is not a valid phone number(Code 21211)

I have checked that the number i am using is properly defined as +(Country Code)(Phone No). The same problem is also present on Twilio Forums:

http://forum.twilio.com/twilio/topics/problem_with_number_format_in_ios

Can you help me in this problem?

Thanks -

Community
  • 1
  • 1
Rachit
  • 1,159
  • 3
  • 13
  • 23
  • This sounds like a bug in the Twilio SDK. The Twilio forums are probably the best place to get this addressed. – Jeff Aug 20 '13 at 14:44
  • Twilio evangelist here. Just wanted to say that we don't have a REST API helper library for iOS, only the Twilio Client VoIP library. We actually encourage people not to send Twilio text messages directly from an iOS app since you would have to include your Twilio credentials in the app, which is not very secure since the app can be decompiled. – Devin Rader Aug 21 '13 at 00:25
  • 1
    @ Devin : You answer works for me. Thanks for sharing your concern about sending sms through Mobile Device. Let me discuss this with my team and then accordingly we will take the decision. – Rachit Aug 21 '13 at 10:44

1 Answers1

4

Twilio evangelist here.

Try replacing the + character with its encoded equivalent %2B

Hope that helps.

Devin

Devin Rader
  • 10,260
  • 1
  • 20
  • 32