Links

Extensions in iOS - Keynote

  1. Not all but most of the APIs are available for extesions
  2. Extensions have separate container for them which means they act like a saperate app for there parent app
  3. Extensions don't have access to their parent app data but can opt into data sharing
  4. Apps and Extensions can use a shared container/storage area which can be accessed at same time with the help of;
    • NSFileCordination - provides general syns strategy for app and extension
    • CoreData
    • sqilite
    • NSUserDefaults - with a shared suite name
    • Shared Keychains - for an app group
  5. Once user approve the Privacy access (e.g; Photos, Location..) to an app all its extensions don't need to ask saperately
  6. Extensions are stateless that means they are killed aggressively


Extensions configuration keys in .plist
  • NSExtension - A dictionary of keys and values that describe an app extension
    • NSExtensionPointIdentifier - Extension point’s reverse DNS name PFB
    • NSExtensionPrincipalClass - The name of the principal view controller class created by the template
    • NSExtensionAttributes - A dictionary of extension point–specific attributes that specify aspects of an app extension
      • further configuration based on extension kind


Values for the NSExtensionPointIdentifier key based on extension type;
  • Action Extension - com.apple.ui-services
  • Custom Keyboard Extension - com.apple.keyboard-service
  • Document Picker Extension - com.apple.fileprovider-ui
  • File Provider Extension - com.apple.fileprovider-nonui
  • Finder Sync Extension - com.apple.FinderSync
  • Photo Editing Extension - com.apple.photo-editing
  • Share Extension - com.apple.share-services
  • Today Extension - com.apple.widget-extension

Post a Comment