iPhone sqlite sync with sqlite on dekstop/mac - iphone

Can I sync the local sqlite database on desktop/mac with sqlite database on iPhone for application by directly connecting the phone to my mac/pc?

You could enable iTunes document sharing with UIFileSharingEnabled in the info.plist and then copy the sqlite database file to the Documents directory in your application, if it isn't there already.
I've been able to do this and was able to read the file just fine with sqlite on the desktop.
unfortunately it isn't automatic. Someone would need to go into iTunes and manually copy the file over each time.

Related

File in documents Directory after deletion

I created an sqlite file[or any file] in documents directory in ios device.If i removed the app (delete) from the device this file stays or get removed?
The sandbox of an application deletes automatically when you delete the app. It happens in both your device and in iOS simulator.
Documents directory allows you to store files and subdirectories your app creates or may need, for example a database.
Your application works in a sandbox environment. When you delete the application in simulator or device, the directory that was created by application is deleted and so do the files residing in it.
When you reset your simulator you can find the deleted files in the trash.

Firefox SQLite Manager cannot access Xcode iPhone simulator SQLite DB Directory

I have a question regarding opening SQLite database from SQLite Manager extention of Firefox. I use SQLite database for my iOS app development and always use SQLite Manager to load the database for the app runs on iPhone emulator (The file is under /users/myUserName/Library/Application Support/iPhone Simulator/5.1/MyAppGUID/Documents directory ). It worked fine since last week.
I suddenly found if I choose "Connect Database" from SQLite Manager menu, I couldn't find the /users/myUserName/Library directory anymore. I can still access the directory from Finder, I can still see the database file from Finder, and if I copy the db file to another directory, I can open it with SQLite Manager for no problem. However it is quite annoying that I couldn't open the database directly.
Anybody got the same problem before?
Thanks for any help.
Could this be related to the fact that the library folder is hidden by default on mac os Lion ? not sure if thats what your using but if so check out:
http://hints.macworld.com/article.php?story=20110704093233123
I used this tip to reveal the hidden files in OS X
http://mac.tutsplus.com/tutorials/os-x/quick-tip-revealing-hidden-files-in-os-x/
Then I added the hidden Library directory to my Finder Favorites and when I go into SQLite Manager in Firefox, I can drill down to the app's sqlite file.

Blackberry Webworks delete webstorage

How can i delete webstorage data?
I am using HTML5 db to store app Data for my webworks blackberry app. The problem is when i delete the app the app data is still there. If i install the app again the old data is still there.
You can delete the database manually via the "File" explorer. I found my created database in /Device/BlackBerry/system/appdata/rim/webstorage/(application name). Or you can simply upgrade your database version so that the newer one will be used instead of the old one.

Database path not been used by application - Logic issue

I have created a sqlite database. and dragged it on to my projects resource folder.
In my project i am accessing a sqlite file from
/Users/user12/Library/Application Support/iPhone Simulator/4.3.2/Applications/1F219005-A4ED-4794-81FC-65EEF8D243EF/Documents/db.sqlite
I am not using the sqlite file that was added to the project. and my project is accessing the DB file from the above location.
So, now when i try to launch my application from a different mac i am unable to launch the application because the DB is not found in that path. So how could i solve this ?
note: i used FMDB.
My final objective is to give this application to my client and since he will be running the app on his iPhone, he should be able to access the sqlite file with no issue. So what changes should i make ?
Surely xcode in other machine will have a different path. Try to place the sqlite file at the app path created by xcode on the new machine.
EDIT:
To do what you've said in your comment i suggest to create an ad-hoc certificate. Then use xcode to create your archive.
But the path of your sqlite file should be in your main bundle.
ps: You need the UDIDs of your client iPhones to add the devices to the portal.

Prevent access of documents directory in organizer of iphone application

From organizer window i can copy document directory data. But in some apps i noticed that
it is locked and cant access documents directory.How can i lock the application from accessing
documents directory via organizer.
I suppose you can access documents directory of applications that are signed with provisioning profile installed on your computer. Imo it is a handy feature for developer purposes. However it is disabled for applications downloaded from appstore so why should you worry about it?