Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to move my iOS Simulator app data from one simulator (iPhone 7) to another (iPad Pro 12.9)?

I have an app built and running in my iPhone 7 simulator using Xcode 8. It's loaded up in the simulator and I've loaded the app with stored data now stored locally.

When I run that same app on my iPad Pro 12.9 simulator, it acts like a fresh device and has none of the stored data in it for my app.

Is there a way to have all of the simulators use the same app storage? Or at least any easy way to move apps between them?

like image 729
Ethan Allen Avatar asked Sep 23 '16 20:09

Ethan Allen


1 Answers

  • Go to ~/Library/Developer/CoreSimulator/Devices. (Library folder is hidden generally. Unhide the folder with this command in terminal - defaults write com.apple.finder AppleShowAllFiles YES and restart the Finder).
  • You will find the bunch of folders specific to the simulator at the mentioned path. Also find plist, named device_set.plist, which has the entry of all the available simulators.

enter image description here

  • Find the ids of the source and destination simulators you are interested in under Root->DefaultDevices->com.apple.CoreSimulator.SimRuntime.iOS-XX-X (XX-X - OS version that you run your simulator on.)
  • Once you find the ids, search the folder with that name in the above-mentioned path.
  • The simulator folder will contain data and device.plist.
  • Copy the data folder from source simulator and replace it in the destination simulator.
  • That's it! If your destination simulator is open, just restart it and it should reflect the data of source simulator.
like image 70
Anup H Avatar answered Sep 23 '22 02:09

Anup H