Add iOS Simulator to Dock After Xcode Update
The iOS simulator bundled with Xcode in OSX is a great tool for testing websites in the browser app in multiple devices and versions. It's useful to have it docked so that you can get get to it easily.
The problem is that every time Xcode is updated, it removes the iOS Simulator from the dock. This annoys me, so I wrote a quick shell script to re-add the simulator to the dock:
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
killall Dock
I put this into an executable shell file, and every time Xcode updates I run the script 'real quick. It's easier then searching in Xcode.app for the simulator, or launching it from an Xcode project.
Hope this is useful to someone!
Written by Patrick Coffey
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Xcode
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#