I have an app that makes request to a REST service. Authentication is done using cookies. This already works.
What I have problems with is to test the case when the cook
I just used fseventer to inspect what happens to the iPhone Simulator filesystem when the "Clear Cookies and Data" button is tapped. These commands replicate that behavior, however, there is a trick:
rm -rf "$HOME/Library/Application Support/iPhone Simulator/5.0/Library/Cookies"
rm -rf "$HOME/Library/Application Support/iPhone Simulator/5.0/Library/Caches/Snapshots"
rm -rf "$HOME/Library/Application Support/iPhone Simulator/5.0/Library/Caches/com.apple.mobilesafari"
rm -rf "$HOME/Library/Application Support/iPhone Simulator/5.0/Library/WebKit"
rm -rf "$HOME/Library/Application Support/iPhone Simulator/5.0/Library/Safari"
The Simulator needs to be restarted. So, before manipulating the filesystem, I run this:
killall "iPhone Simulator"