EddyVerbruggen / SocialSharing-PhoneGap-Plugin

👨‍❤️‍💋‍👨 Cordova plugin to share text, a file (image/PDF/..), or a URL (or all three) via the native sharing widget
MIT License
1.78k stars 910 forks source link

Build broken? #594

Open cdelgadob opened 8 years ago

cdelgadob commented 8 years ago

When trying to include it to my project, I get an erro that didn't happen before. Any help would be really appreciated. Thanks Carlos

/Users/administrator/app-builder/STAGING/client/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m:124:112: error: expected ')'
      [activityVC setCompletionWithItemsHandler:^(NSString *activityType, BOOL completed, NSArray * __nullable returnedItems, NSError * __nullable activityError) {
                                                                                                               ^
/Users/administrator/app-builder/STAGING/client/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m:124:50: note: to match this '('
      [activityVC setCompletionWithItemsHandler:^(NSString *activityType, BOOL completed, NSArray * __nullable returnedItems, NSError * __nullable activityError) {
                                                 ^
/Users/administrator/app-builder/STAGING/client/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m:124:49: error: incompatible block pointer types sending 'void (^)(NSString *__strong, BOOL, NSArray *__strong)' to parameter of type 'UIActivityViewControllerCompletionWithItemsHandler' (aka 'void (^)(NSString *__strong, BOOL, NSArray *__strong, NSError *__strong)')
      [activityVC setCompletionWithItemsHandler:^(NSString *activityType, BOOL completed, NSArray * __nullable returnedItems, NSError * __nullable activityError) {
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/administrator/app-builder/STAGING/client/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m:1:
In file included from /Users/administrator/app-builder/STAGING/client/AppGyver/AppGyver-Prefix.pch:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:14:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIActivityViewController.h:20:78: note: passing argument to parameter 'completionWithItemsHandler' here
@property(nonatomic,copy) UIActivityViewControllerCompletionWithItemsHandler completionWithItemsHandler NS_AVAILABLE_IOS(8_0); // set to nil after call
                                                                             ^
2 errors generated.
EddyVerbruggen commented 8 years ago

Can you build with a newer SDK? This seems to use iOS 8.1 SDK.