Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completionHandler deprecated #68

Closed
ZevEisenberg opened this issue Aug 31, 2015 · 1 comment
Closed

completionHandler deprecated #68

ZevEisenberg opened this issue Aug 31, 2015 · 1 comment
Assignees

Comments

@ZevEisenberg
Copy link
Contributor

In NYTPhotosViewController.m, this line:

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

throws this warning:

'completionHandler' is deprecated: first deprecated in iOS 8.0 - Use completionWithItemsHandler instead.

Because of this, from UIActivityViewController.h:

@property(nonatomic,copy) UIActivityViewControllerCompletionHandler completionHandler NS_DEPRECATED_IOS(6_0, 8_0, "Use completionWithItemsHandler instead.");  // set to nil after call
@property(nonatomic,copy) UIActivityViewControllerCompletionWithItemsHandler completionWithItemsHandler NS_AVAILABLE_IOS(8_0); // set to nil after call
@ThibaultVlacich
Copy link

Just modify

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

by

activityViewController.completionWithItemsHandler = ^(NSString *activityType, BOOL completed, NSArray *returnedItems, NSError *activityError) {

(if you target only iOS 8+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants