title: sending SMS in iOS7 - problems after upgrade from iOS6
body: <p>I am sending SMS programmatically like this for a long time now. It worked without any problems in iOS6.</p>
  
  <p>But now after update to iOS7 some users have probelms with the app. They need to deinstall the app - reboot the iPhone - reinstall it and then it works.Just reinstalling it without rebooting the phone does not work either.</p>
  
  <p><strong>What could be the reason for this really annoying problem?</strong></p>
  
  <p>Furthermore there are a few cases where they can send several SMS after this procedure but then the iPhone SMS-Dialog appears very slowly and no SMS is being sent again, until they restart the iPhone. Just stopping and restarting the app does not help.</p>
  
  <p>Here's the normal SMS code:</p>
  
  <pre><code>MFMessageComposeViewController *messageVC = [[MFMessageComposeViewController alloc] init];
  [messageVC setMessageComposeDelegate:self];
  if ([MFMessageComposeViewController canSendText]) {
  
      NSString *smsString = [NSString stringWithFormat:@"bla bla bla"];
      messageVC.body = smsString;
      messageVC.recipients = @[userPhone];
      messageVC.messageComposeDelegate = self;
  [self presentViewController:messageVC animated:YES completion:nil];
  }
  </code></pre>
  
  <p>I even released a new Version of the app with the newest Xcode 5.0 with Deployment Target 5.1, since I need to support iOS5.1 users still.</p>