Skip to content

Commit bc554e5

Browse files
authored
Revert "update share sheet to accept more files (keybase#24076)" (keybase#24079)
This reverts commit 400d4b7.
1 parent c49b098 commit bc554e5

2 files changed

Lines changed: 22 additions & 74 deletions

File tree

‎shared/ios/KeybaseShare/Info.plist‎

Lines changed: 19 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -21,78 +21,25 @@
2121
<key>CFBundleVersion</key>
2222
<string>1</string>
2323
<key>NSExtension</key>
24-
<dict>
25-
<key>NSExtensionAttributes</key>
26-
<dict>
27-
<key>NSExtensionActivationRule</key>
28-
<string>SUBQUERY (
29-
extensionItems,
30-
$extensionItem,
31-
SUBQUERY (
32-
$extensionItem.attachments,
33-
$attachment,
34-
(
35-
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
36-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf"
37-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.postscript-font"
38-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.apple.application"
39-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.apple.bundle"
40-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.apple.package"
41-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.apple.resolvable"
42-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.compuserve.gif"
43-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.advanced-systems-format"
44-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.bmp"
45-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.3gpp"
46-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.3gpp2"
47-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.aifc-audio"
48-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.aiff-audio"
49-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.archive"
50-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.assembly-source"
51-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.audio"
52-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.audiovisual-content"
53-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.avi"
54-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.calendar-event"
55-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.camera-raw-image"
56-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.case-insensitive-text"
57-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.composite-content"
58-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.content"
59-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.cpio-archive"
60-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.csh-script"
61-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
62-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.fax"
63-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.font"
64-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg"
65-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg-2000"
66-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.mig-source"
67-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"
68-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.mpeg4"
69-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.object-code"
70-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.opentype-font"
71-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.perl-script"
72-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.php-script"
73-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text"
74-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.png"
75-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.presentation"
76-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.python-script"
77-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.ruby-script"
78-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.script"
79-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.shell-script"
80-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.source-code"
81-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.tar-archive"
82-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text"
83-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.truetype-collection-font"
84-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.truetype-font"
85-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.truetype-ttf-font"
86-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.ulaw-audio"
87-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url-name"
88-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.xbitmap-image"
89-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.xml"
90-
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url"
91-
)
92-
).@count >=1
93-
).@count >= 1
94-
</string>
95-
</dict>
24+
<dict>
25+
<key>NSExtensionAttributes</key>
26+
<dict>
27+
<key>NSExtensionActivationRule</key>
28+
<dict>
29+
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
30+
<integer>999</integer>
31+
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
32+
<integer>999</integer>
33+
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
34+
<integer>999</integer>
35+
<key>NSExtensionActivationSupportsText</key>
36+
<true/>
37+
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
38+
<integer>1</integer>
39+
<key>NSExtensionActivationSupportsWebPageWithMaxCount</key>
40+
<integer>1</integer>
41+
</dict>
42+
</dict>
9643
<key>NSExtensionMainStoryboard</key>
9744
<string>MainInterface</string>
9845
<key>NSExtensionPointIdentifier</key>

‎shared/ios/KeybaseShare/ShareViewController.m‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,9 @@ - (void)processItem:(NSItemProvider*)item {
340340
} else if ([item hasItemConformingToTypeIdentifier:@"public.url"]) {
341341
[item loadItemForTypeIdentifier:@"public.url" options:nil completionHandler:urlHandler];
342342
} else {
343-
// Example: pdf in Safari
344-
[item loadItemForTypeIdentifier:@"public.data" options:nil completionHandler: fileHandler];
343+
[[[PushNotifier alloc] init] localNotification:@"extension" msg:@"We failed to send your message. Please try from the Keybase app."
344+
badgeCount:-1 soundName:@"default" convID:@"" typ:@"chat.extension"];
345+
[self completeItemAndAppendManifestAndLogErrorWithText:@"unknown type" error:nil];
345346
}
346347
}
347348

0 commit comments

Comments
 (0)