0

I want to access my local database(FMDB) from main application to share extension i.e I want to use same file directory of DB in share extension that i use in main application and want to perform all the operation that I used to perform in main application.

Meet Soni
  • 25
  • 2
  • 8
  • Store your database in the app group directory: https://stackoverflow.com/questions/35541747/create-directory-in-app-group-container-swift – jnpdx Jul 14 '21 at 04:57
  • @jnpdx I am tried this but getting confused and not getting proper solution could you please guide me further on this. – Meet Soni Jul 14 '21 at 05:51
  • This post shows how to change the location of your FMDB database: https://stackoverflow.com/questions/46980971/move-database-file-from-bundle-to-documents-folder-fmdb. The one I already linked to shows how to access the app group directory. Make sure to move it there (and make sure app groups are enabled in your entitlements for both targets). Beyond that, you'd have to say specifically what you're getting stuck with (and show your code up to that point). – jnpdx Jul 14 '21 at 05:55
  • It's unlikely that you'll get someone on this site to call you and guide you through fixing an issue. You may want to check out [ask] and try to edit your question (with code) to demonstrate the exact point where you're stuck. I don't know, for example, what "get the URL path back on share extension" means. – jnpdx Jul 14 '21 at 06:02

0 Answers0