- Python 3
- Pip 3
$ brew install python3| 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 | |
| echo $folder | |
| break | |
| fi | |
| fi | |
| done |
| //------------------------------------------------------------------------ | |
| // The SwiftUI Lab: Advanced SwiftUI Animations | |
| // https://swiftui-lab.com/swiftui-animations-part1 (Animating Paths) | |
| // https://swiftui-lab.com/swiftui-animations-part2 (GeometryEffect) | |
| // https://swiftui-lab.com/swiftui-animations-part3 (AnimatableModifier) | |
| //------------------------------------------------------------------------ | |
| import SwiftUI | |
| struct ContentView: View { | |
| import Foundation | |
| /// An abstract class that makes building simple asynchronous operations easy. | |
| /// Subclasses must implement `execute()` to perform any work and call | |
| /// `finish()` when they are done. All `NSOperation` work will be handled | |
| /// automatically. | |
| open class AsynchronousOperation: Operation { | |
| // MARK: - Properties |
| // To check if a number is between a range, don't do | |
| if number >=0 && number <= 100 { | |
| } | |
| // Use range and news operators instead : | |
| if 0...100 ~= number { | |
| } |
| exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
| UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
| if [ "true" == ${ALREADYINVOKED:-false} ] | |
| then | |
| echo "RECURSION: Detected, stopping" | |
| else | |
| export ALREADYINVOKED="true" |