Giter Club home page Giter Club logo

notification-center-widget's Introduction

Did you Know?

A notification center widget with shared core data. Example project for sharing data between iOS app extension and container app through shared core data.

Preview

Installation

Compatibility

  • iOS 10.3+

  • Xcode 8.0+

Usage

  1. Create an app group

App Groups are the scheme iOS uses to allow different apps to share data. If the apps have the right entitlements and proper provisioning, they can access a shared directory outside of their normal iOS sandbox. To share data between widget extension and container app, select the target for your app and go to the capabilities tab. There, enable app groups. Repeat the same in the target of your widget extension

When you flip that switch, Xcode will talk to the developer center to configure your app ID for app groups. Next it'll ask you for a group name. Give it one and it'll create and download a new provisioning profile. Now, your app and its extension are ready to share the container, so it’s time to put the data in it.

  1. Create your core data in shared container
  • Move SCDCoreDataWrapper.swift class, the .xcdatamodeled and NSManagedObject subclass to my SharedCode Framework.
  • Get the URL of the group container with containerURL(forSecurityApplicationGroupIdentifier: of FileManager passing the container identifier. You need to point to the security group as your store url so that they are both being stored to that.

Author

iLeaf Solutions http://www.ileafsolutions.com

notification-center-widget's People

Contributors

hiranileaf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.