Quick actions

cmd+k|ctrl+k

Navigation

Languages

iOS  simulator

Snippet info

Language

Swift

Visibility

public

Author

awesome2023

Created

2023-12-21T06:45:36.937091Z

Updated

2024-02-17T03:49:33.924887Z

let desc = """

// Simulator location
    /Users/macuser/Library/Developer/CoreSimulator/Devices
    
    xcrun simctl list | egrep '(Booted)'
    
    xcrun simctl list devices | grep "iPhone 13 Pro"
    
    open  ~/Library/Developer/CoreSimulator/Devices/4751655C-397D-4E86-BFE5-7F0F81A73342
    
    Library/Developer/CoreSimulator/Devices/4751655C-397D-4E86-BFE5-7F0F81A73342/data/Media/DCIM/100APPLE
    
    /// list all install app id
    xcrun simctl listapps 4751655C-397D-4E86-BFE5-7F0F81A73342 | grep Loadify
    
    //
    xcrun simctl get_app_container 4751655C-397D-4E86-BFE5-7F0F81A73342  io.VishwaiOSDev.Loadify data
    
    To take a screenshot

xcrun simctl io booted screenshot <filename>.<file extension>

For example:

xcrun simctl io booted screenshot myScreenshot.png

To take a video

xcrun simctl io booted recordVideo <filename>.<file extension>

For example:

xcrun simctl io booted recordVideo appVideo.mov
    
"""

let diffImport = """

#if os(iOS)
import UIKit
#elseif os(OSX)
import AppKit
#endif

"""
print("\(desc)")
INFO