#!/bin/bash
xcrun simctl shutdown all
path=$(find ~/Library/Developer/Xcode/DerivedData/Paiai-*/Build/Products/Debug-iphonesimulator -name "Paiai.app" | head -n 1)
echo "${path}"
filename=MultiSimConfig.txt
grep -v '^#' $filename | while read -r line
do
echo $line
xcrun instruments -w "$line"
xcrun simctl install booted $path
xcrun simctl launch booted com.Paiai.Paiai
done
|