Important! A new Community experience launched on September 26, 2017. Read more about it here or continue to Base Camp.
Voting: 
Vote up!
0 Votes
2 Replies

How to get kony app database file on iphone

Chris Huang on Mar 28, 2017 11:53 EDT

Posted In
Vote up!
0 votes
Vote down!

Hi Chris,

If you are creating SQLlite db using kony API's then the DB file is stored withing the application sandbox. Every application is provided a private area (called Sandbox) where it can store application related information. This is a security feature as this information is not accessible to any other application.

iOS

If you want to view the database in your iPhone device then you can use a software like iExplorer.

Edit : The location of sqlite file has changed. It currently resides in - /User/Library/Application Support/iPhone Simulator/version of SDK(eg-7.0)/Applications/4AF938D6-E981-4971-A588-3424B64E7EE7(eg)/Library/Application Support/app_name/yourdatabase.sqlite

Edit : The location has changed again. It now resides in - /User/Library/Developer/CoreSimulator/Devices/789A1317-6C55-4615-A72E-65C824D8C6B9(eg)/data/Containers/Data/Application/0470F5FC-0043-46B7-A21C-A436A56ED714(eg)/Documents/yourdatabase.extension

If you want to view your database when running on Simulator it is located at the following location

user/Library/Application Support/iPhone Simulator/version of SDK(4.2eg)/Applications/4AF938D6-E981-4971-A588-3424B64E7EE7(eg)/Documents/yourdatabase.sqlite

Kindly go through the below link for more information.
Link: http://stackoverflow.com/questions/4646692/open-sqlite-database-file-inside-iphone-simulator

Android

When you store something in "Kony.store" and "Kony.db" , these get stored as .db files in local data partition of Application.
ex: If your app package name is com.test.storage.
It will be stored in "/data/data/com.test.storage/database folder" (This location might vary where device manufacturer could have altered the App data partition)

Data partition size can be determined on device by command 
adb shell df /data/data
The entire data partition free space is shared among all Apps.

Thanks

Replied by: Apr 06, 2017 01:20 EDT
Bronze
Vote up!
0 votes
Vote down!

Hi,

I had a Kony app using Kony studio 6.0 and using xcode version 7.3.1 to build and exported as "Save for Enterprise Deployment".
I still cannot use iExplorer to view the database in my iPhone device. Is there any built setting I need to set in xcode before 
I build the ipa file?

you said:
 The location of sqlite file has changed. It now resides in -
 /User/Library/Developer/CoreSimulator/Devices/789A1317-6C55-4615-A72E-65C824D8C6B9(eg)
/data/Containers/Data/Application/0470F5FC-0043-46B7-A21C-A436A56ED714(eg)/Documents/yourdatabase.extension

In fact I find out under
 /User/Library/Developer/CoreSimulator/Devices/789A1317-6C55-4615-A72E-65C824D8C6B9(eg)
/data/Containers/Data/Application/0470F5FC-0043-46B7-A21C-A436A56ED714(eg)/Documents/

only have a file called localstorage.metadata

the sqlite file is on

 /User/Library/Developer/CoreSimulator/Devices/789A1317-6C55-4615-A72E-65C824D8C6B9(eg)
/data/Containers/Data/Application/0470F5FC-0043-46B7-A21C-A436A56ED714(eg)/Library/WEBSQLDIRECTORY/

thank you
 

Replied by: Apr 06, 2017 12:41 EDT