Apple/iOS

iOS: Retain Your Sanity With CoreSimulator Folders

Previously, we published a script to work around the opaque iOS Simulator folder structure on Xcode 6.


Previously, we published a script to work around the opaque iOS Simulator folder structure on Xcode 6. With the recent release of Xcode 7, the naming structure changed a bit, so we've updated the script below:

#!/bin/sh
 
if [ -d $HOME/Documents/iOS\ Simulator\ Symlinks ]; then
  rm -rf ~/Documents/iOS\ Simulator\ Symlinks
fi
 
mkdir ~/Documents/iOS\ Simulator\ Symlinks
 
xcrun instruments -s | grep '\[[0-9A-F\-]*\]' | while read -r line ; do
    left=`echo $line | sed -n 's/ \[.*\]//p'`
    left=`echo $left | sed -n 's/ /\\ /pg'`
    right=`echo $line | sed -n 's/.*\[\(.*\)\]/\1/p'`
    ln -s ~/Library/Developer/CoreSimulator/Devices/"$right" ~/Documents/iOS\ Simulator\ Symlinks/"$left"
done

Similar posts

Get notified on new marketing insights

Be the first to know about new B2B SaaS Marketing insights to build or refine your marketing function with the tools and knowledge of today’s industry.