How to browse Core Data in my app running on my iPhone?

前端 未结 4 813
深忆病人
深忆病人 2021-01-31 11:44

I\'m working on an iPhone project that uses core data and trying to figure out a way to browse easily how data is being stored. Specifically, I am storing images in core data, a

4条回答
  •  故里飘歌
    2021-01-31 12:21

    To view Coredata from a device :

    Plug in the device -

    Start Xcode

    On the top Xcode menu -

    Select Window -

    Select Devices -

    Select your device -

    Select the app -

    Select the settings icon (gear shaped symbol to the right of "+ -") -

    Select Download container -

    Save it to a folder -

    It will have an extension of ".xcappdata" -

    Open FireFox

    (If you dont already have it - get the FireFox SQLite Manager browser plug in) Select the SQLite Manager icon on the top right (looks like a barrel with stripes)

    Select the open folder icon

    change Format [SQLite DB files] to All Files

    Browse to and Select your database

    In addition to the tables and columns (sorry - Entities and Attributes ) you created in Coredata - you will see a few extra columns created by CoreData itself.

    Hope this helps somebody. It's a bit of a bear, but worth the trouble to see your database "in the flesh"

提交回复
热议问题