0

I get this error : 'completionHandler' is deprecated: first deprecated in iOS 8.0 - Use completionWithItemsHandler instead.

Here is the code I used -

  avc.completionHandler = ^(NSString *activityType, BOOL completed){
        if (completed) {

for some reason I get it in Cardcell.m. It makes my build fail.

Here is the full code incase you would like a look at it.

Paulw11
  • 108,386
  • 14
  • 159
  • 186
  • 1
    see this https://stackoverflow.com/questions/22083922/uiactivityviewcontroller-completion-handler-still-calls-action-if-user-presses-c – Anbu.Karthik Jul 08 '17 at 12:54
  • @Anbu.Karthik so do i use "activityViewController.completionHandler = {(activityType, completed:Bool) in if !completed { //cancelled return }" or ? I see they listed the error too "completionHandler is deprecated in iOS 8. For iOS 8, use completionWithItemsHandler. " – Jack Swagger Jul 08 '17 at 12:56
  • 1
    Refer to the [documentation](https://developer.apple.com/documentation/uikit/uiactivityviewcontroller) the `completionHandler` property is deprecated in favour of `completionWithItemsHandler` so you need to adapt the code. – Paulw11 Jul 08 '17 at 12:57

0 Answers0