From 712ec933796fbbe1b298362727ca5c6f19d97858 Mon Sep 17 00:00:00 2001 From: Oisin Prendiville Date: Fri, 3 Oct 2014 05:14:26 +0100 Subject: [PATCH 1/3] Unmericiful hacking of the Airdrop share item to turn it into a More option instead --- Overshare Kit/OSKAirDropActivity.m | 2 +- Overshare Kit/OSKAirDropViewController.m | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Overshare Kit/OSKAirDropActivity.m b/Overshare Kit/OSKAirDropActivity.m index 2410ef5..f492381 100644 --- a/Overshare Kit/OSKAirDropActivity.m +++ b/Overshare Kit/OSKAirDropActivity.m @@ -40,7 +40,7 @@ + (NSString *)activityType { } + (NSString *)activityName { - return @"AirDrop"; + return @"More"; } + (UIImage *)iconForIdiom:(UIUserInterfaceIdiom)idiom { diff --git a/Overshare Kit/OSKAirDropViewController.m b/Overshare Kit/OSKAirDropViewController.m index e8583d8..c0eabb8 100644 --- a/Overshare Kit/OSKAirDropViewController.m +++ b/Overshare Kit/OSKAirDropViewController.m @@ -23,17 +23,8 @@ - (instancetype)initWithAirDropItem:(OSKAirDropContentItem *)item { if (self) { [self setExcludedActivityTypes:@[UIActivityTypePostToFacebook, UIActivityTypePostToTwitter, - UIActivityTypePostToWeibo, UIActivityTypeMessage, - UIActivityTypeMail, - UIActivityTypePrint, - UIActivityTypeCopyToPasteboard, - UIActivityTypeAssignToContact, - UIActivityTypeSaveToCameraRoll, - UIActivityTypeAddToReadingList, - UIActivityTypePostToFlickr, - UIActivityTypePostToVimeo, - UIActivityTypePostToTencentWeibo]]; + UIActivityTypeMail]]; } return self; } From 1927929a45c59494d43d88ad07af3582d8d92773 Mon Sep 17 00:00:00 2001 From: Padraig Kennedy Date: Sat, 18 Oct 2014 18:53:43 -0700 Subject: [PATCH 2/3] Switch to using JTSHardwareInfo --- .gitmodules | 3 + Dependencies/JTSHardwareInfo | 1 + Overshare Kit/OSKAirDropActivity.m | 4 +- Overshare Kit/UIDevice+OSKHardware.h | 77 --------- Overshare Kit/UIDevice+OSKHardware.m | 159 ------------------ .../OvershareKit.xcodeproj/project.pbxproj | 20 ++- .../Overshare.xcodeproj/project.pbxproj | 17 +- 7 files changed, 35 insertions(+), 246 deletions(-) create mode 160000 Dependencies/JTSHardwareInfo delete mode 100755 Overshare Kit/UIDevice+OSKHardware.h delete mode 100755 Overshare Kit/UIDevice+OSKHardware.m diff --git a/.gitmodules b/.gitmodules index fc0b2bb..08df515 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ [submodule "ADNLogin-SDK-iOS"] path = Dependencies/ADNLogin-SDK url = https://github.com/appdotnet/ADNLogin-SDK-iOS.git +[submodule "Dependencies/JTSHardwareInfo"] + path = Dependencies/JTSHardwareInfo + url = https://github.com/jaredsinclair/JTSHardwareInfo.git diff --git a/Dependencies/JTSHardwareInfo b/Dependencies/JTSHardwareInfo new file mode 160000 index 0000000..e32dbd4 --- /dev/null +++ b/Dependencies/JTSHardwareInfo @@ -0,0 +1 @@ +Subproject commit e32dbd467d22c60e903fa72d44642272aa9e0621 diff --git a/Overshare Kit/OSKAirDropActivity.m b/Overshare Kit/OSKAirDropActivity.m index f492381..4d724f4 100644 --- a/Overshare Kit/OSKAirDropActivity.m +++ b/Overshare Kit/OSKAirDropActivity.m @@ -8,7 +8,7 @@ #import "OSKAirDropActivity.h" -#import "UIDevice+OSKHardware.h" +#import "JTSHardwareInfo.h" #import "OSKShareableContentItem.h" @interface OSKAirDropActivity () @@ -32,7 +32,7 @@ + (NSString *)supportedContentItemType { } + (BOOL)isAvailable { - return [[UIDevice currentDevice] osk_airDropIsAvailable]; + return [JTSHardwareInfo airDropIsAvailable]; } + (NSString *)activityType { diff --git a/Overshare Kit/UIDevice+OSKHardware.h b/Overshare Kit/UIDevice+OSKHardware.h deleted file mode 100755 index 58a51f7..0000000 --- a/Overshare Kit/UIDevice+OSKHardware.h +++ /dev/null @@ -1,77 +0,0 @@ -// -// UIDevice+OSKHardware -// Overshare -// -// Created by Jared Sinclair on 10/10/13. -// Copyright (c) 2013 Overshare Kit. All rights reserved. -// -// Based on code by InderKumarRathmore at https://github.com/InderKumarRathore/UIDevice-Hardware -// - -@import UIKit; - -#define IS_OSKHardwareType_iPad (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) -#define DEVICE_IOS_VERSION [[UIDevice currentDevice].systemVersion floatValue] - -#define DEVICE_HARDWARE_BETTER_THAN(i) [[UIDevice currentDevice] osk_isCurrentDeviceHardwareBetterThan:i] - -typedef NS_ENUM(NSInteger, OSKHardwareType) { - OSKHardwareType_NotAvailable, - - OSKHardwareType_iPhone_2G, - OSKHardwareType_iPhone_3G, - OSKHardwareType_iPhone_3GS, - OSKHardwareType_iPhone_4, - OSKHardwareType_iPhone_4_CDMA, - OSKHardwareType_iPhone_4S, - OSKHardwareType_iPhone_5, - OSKHardwareType_iPhone_5_CDMA_GSM, - OSKHardwareType_iPhone_5C, - OSKHardwareType_iPhone_5C_CDMA_GSM, - OSKHardwareType_iPhone_5S, - OSKHardwareType_iPhone_5S_CDMA_GSM, - OSKHardwareType_iPhone_6, - OSKHardwareType_iPhone_6Plus, - - OSKHardwareType_iPodTouch_1G, - OSKHardwareType_iPodTouch_2G, - OSKHardwareType_iPodTouch_3G, - OSKHardwareType_iPodTouch_4G, - OSKHardwareType_iPodTouch_5G, - - OSKHardwareType_iPad, - OSKHardwareType_iPad_2, - OSKHardwareType_iPad_2_WIFI, - OSKHardwareType_iPad_2_CDMA, - OSKHardwareType_iPad_3, - OSKHardwareType_iPad_3G, - OSKHardwareType_iPad_3_WIFI, - OSKHardwareType_iPad_3_WIFI_CDMA, - OSKHardwareType_iPad_4, - OSKHardwareType_iPad_4_WIFI, - OSKHardwareType_iPad_4_GSM_CDMA, - OSKHardwareType_iPad_Air_WIFI, - OSKHardwareType_iPad_Air_CELLULAR, - - OSKHardwareType_iPad_Mini, - OSKHardwareType_iPad_Mini_WIFI, - OSKHardwareType_iPad_Mini_WIFI_CDMA, - OSKHardwareType_iPad_Mini_2G_WIFI, - OSKHardwareType_iPad_Mini_2G_CELLULAR, - - OSKHardwareType_Simulator -}; - - -@interface UIDevice (OSKHardware) - -- (NSString *)osk_hardwareDisplayName; - -- (OSKHardwareType)osk_hardwareType; - -- (BOOL)osk_airDropIsAvailable; - -@end - - - diff --git a/Overshare Kit/UIDevice+OSKHardware.m b/Overshare Kit/UIDevice+OSKHardware.m deleted file mode 100755 index d327421..0000000 --- a/Overshare Kit/UIDevice+OSKHardware.m +++ /dev/null @@ -1,159 +0,0 @@ -// -// UIDevice+OSKHardware -// Overshare -// -// Created by Jared Sinclair on 10/10/13. -// Copyright (c) 2013 Overshare Kit. All rights reserved. -// -// Based on code by InderKumarRathmore at https://github.com/InderKumarRathore/UIDevice-Hardware -// - -#import "UIDevice+OSKHardware.h" -#include -#include - -@implementation UIDevice (OSKHardware) - -- (NSString*)osk_hardwareString { - static dispatch_once_t once; - static NSString * hardware; - dispatch_once(&once, ^ { - size_t size = 100; - char *hw_machine = malloc(size); - int name[] = {CTL_HW,HW_MACHINE}; - sysctl(name, 2, hw_machine, &size, NULL, 0); - hardware = [NSString stringWithUTF8String:hw_machine]; - free(hw_machine); - }); - return hardware; -} - -- (OSKHardwareType)osk_hardwareType { - NSString *hardware = [self osk_hardwareString]; - - if ([hardware isEqualToString:@"iPhone1,1"]) return OSKHardwareType_iPhone_2G; - if ([hardware isEqualToString:@"iPhone1,2"]) return OSKHardwareType_iPhone_3G; - if ([hardware isEqualToString:@"iPhone2,1"]) return OSKHardwareType_iPhone_3GS; - if ([hardware isEqualToString:@"iPhone3,1"]) return OSKHardwareType_iPhone_4; - if ([hardware isEqualToString:@"iPhone3,2"]) return OSKHardwareType_iPhone_4; - if ([hardware isEqualToString:@"iPhone3,3"]) return OSKHardwareType_iPhone_4_CDMA; - if ([hardware isEqualToString:@"iPhone4,1"]) return OSKHardwareType_iPhone_4S; - if ([hardware isEqualToString:@"iPhone5,1"]) return OSKHardwareType_iPhone_5; - if ([hardware isEqualToString:@"iPhone5,2"]) return OSKHardwareType_iPhone_5_CDMA_GSM; - if ([hardware isEqualToString:@"iPhone5,3"]) return OSKHardwareType_iPhone_5C; - if ([hardware isEqualToString:@"iPhone5,4"]) return OSKHardwareType_iPhone_5C_CDMA_GSM; - if ([hardware isEqualToString:@"iPhone6,1"]) return OSKHardwareType_iPhone_5S; - if ([hardware isEqualToString:@"iPhone6,2"]) return OSKHardwareType_iPhone_5S_CDMA_GSM; - if ([hardware isEqualToString:@"iPhone7,1"]) return OSKHardwareType_iPhone_6Plus; - if ([hardware isEqualToString:@"iPhone7,2"]) return OSKHardwareType_iPhone_6; - - if ([hardware isEqualToString:@"iPod1,1"]) return OSKHardwareType_iPodTouch_1G; - if ([hardware isEqualToString:@"iPod2,1"]) return OSKHardwareType_iPodTouch_2G; - if ([hardware isEqualToString:@"iPod3,1"]) return OSKHardwareType_iPodTouch_3G; - if ([hardware isEqualToString:@"iPod4,1"]) return OSKHardwareType_iPodTouch_4G; - if ([hardware isEqualToString:@"iPod5,1"]) return OSKHardwareType_iPodTouch_5G; - - if ([hardware isEqualToString:@"iPad1,1"]) return OSKHardwareType_iPad; - if ([hardware isEqualToString:@"iPad1,2"]) return OSKHardwareType_iPad_3G; - if ([hardware isEqualToString:@"iPad2,1"]) return OSKHardwareType_iPad_2_WIFI; - if ([hardware isEqualToString:@"iPad2,2"]) return OSKHardwareType_iPad_2; - if ([hardware isEqualToString:@"iPad2,3"]) return OSKHardwareType_iPad_2_CDMA; - if ([hardware isEqualToString:@"iPad2,4"]) return OSKHardwareType_iPad_2; - if ([hardware isEqualToString:@"iPad2,5"]) return OSKHardwareType_iPad_Mini_WIFI; - if ([hardware isEqualToString:@"iPad2,6"]) return OSKHardwareType_iPad_Mini; - if ([hardware isEqualToString:@"iPad2,7"]) return OSKHardwareType_iPad_Mini_WIFI_CDMA; - if ([hardware isEqualToString:@"iPad3,1"]) return OSKHardwareType_iPad_3_WIFI; - if ([hardware isEqualToString:@"iPad3,2"]) return OSKHardwareType_iPad_3_WIFI_CDMA; - if ([hardware isEqualToString:@"iPad3,3"]) return OSKHardwareType_iPad_3; - if ([hardware isEqualToString:@"iPad3,4"]) return OSKHardwareType_iPad_4_WIFI; - if ([hardware isEqualToString:@"iPad3,5"]) return OSKHardwareType_iPad_4; - if ([hardware isEqualToString:@"iPad3,6"]) return OSKHardwareType_iPad_4_GSM_CDMA; - if ([hardware isEqualToString:@"iPad4,1"]) return OSKHardwareType_iPad_Air_WIFI; - if ([hardware isEqualToString:@"iPad4,2"]) return OSKHardwareType_iPad_Air_CELLULAR; - if ([hardware isEqualToString:@"iPad4,4"]) return OSKHardwareType_iPad_Mini_2G_WIFI; - if ([hardware isEqualToString:@"iPad4,5"]) return OSKHardwareType_iPad_Mini_2G_CELLULAR; - - if ([hardware isEqualToString:@"i386"]) return OSKHardwareType_Simulator; - if ([hardware isEqualToString:@"x86_64"]) return OSKHardwareType_Simulator; - - return OSKHardwareType_NotAvailable; -} - -- (BOOL)osk_airDropIsAvailable { - static dispatch_once_t once; - static BOOL isAvailable; - dispatch_once(&once, ^ { - OSKHardwareType hardwareType = [self osk_hardwareType]; - if (hardwareType==OSKHardwareType_NotAvailable) { - isAvailable = YES; - } else { - NSString *hardwareString = [self osk_hardwareString]; - if ([hardwareString hasPrefix:@"iPhone"]) { - isAvailable = (hardwareType >= OSKHardwareType_iPhone_5); - } - else if ([hardwareString hasPrefix:@"iPad"]) { - isAvailable = (hardwareType >= OSKHardwareType_iPad_4_WIFI); - } - else if ([hardwareString hasPrefix:@"iPod"]) { - isAvailable = (hardwareType >= OSKHardwareType_iPodTouch_5G); - } - } - }); - return isAvailable; -} - -- (NSString *)osk_hardwareDisplayName { - - NSString *hardware = [self osk_hardwareString]; - - if ([hardware isEqualToString:@"iPhone1,1"]) return @"iPhone"; - if ([hardware isEqualToString:@"iPhone1,2"]) return @"iPhone 3G"; - if ([hardware isEqualToString:@"iPhone2,1"]) return @"iPhone 3GS"; - if ([hardware isEqualToString:@"iPhone3,1"]) return @"iPhone 4"; - if ([hardware isEqualToString:@"iPhone3,2"]) return @"iPhone 4"; - if ([hardware isEqualToString:@"iPhone3,3"]) return @"iPhone 4 CDMA"; - if ([hardware isEqualToString:@"iPhone4,1"]) return @"iPhone 4S"; - if ([hardware isEqualToString:@"iPhone5,1"]) return @"iPhone 5"; - if ([hardware isEqualToString:@"iPhone5,2"]) return @"iPhone 5 CDMA GSM"; - if ([hardware isEqualToString:@"iPhone5,3"]) return @"iPhone 5C"; - if ([hardware isEqualToString:@"iPhone5,4"]) return @"iPhone 5C CDMA GSM"; - if ([hardware isEqualToString:@"iPhone6,1"]) return @"iPhone 5S"; - if ([hardware isEqualToString:@"iPhone6,2"]) return @"iPhone 5S CDMA GSM"; - if ([hardware isEqualToString:@"iPhone7,1"]) return @"iPhone 6 Plus"; - if ([hardware isEqualToString:@"iPhone7,2"]) return @"iPhone 6"; - - if ([hardware isEqualToString:@"iPod1,1"]) return @"iPodTouch 1G"; - if ([hardware isEqualToString:@"iPod2,1"]) return @"iPodTouch 2G"; - if ([hardware isEqualToString:@"iPod3,1"]) return @"iPodTouch 3G"; - if ([hardware isEqualToString:@"iPod4,1"]) return @"iPodTouch 4G"; - if ([hardware isEqualToString:@"iPod5,1"]) return @"iPodTouch 5G"; - - if ([hardware isEqualToString:@"iPad1,1"]) return @"iPad"; - if ([hardware isEqualToString:@"iPad1,2"]) return @"iPad 3G"; - if ([hardware isEqualToString:@"iPad2,1"]) return @"iPad 2 WIFI"; - if ([hardware isEqualToString:@"iPad2,2"]) return @"iPad 2"; - if ([hardware isEqualToString:@"iPad2,3"]) return @"iPad 2 CDMA"; - if ([hardware isEqualToString:@"iPad2,4"]) return @"iPad 2"; - if ([hardware isEqualToString:@"iPad2,5"]) return @"iPad Mini WIFI"; - if ([hardware isEqualToString:@"iPad2,6"]) return @"iPad Mini"; - if ([hardware isEqualToString:@"iPad2,7"]) return @"iPad Mini WIFI CDMA"; - if ([hardware isEqualToString:@"iPad3,1"]) return @"iPad 3 WIFI"; - if ([hardware isEqualToString:@"iPad3,2"]) return @"iPad 3 WIFI CDMA"; - if ([hardware isEqualToString:@"iPad3,3"]) return @"iPad 3"; - if ([hardware isEqualToString:@"iPad3,4"]) return @"iPad 4 WIFI"; - if ([hardware isEqualToString:@"iPad3,5"]) return @"iPad 4"; - if ([hardware isEqualToString:@"iPad3,6"]) return @"iPad 4 GSM CDMA"; - if ([hardware isEqualToString:@"iPad4,1"]) return @"iPad Air WIFI"; - if ([hardware isEqualToString:@"iPad4,2"]) return @"iPad Air CELLULAR"; - if ([hardware isEqualToString:@"iPad4,4"]) return @"iPad Mini 2G WIFI"; - if ([hardware isEqualToString:@"iPad4,5"]) return @"iPad Mini 2G CELLULAR"; - - if ([hardware isEqualToString:@"i386"]) return @"Simulator"; - if ([hardware isEqualToString:@"x86_64"]) return @"Simulator"; - - return @""; -} - -@end - - diff --git a/Projects/Static Library/OvershareKit/OvershareKit.xcodeproj/project.pbxproj b/Projects/Static Library/OvershareKit/OvershareKit.xcodeproj/project.pbxproj index 13dc241..5a6a5ef 100644 --- a/Projects/Static Library/OvershareKit/OvershareKit.xcodeproj/project.pbxproj +++ b/Projects/Static Library/OvershareKit/OvershareKit.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1A0223BD19F3503C00D68B4A /* JTSHardwareInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0223BC19F3503C00D68B4A /* JTSHardwareInfo.m */; }; 2EA7594318E5831E00078A1D /* OSKSaveToCameraRollActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EA7594218E5831E00078A1D /* OSKSaveToCameraRollActivity.m */; }; 32C2B9B7190337BC0055C98B /* OSKMimeAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C2B9B6190337BC0055C98B /* OSKMimeAttachment.m */; }; 7F04946C188AFE5400BE7C4E /* NSString+OSKEmoji.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F04946B188AFE5400BE7C4E /* NSString+OSKEmoji.m */; }; @@ -107,7 +108,6 @@ 7FEE78F6181ED8FE000F684A /* OSKUsernamePasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE78A3181ED8FE000F684A /* OSKUsernamePasswordViewController.m */; }; 7FEE78F7181ED8FE000F684A /* OSKWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE78A5181ED8FE000F684A /* OSKWebViewController.m */; }; 7FEE78F8181ED8FE000F684A /* UIColor+OSKUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE78A8181ED8FE000F684A /* UIColor+OSKUtility.m */; }; - 7FEE78F9181ED8FE000F684A /* UIDevice+OSKHardware.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE78AA181ED8FE000F684A /* UIDevice+OSKHardware.m */; }; 7FEE78FA181ED8FE000F684A /* UIView+OSKUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE78AC181ED8FE000F684A /* UIView+OSKUtilities.m */; }; 7FEE78FB181ED8FE000F684A /* UIViewController+OSKUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE78AE181ED8FE000F684A /* UIViewController+OSKUtilities.m */; }; 8895C32918A3B890000B7F28 /* GoogleOpenSource.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8895C32618A3B890000B7F28 /* GoogleOpenSource.framework */; }; @@ -144,6 +144,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 1A0223BB19F3503C00D68B4A /* JTSHardwareInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JTSHardwareInfo.h; path = ../../../Dependencies/JTSHardwareInfo/Source/JTSHardwareInfo.h; sourceTree = ""; }; + 1A0223BC19F3503C00D68B4A /* JTSHardwareInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JTSHardwareInfo.m; path = ../../../Dependencies/JTSHardwareInfo/Source/JTSHardwareInfo.m; sourceTree = ""; }; 2EA7594118E5831E00078A1D /* OSKSaveToCameraRollActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSKSaveToCameraRollActivity.h; sourceTree = ""; }; 2EA7594218E5831E00078A1D /* OSKSaveToCameraRollActivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSKSaveToCameraRollActivity.m; sourceTree = ""; }; 32C2B9B5190337BC0055C98B /* OSKMimeAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSKMimeAttachment.h; sourceTree = ""; }; @@ -475,8 +477,6 @@ 7FEE78A6181ED8FE000F684A /* OvershareKit-iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OvershareKit-iOS.h"; sourceTree = ""; }; 7FEE78A7181ED8FE000F684A /* UIColor+OSKUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+OSKUtility.h"; sourceTree = ""; }; 7FEE78A8181ED8FE000F684A /* UIColor+OSKUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+OSKUtility.m"; sourceTree = ""; }; - 7FEE78A9181ED8FE000F684A /* UIDevice+OSKHardware.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIDevice+OSKHardware.h"; sourceTree = ""; }; - 7FEE78AA181ED8FE000F684A /* UIDevice+OSKHardware.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIDevice+OSKHardware.m"; sourceTree = ""; }; 7FEE78AB181ED8FE000F684A /* UIView+OSKUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+OSKUtilities.h"; sourceTree = ""; }; 7FEE78AC181ED8FE000F684A /* UIView+OSKUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+OSKUtilities.m"; sourceTree = ""; }; 7FEE78AD181ED8FE000F684A /* UIViewController+OSKUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+OSKUtilities.h"; sourceTree = ""; }; @@ -526,10 +526,20 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1A0223BA19F3501500D68B4A /* JTSHardwareInfo */ = { + isa = PBXGroup; + children = ( + 1A0223BB19F3503C00D68B4A /* JTSHardwareInfo.h */, + 1A0223BC19F3503C00D68B4A /* JTSHardwareInfo.m */, + ); + name = JTSHardwareInfo; + sourceTree = ""; + }; 7F6711F8181EDF870006E037 /* Third-Party Dependencies */ = { isa = PBXGroup; children = ( 7F6711F9181EDF900006E037 /* ADNLogin */, + 1A0223BA19F3501500D68B4A /* JTSHardwareInfo */, 7F6711FA181EDF960006E037 /* Pocket */, ); name = "Third-Party Dependencies"; @@ -816,8 +826,6 @@ 7FEE78A6181ED8FE000F684A /* OvershareKit-iOS.h */, 7FEE78A7181ED8FE000F684A /* UIColor+OSKUtility.h */, 7FEE78A8181ED8FE000F684A /* UIColor+OSKUtility.m */, - 7FEE78A9181ED8FE000F684A /* UIDevice+OSKHardware.h */, - 7FEE78AA181ED8FE000F684A /* UIDevice+OSKHardware.m */, 7FEE78AB181ED8FE000F684A /* UIView+OSKUtilities.h */, 7FEE78AC181ED8FE000F684A /* UIView+OSKUtilities.m */, 7FEE78AD181ED8FE000F684A /* UIViewController+OSKUtilities.h */, @@ -1044,7 +1052,7 @@ 2EA7594318E5831E00078A1D /* OSKSaveToCameraRollActivity.m in Sources */, 7FEE78D9181ED8FE000F684A /* OSKMailComposeViewController.m in Sources */, 7F55A30C18425C6C004A3BCC /* OSKSession.m in Sources */, - 7FEE78F9181ED8FE000F684A /* UIDevice+OSKHardware.m in Sources */, + 1A0223BD19F3503C00D68B4A /* JTSHardwareInfo.m in Sources */, 7FEE78EE181ED8FE000F684A /* OSKSystemAccountStore.m in Sources */, 7FEE78C9181ED8FE000F684A /* OSKAppDotNetAuthenticationViewController.m in Sources */, 7FEE78C3181ED8FE000F684A /* OSKActivitySheetViewController.m in Sources */, diff --git a/Projects/iOS App/Overshare/Overshare.xcodeproj/project.pbxproj b/Projects/iOS App/Overshare/Overshare.xcodeproj/project.pbxproj index 9323c95..96fa3b7 100644 --- a/Projects/iOS App/Overshare/Overshare.xcodeproj/project.pbxproj +++ b/Projects/iOS App/Overshare/Overshare.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1A0223C119F3506D00D68B4A /* JTSHardwareInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0223BF19F3506D00D68B4A /* JTSHardwareInfo.m */; }; 32C2B9BA19033F350055C98B /* OSKMimeAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C2B9B919033F350055C98B /* OSKMimeAttachment.m */; }; 7F03EA2D18F5B8D000A4CEE4 /* OSKSaveToCameraRollActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F03EA2C18F5B8D000A4CEE4 /* OSKSaveToCameraRollActivity.m */; }; 7F049469188AFE4600BE7C4E /* NSString+OSKEmoji.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F049468188AFE4600BE7C4E /* NSString+OSKEmoji.m */; }; @@ -243,7 +244,6 @@ 7FEE77D6181ED8EF000F684A /* OSKUsernamePasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE775A181ED8EF000F684A /* OSKUsernamePasswordViewController.m */; }; 7FEE77D7181ED8EF000F684A /* OSKWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE775C181ED8EF000F684A /* OSKWebViewController.m */; }; 7FEE77D8181ED8EF000F684A /* UIColor+OSKUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE775F181ED8EF000F684A /* UIColor+OSKUtility.m */; }; - 7FEE77D9181ED8EF000F684A /* UIDevice+OSKHardware.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE7761181ED8EF000F684A /* UIDevice+OSKHardware.m */; }; 7FEE77DA181ED8EF000F684A /* UIView+OSKUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE7763181ED8EF000F684A /* UIView+OSKUtilities.m */; }; 7FEE77DB181ED8EF000F684A /* UIViewController+OSKUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEE7765181ED8EF000F684A /* UIViewController+OSKUtilities.m */; }; 8895C32E18A3B967000B7F28 /* GoogleOpenSource.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8895C32B18A3B967000B7F28 /* GoogleOpenSource.framework */; }; @@ -268,6 +268,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 1A0223BE19F3506D00D68B4A /* JTSHardwareInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JTSHardwareInfo.h; path = ../../../Dependencies/JTSHardwareInfo/Source/JTSHardwareInfo.h; sourceTree = ""; }; + 1A0223BF19F3506D00D68B4A /* JTSHardwareInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JTSHardwareInfo.m; path = ../../../Dependencies/JTSHardwareInfo/Source/JTSHardwareInfo.m; sourceTree = ""; }; 32C2B9B819033F350055C98B /* OSKMimeAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSKMimeAttachment.h; sourceTree = ""; }; 32C2B9B919033F350055C98B /* OSKMimeAttachment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OSKMimeAttachment.m; sourceTree = ""; }; 7F03EA2B18F5B8D000A4CEE4 /* OSKSaveToCameraRollActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSKSaveToCameraRollActivity.h; sourceTree = ""; }; @@ -689,6 +691,16 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1A0223C019F3506D00D68B4A /* JTSHardwareInfo */ = { + isa = PBXGroup; + children = ( + 1A0223BE19F3506D00D68B4A /* JTSHardwareInfo.h */, + 1A0223BF19F3506D00D68B4A /* JTSHardwareInfo.m */, + ); + name = JTSHardwareInfo; + path = "../../Static Library/OvershareKit"; + sourceTree = ""; + }; 7F03EA2A18F5B8BD00A4CEE4 /* Save to Camera Roll */ = { isa = PBXGroup; children = ( @@ -1474,6 +1486,7 @@ isa = PBXGroup; children = ( 7FEE7924181EDC88000F684A /* ADNLogin */, + 1A0223C019F3506D00D68B4A /* JTSHardwareInfo */, 7FEE7923181EDC84000F684A /* Pocket */, ); name = "Third-Party Dependencies"; @@ -1758,6 +1771,7 @@ 7FEE77CD181ED8EF000F684A /* OSKSMSActivity.m in Sources */, 7FEE779E181ED8EF000F684A /* OSKActivityIcon.m in Sources */, 7FEE7797181ED8EF000F684A /* OSKActionSheet.m in Sources */, + 1A0223C119F3506D00D68B4A /* JTSHardwareInfo.m in Sources */, 7F78E9AC1820E5630042CF02 /* OSKPocketAccountViewController.m in Sources */, 7FEE77AE181ED8EF000F684A /* OSKEmailActivity.m in Sources */, 7F14C95918DB5DBC00E635FE /* OSKTextViewAttachmentView.m in Sources */, @@ -1782,7 +1796,6 @@ 7FA91AF41889F56F00A5DF9B /* OSKReadingListActivity.m in Sources */, 7FEE77B0181ED8EF000F684A /* OSKFileManager.m in Sources */, 7FEE77C4181ED8EF000F684A /* OSKPinboardUtility.m in Sources */, - 7FEE77D9181ED8EF000F684A /* UIDevice+OSKHardware.m in Sources */, 7FEE77CE181ED8EF000F684A /* OSKSystemAccountStore.m in Sources */, 7FDCDEA2181EFF5500AC2985 /* SampleAppPurchasingViewController.m in Sources */, 7F43DEAD18215916003BE9B6 /* SampleTimelineViewController.m in Sources */, From 4cc81500e70003be289e7be114071147a9efb022 Mon Sep 17 00:00:00 2001 From: Padraig Kennedy Date: Sat, 18 Oct 2014 18:55:18 -0700 Subject: [PATCH 3/3] Revert "Unmericiful hacking of the Airdrop share item to turn it into a More option instead" This reverts commit 712ec933796fbbe1b298362727ca5c6f19d97858. --- Overshare Kit/OSKAirDropActivity.m | 2 +- Overshare Kit/OSKAirDropViewController.m | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Overshare Kit/OSKAirDropActivity.m b/Overshare Kit/OSKAirDropActivity.m index 4d724f4..60eac4e 100644 --- a/Overshare Kit/OSKAirDropActivity.m +++ b/Overshare Kit/OSKAirDropActivity.m @@ -40,7 +40,7 @@ + (NSString *)activityType { } + (NSString *)activityName { - return @"More"; + return @"AirDrop"; } + (UIImage *)iconForIdiom:(UIUserInterfaceIdiom)idiom { diff --git a/Overshare Kit/OSKAirDropViewController.m b/Overshare Kit/OSKAirDropViewController.m index c0eabb8..e8583d8 100644 --- a/Overshare Kit/OSKAirDropViewController.m +++ b/Overshare Kit/OSKAirDropViewController.m @@ -23,8 +23,17 @@ - (instancetype)initWithAirDropItem:(OSKAirDropContentItem *)item { if (self) { [self setExcludedActivityTypes:@[UIActivityTypePostToFacebook, UIActivityTypePostToTwitter, + UIActivityTypePostToWeibo, UIActivityTypeMessage, - UIActivityTypeMail]]; + UIActivityTypeMail, + UIActivityTypePrint, + UIActivityTypeCopyToPasteboard, + UIActivityTypeAssignToContact, + UIActivityTypeSaveToCameraRoll, + UIActivityTypeAddToReadingList, + UIActivityTypePostToFlickr, + UIActivityTypePostToVimeo, + UIActivityTypePostToTencentWeibo]]; } return self; }