3

I need to send the SMS on button click automatically without navigating message composer in iOS Please anyone help me. My scenario is

1.I want to send the verification code to user While registering.

I import and used CTMessageCenter.h file but It gives error like NSObject.h file is not found.please help me to solve this problem .I stuck from so many days.

Anupama
  • 373
  • 2
  • 3
  • 17
  • 1
    in ios no way to send messsage without composer , you can send message to your own server and then send message from your server. – sabeer Feb 21 '14 at 06:35
  • http://stackoverflow.com/a/13063499/1405008 try this – CoolMonster Feb 21 '14 at 06:37
  • @sabeer pls give me the procedure to your solution – Anupama Feb 21 '14 at 06:38
  • @Anupama just send your message to your own server and then your server will send a message to device ex: may use any web api .net or php and then send your message to server – sabeer Feb 21 '14 at 06:41
  • @CoolMonster thank you for solution but i am not looking for this – Anupama Feb 21 '14 at 07:14
  • 1
    Yes, like sabeer said u can send a request or notification to your server and and make ur server send messages... Apple doesn't allow us to send messages with just one click because one can send any number of messages without users knowledge. This is one reason apple has restricted that. – bachman Feb 21 '14 at 08:08

2 Answers2

1

Only one solution is that We used the API Service to send the SMS Like other App.If we used the private frameworks the App is definitely rejected from App store

Anupama
  • 373
  • 2
  • 3
  • 17
0

Take iOS 7 runtime headers from https://github.com/nst/iOS-Runtime-Headers . They look a little bit different from yours, i.e. there is no import of NSObject.h in CTMessageCenter.h and there is no file CDStructure.h. These runtime headers are generated by RuntimeBrowser instead of Class-dump.

In my case, the compiler errors went away.

EDIT: But it seems there is an other problem with sendSMSWithText:serviceCenter:toAddress: from CTMessageCenter under iOS 7, see Sending SMS using CTMessageCenter (iOS 7) .

Community
  • 1
  • 1
AppsolutEinfach
  • 1,421
  • 1
  • 14
  • 25