Last active
May 15, 2023 15:28
-
-
Save nickcheng/cbc0717d2c9f79613cf2c042503b5422 to your computer and use it in GitHub Desktop.
Revisions
-
nickcheng revised this gist
Apr 25, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ function myappdocdir() { devid=$(xcrun simctl list devices | grep Booted | sed -n 's/^.*\([A-F0-9]\{8\}-\([A-F0-9]\{4\}-\)\{3\}[A-F0-9]\{12\}\).*$/\1/p') for folder in ~/Library/Developer/CoreSimulator/Devices/$devid/data/Containers/Data/Application/*; do @@ -11,3 +9,5 @@ function myappdocdir() { fi done } alias cdapp='cd $(myappdocdir)' alias openappdir='open $(myappdocdir)' -
nickcheng revised this gist
Apr 25, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ alias cdapp='cd $(myappdocdir)' alias openappdir='open $(myappdocdir)' function myappdocdir() { devid=$(xcrun simctl list devices | grep Booted | sed -n 's/^.*\([A-F0-9]\{8\}-\([A-F0-9]\{4\}-\)\{3\}[A-F0-9]\{12\}\).*$/\1/p') for folder in ~/Library/Developer/CoreSimulator/Devices/$devid/data/Containers/Data/Application/*; do if [[ -a $folder/.com.apple.mobile_container_manager.metadata.plist ]]; then if [[ 'com.apple.phone' = $(/usr/libexec/PlistBuddy -c 'Print :MCMMetadataIdentifier' $folder/.com.apple.mobile_container_manager.metadata.plist) ]]; then -
nickcheng revised this gist
Apr 12, 2017 . No changes.There are no files selected for viewing
-
nickcheng created this gist
Apr 12, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ alias cdapp='cd $(myappdocdir)' alias openappdir='open $(myappdocdir)' function myappdocdir() { devid=$(xcrun simctl list devices | grep Booted | cut -d '(' -f 2 | cut -d ')' -f 1) for folder in ~/Library/Developer/CoreSimulator/Devices/$devid/data/Containers/Data/Application/*; do if [[ -a $folder/.com.apple.mobile_container_manager.metadata.plist ]]; then if [[ 'com.apple.phone' = $(/usr/libexec/PlistBuddy -c 'Print :MCMMetadataIdentifier' $folder/.com.apple.mobile_container_manager.metadata.plist) ]]; then echo $folder break fi fi done }