quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

NSScreencast Episode #144 Share Extensions Part 1

Share Extensions Part 1 - NSScreencast

imgurという画像共有サービスと連携

  • imgur: the simple image sharer
  • ImgShare
    • ImgShareKit
    • ImgShareExtension
  • Podfile
    • target 'ImgShare' do
      • pod 'AFNetworking'
  • Add new target in Xcode (ImgShareKit)
  • ShareKit
  • ImgShareExtension
    • ShareViewController.m
      • @import MobileCoreServices;
      • viewDidLoad
      • presentationAnimationDidFinish
      • isContentValid
      • didSelectPost
        • [self.extensionContext completeRequestReturningItems:@[] completionHandler:nil];
  • presentationAnimationDidFinish
    • for ... in self.extensionContext.inputItems
      • for (NSItemProvider *provider in item.attachments)
        • NSString imageType = (NSString )kUTTypeImage;
        • [provider hasItemConformingToTypeIdentifier:imageType]
          • [provider loadItemForTypeIdentifier:imageType
    • It will be nasty(扱いにくい) and worse with Swift code
  • Info.plist
  • Bundle display name