0

I am trying to share class and database from my app to app extension . I have tried to add classes from the TARGET Membership, but on adding following issue comesUIApplication.sharedApplication()

Could any one help me to access my class and database in share extension.

Thanks in advance

Aditya
  • 783
  • 1
  • 8
  • 25

1 Answers1

0

To access UIApplication object you must import the UIKit framework like:

import UIKit

or if you only want to import UIApplication class you can write

import class UIKit.UIApplication

Also note that if you want to use CoreData in your Share extension, you will need to create new container and set the storeURL to point to created container.

Said Sikira
  • 4,482
  • 29
  • 42