title: Unable to share data using Shared App Groups for Today Extension
body: <p>I am trying to create a today extension that displays data from the parent app by using a shared app group container, and then adding the persistent store to a context. </p>
  
  <ul>
  <li>Add Today Extension Target</li>
  <li>Turn on app groups for parent app and extension and select same group</li>
  <li>Add Today Extension as Target Membership for Data model and entities</li>
  <li>Add Persistent store to context </li>
  <li>Fetch Objects</li>
  </ul>
  
  <p>I get no errors but the extension does not seem to be fetching any results. Does anybody have any suggestions where I may be going wrong ? </p>
  
  <p>Heres what I am doing in the extension <code>TodayViewController</code></p>
  
  <pre><code>class TodayViewController: UIViewController, NCWidgetProviding {
  
  var context: NSManagedObjectContext!
  
  @IBOutlet weak var table: UITableView!
  var objectsArray = [Objects]()
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      let fileManager = NSFileManager.defaultManager()
      var containerPath = fileManager.containerURLForSecurityApplicationGroupIdentifier("group.com.Company.AppName")
  
      containerPath = containerPath?.URLByAppendingPathComponent("SingleViewCoreData.sqlite")
      let modelURL = NSBundle.mainBundle().URLForResource("AppName", withExtension: "momd")
      let model = NSManagedObjectModel(contentsOfURL: modelURL!)
      let coordinator = NSPersistentStoreCoordinator(managedObjectModel: model!)
      do {
          try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: containerPath, options: nil)
      } catch {
       print("yellow")
      }
  
      context = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
      context.persistentStoreCoordinator = coordinator
  
  
      let moc = context
      let request = NSFetchRequest(entityName: "Objects")
      request.sortDescriptors = [NSSortDescriptor(key: "date", ascending: true)]
  
  
      do {
          try
              self.objectsArray = moc.executeFetchRequest(request) as! [Objects]
              print ("objects count \(objectsArray.count)")
      } catch {
          // failure
          print("Fetch failed")
      }
  
      self.table.reloadData()
  }
  
  // MARK: - Table view data source
  
  func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
      // #warning Potentially incomplete method implementation.
      // Return the number of sections.
      //return sectionsArray.count
  
      return 1
  }
  
  
  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
  
      return self.objectsArray.count
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
     let cell = table.dequeueReusableCellWithIdentifier("Cell") as UITableViewCell!
  
     cell.textLabel!.textColor = UIColor.whiteColor()
     cell.textLabel!.text = self.objectsArray[indexPath.row].title
  
     return cell
  
  }
  
  func widgetPerformUpdateWithCompletionHandler(completionHandler: ((NCUpdateResult) -&gt; Void)) {
      // Perform any setup necessary in order to update the view.
  
      // If an error is encountered, use NCUpdateResult.Failed
      // If there's no update required, use NCUpdateResult.NoData
      // If there's an update, use NCUpdateResult.NewData
  
      completionHandler(NCUpdateResult.NewData)
  }
  
  }
  </code></pre>