/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
osx/Extensions/Share/ShareViewController.m
31 строка
765 B
Gabriel Handford
New OSX build.
04 авг 2015, 21:29
04 авг 2015, 21:29
b0fc745
Код
Авторство
О чём код?
// // ShareViewController.m // Share // // Created by Gabriel on 6/7/15. // Copyright (c) 2015 Keybase. All rights reserved. // #import "ShareViewController.h" #import <KBKit/KBAppExtension.h> #define KBExtLog NSLog @interface ShareViewController () @property KBAppExtension *app; @end @implementation ShareViewController - (void)didSelectPost { NSExtensionItem *item = self.extensionContext.inputItems.firstObject; KBExtLog(@"Attachments: %@", item.attachments); _app = [[KBAppExtension alloc] init]; [_app encryptExtensionItem:item usernames:@[] sender:self.view completion:^(id sender, NSExtensionItem *outputItem) { if (outputItem) [self.extensionContext completeRequestReturningItems:@[outputItem] completionHandler:nil]; }]; } @end