Importing AddressBook data into the iPhone Simulator

前端 未结 7 2078
自闭症患者
自闭症患者 2020-12-13 05:28

Is there an easy way to import AddressBook data into the iPhone Simulator?

Right now my only assumption is to manually modify the SQLite files found in the /Libr

相关标签:
7条回答
  • 2020-12-13 05:34

    Just sign in to your iCloud account on the simulator and turn "Contacts on" under iCloud. All your contacts, photos etc will appear on the simulator. Obviously, this assumes you are backing up your contacts to iCloud on your iPhone. Hope it helps!

    0 讨论(0)
  • 2020-12-13 05:37

    As Marc pointed in his answer https://stackoverflow.com/a/27582281/4598931 for a similar question it can be done just exporting contacts to vCard and drag and drop the generated file to iphone simulator.

    0 讨论(0)
  • 2020-12-13 05:47

    I was looking for the exact solution, and this worked perfectly for me on a non-jailbroken phone. It works by extracting your iPhone address book from an unencrypted backup.

    • Quit the iOS Simulator
    • Download iPhone/iPod Touch Backup Extractor
    • Run it, and select the last option "iOS Files"
    • Create a folder on your desktop and extract all files to that folder
    • When complete, go to your extract folder and navigate to Library/AddressBook
    • Copy both files (AddressBook.sqlitedb and AddressBookImages.sqlitedb) to: ~/Library/Application Support/iPhone Simulator/{SDK}/Library/AddressBook
    • Run the Contacts application in iOS Simulator
    0 讨论(0)
  • 2020-12-13 05:52

    Right this is the only way i know with a "legit" iPhone

    But if you have a jailbroken iPhone, you can download the iPhone AddressBook database with ssh, and replace the simulator one by the iphone one.

    0 讨论(0)
  • 2020-12-13 05:56

    or if your iPhone isn't jailbroken, you can extract the sqlite db from a backup using the shell script here: http://0xced.blogspot.com/2009/01/using-your-own-address-book-in-iphone.html

    (note you'll need to change the simulator path it copies it to, as in the current SDK it's a bit different due to the addition of the OS version folder - easiest thing would be to just change it to your home directory and copy manually from there)

    0 讨论(0)
  • 2020-12-13 05:57

    Here's a simple app I've made which you can install in the simulator https://github.com/cristianbica/CBSimulatorSeed

    0 讨论(0)
提交回复
热议问题