I was wondering what some people's opinions are about the best way to test a mapping model? I'm currently working on an app to an upgrade of an app in the app store and want to test the mapping model hard before submitting.
Found this one accidentally, to test a migration, before starting simulator, just... copy a file. You need to overwrite your app database with an older version (all CoreData data and metadata is in)
The Simulator install your app there :
"/Users/<username>/Library/Application Support/iPhone Simulator/<iOS Version>/Applications/<Some UUID>/"
The CoreData Database is probably there (depends on what you do) :
"/Users/<username>/Library/Application Support/iPhone Simulator/<iOS Version>/Applications/<Some UUID>/Documents/whatever.sqlite3"
You can quickly open this folder from terminal using :
open "`find ~/Library/Application\ Support/iPhone\ Simulator/<iOS Version> -name '<your.app>'`/../Documents"`
Then just keep a backup before migration, and copy it over simulator one before starting your app.
I have been doing exactly this same thing.
I use iPhone Configuration Utility to install the 1.0 version of our app (repeatedly). After that, I simply run the current version of the app (1.0.1) in the debugger in Xcode. Works just fine. HTH
Related
I just submitted an app to the App store and it is now available. Unfortunately I realized that my development test data was included in the SQLite database! How do I go about emptying my database for the distribution, in other words removing all rows from tables? I know how to do this for a simulation (Reset content and settings), but since the deployed version just uses the Generic iOS build that does not run in the simulator, I am not sure how to clear the database.
Figured this out myself. You have to find the location of the sql file in your project.
Find the .sql file in your project.
Go to File-> Show in Finder
Then go to that location using Terminal and use sqlite3 to set up your DB as you want it.
I'm currently working on a IOS project and using Core Data. My question is:
Is there any tool or software I can use to see what data is in the Core Data when I'm running the project, and how to use them. Thank you so much!
Once your app has run in the simulator it creates a persistent store file, you can find the file in your app's document's directory:
~/Library/Application Support/iPhone Simulator/User/Applications
You can also check out CoreDataEditor or CoreDataPro.
There are some tools can make you efficient.
Parrot can help you enter the app sandbox easily,and you can download the app on the Mac Store.
You can use DB Browser exhibit your data .
In my app I want to display data from sqlite database on UIPicker View.It is working fine in ios simulator but data is not fetched when using iphone device.I m not getting the issue.How it can be solved???
Are you sure there is sqlite file available at path? sqlite3_open() will create the file if its not exists. Please check wheather you have created sqlite file in bundle, if yes you cannot do that. The file actually has to already exist and be copied into the bundle as a resource at build time, then used as a template to copy to a writeable area like the documents folder. The best way, if you intend to create a writeable database, would be to get the path to the Documents directory and use that. You can and should do that unconditionally, without regard to whether you are running on the Simulator or not. Indeed, I would suggest not creating any more differences between Simulator behavior and device behavior than you face anyway.
Since upgrading to XCode 5, I am unable to view data in the sqlite file in my Applications Folder. The folder structure has changed somewhat but I can still find the correct App but when I open the sqlite file with the sqlite browser there does not appear to be any data in CoreData.
Any ideas?
I suggest you to use CoreDataPro app for viewing your CoreData storage.
My fork has minor improvement - alphabetical ordering of Simulator managed object models.
In iOS 7 SQLite's Write-Ahead Logging is turned on by default. In this mode data is split into three files (.sqlite, .sqlite-shm, .sqlite-wal). I've seen that some SQLite viewers ignore .sqlite-shm and .sqlite-wal files, thus not showing proper data.
I'm using SQLite Manager plugin in Firefox, it works pretty decent.
You can get the plugin here https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/
After you install the plugin you will see 'SQLite Manager' (with a database icon in blue color) item in Tools menu.
I have an iOS app installed in iPhone from app store, now if I have an updated version 1.1 for the same app at app store and I'm getting some sort of informative alert from the older version 1.0 (New version is available...).
If I click on alertview's ok button, it redirects me to the new app link in browser. I download my new version then.
Please provide answers of following questions :
Will it replace old version?
Will it replace sqlite and image folder on the document path? (Both version is having same named sqlite file, say abc.sqlite1.0 and same folder name, say imagesToBeCopied)
Will it append the sqlite entitie rows with new rows for same entity?
How can I install version 1.0 again from app store? Is it possible to get it anyhow?
Please provide your valuable answers on it, which can help me out to reach to some solution.
Thanks.
1.Will it replace old version?
Yes, the app bundle will be replaced by the new one
2.Will it replace sqlite and image folder on the document path? (Both version is having same named sqlite file, say abc.sqlite1.0 and same folder name, say imagesToBeCopied)
No, the documents directory is not affected by the update process. If you have procedures in your code that update the documents directory, they will still run, but without any changes it would be no different to a normal launch of your app - e.g. if you check for and copy if needed, something from the bundle to the documents directory, this will only happen if the target file doesn't already exist.
3.Will it append the sqlite entitie rows with new rows for same entity?
This is not related to the update process. If you want to modify the data as part of the update, you will write this specifically in first launch code for your new version.
4.How can I install version 1.0 again from app store? Is it possible to get it anyhow?
No, the updated version replaces the old one on the app store.
To the best of my knowledge...
Yes, the new version of the app will replace the old version.
Yes it will replace your sqlite file, assuming your paths did not change across versions. If you want to handle this sort of case it is your responsibility to include logic in the newer version of the app to check for the existence of the sqlite file and overwrite or modify it accordingly.
No, all modifications to the sqlite file need to be done manually by the new version (see #2).
As of now, not possible to do this through the app store. Only one version of any app can be placed for "sale" at a time. You would have to do this through other means (testflightapp.com for instance [for adhocs for devs]).