How to Use the SQL database for iOS development to save information and develop the SQL database for ios?
How to use SQL database to save information for iOS development. Whether the BLOB field can be used to save images is a good method is still controversial, except for small images. A more common method is to save an image as a file, and then only save the metadata of the image file in the data, such as the file path. However, if you want to package a data file (initial data) into a file and put it in your application, this is a good method.
SQLite runs much slower on iOS devices than on simulators. A query that can be executed instantly on the simulator takes several seconds on the iPhone, especially on some old machines. You need to take this latency into consideration during the test.
If you only query and read data from the database, you can store the cities. sqlite file anywhere and then search for the file through the application package resource path. However, all files in the application package path are read-only. If you are doing the same thing as we are doing, you need to modify the content in the database. Your application must copy the database file to the Document directory of the application and then modify it there. One advantage of this is that when the application is upgraded, the folder will be saved. In this way, when the application is upgraded, the data added to your database will be saved.