Yes, you can do this.
Assuming that the entire state of your application is saved in places like the Documents, or Caches folders, or in app preferences (NSUserDefaults
).
You can make a zip of /var/mobile/Applications/{UID}
, ssh/scp that .zip file back to your computer (or store it elsewhere on your iPhone), and then unzip it later.
Depending on whether you move the app (install it in a different location), or completely delete it at some point, you may need to refresh the list of apps after you restore (unzip the .zip file). You can do that either by rebooting, respringing (restart SpringBoard), or ssh'ing into the device and issuing the uicache
command:
ssh mobile@iphone uicache
Note: I think you understand this based on your question, but you do need to zip up the whole /var/mobile/Applications/{UID}/
directory. Not just the MyAppName.app directory under it. That's because, for example, of where the data, user defaults plist, etc. are stored. If you are concerned about the speed of your backup and restore operations, or disk usage, you could probably try to narrow down which files you backup (e.g. ./Documents/ and ./Library/
) ... I'll leave that to you.