title: UIActivityViewController show showing ios objective c
body: <p>I'm trying to present an activity view controller. but I don't know why is this error occurs again and again. Same code I have used for my other app and its working fine over there. However, in my current app its starts crashing.</p>
  
  <pre><code>NSString *url=@"http://itunes.apple.com/us/app/APPNAME/idXXXXXXXXX";
  NSString * title =[NSString stringWithFormat:@"Download App %@ and get free reward points!",url];
  NSArray* dataToShare = @[title];
  UIActivityViewController* activityViewController =[[UIActivityViewController alloc] initWithActivityItems:dataToShare applicationActivities:nil];
  activityViewController.excludedActivityTypes = @[UIActivityTypeAirDrop];
  if (activityViewController == nil){
     return;
  }
  [self presentViewController:activityViewController animated:YES completion:^{}];
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/w8gM7.png" alt="enter image description here"></p>