I want to copy my sqlite database from the database location with latest updates to my iOS application every time I launch the application.
Is there any way to do it?
I want to copy my sqlite database from the database location with latest updates to my iOS application every time I launch the application.
Is there any way to do it?
you can add following methods to your appdelegate
and call this method in your did finish with launching method
[self copyDatabaseIfNeeded];
hope this will help.try this one:
Try this in AppDelegate Class
.h file
.m file
It'll automatically copy, if it doesn't found any database in application.
Hopefully, it'll help you.
Thanks.
use below code for coping database when application launch
in your appdelegate.m
in
and add below function in to your appdelegate.m
Declare following teo variable in
.h
:Here it is in Swift 4