3

I have developed a custom ios framework for achieving some task, which is working perfectly but I have to add my sqlite database separately in my test app. I want to bind my sqlite database with my custom framework so that it will automatically added in any app where user want to user that framework.

I also don't want to show sqlite database to anyone. can anyone please tell me the best way to achieve this.

4
  • 1
    Have you got the answer? I am searching for the same. Can you put the answer.. Commented Jul 15, 2015 at 10:45
  • HI Vinod , did you got the answer? I am searching for the same. can you help me if you get Commented Feb 22, 2016 at 9:03
  • @venkipar. Not get the answer but I have put the whole database on my backend server and get an search API. So whatever data required I get that using my own API. Hope this will help you. Commented Feb 23, 2016 at 10:50
  • @VinodSingh Thank you .. i will check Commented Feb 23, 2016 at 12:07

2 Answers 2

0

I believe you're looking to ship a sqlite database with your app, and have it installed invisibly to the user. Just add the database to your NSBundle, by including it in the application. The important part is that you must copy this bundled database to the file system (you probably want to also mark it as not being in the cloud), because the NSBundle'd files are read-only. So, here's your strategy: 1) on startup, check to see if the database is in the file system. 2) if not, copy it from the NSBundle to the file system, 3) open the database in the file system.

Sign up to request clarification or add additional context in comments.

1 Comment

I want to distribute my framework N people, but don't want them to see the content of sqlite. I am looking for a solution which allow me to bind database with my custom framework, so if user add framework in their app database will automatically with framework just like a image bundle.
0

Maybe there is a better solution to your question but here is a suggestion on what you could: Programmatically create the database in your framework. As for hiding the database here is the solution to that! You may also encrypt the sqlite file.

Cheers

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.