So I'm still reasonably new to iOS development and I'm finding myself quite regularly needing to delete either DerivedData, or the contents of the iPhone Simulator directory, to get things to actually execute from my code. Clean in Xcode doesn't do the same as emptying those directories, right? And if not, is there an easier way to do it than lugging Finder around to get to them, and clearing them?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
For web development and testing on the iOS Simulator (Safari):
With both iOS Simulator and Safari open, go to Safari > Develop > iOS Simulator and select your page which will give you access to the Web Inspector tools.
Go to Safari > Develop > Empty Caches to clear the cache on iOS Safari.
66:99 and climbing:
Yes, there is a better way than going into every single simulator in town, and resetting contents and settings one at a time. Also much better than looking into your simulator's directory and yanking the cache from under its feet.
Quit iPhone Simulator, then run
xcrun
in Terminal:Safe and effective.
See https://stackoverflow.com/a/26394597/218152 for single device
In the iOS Simulator menu, there is an option called Reset Content and Settings...
This should do the trick.
EDIT:
To make this much quicker and easier, I added a shortcut key like this...
In System Preferences, choose Keyboard
Then click Application Shortcuts
Click the plus button to add another shortcut.
Lastly:
Now, while in your iOS Simulator, you can simply use your new shortcut key to reset.
If the Simulator doesn't appear in the drop down list:
Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/