命令行重启iPhone
发表于
|浏览量:
参考: Any way to reboot a iDevice that is connected to a USB port via terminal (Mac terminal)?
安装libimobiledevice
1 | brew install libimobiledevice |
使用
1 | idevicediagnostics restart |
文章作者: yxibng
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 yxibng!
相关推荐
2022-02-25
Shell 函数
shell 函数语法 123function_name () { list of commands} 示例 123456789#!/bin/sh# Define your function hereHello () { echo "Hello World"}# Invoke your functionHello 函数传参函数传参类似于脚本传参$1, $2..$n 123456789#!/bin/sh# Define your function hereHello () { echo "Hello World $1 $2"}# Invoke your functionHello Zara Ali 返回值123456789101112131415#!/bin/sh# Define your function hereHello () { echo "Hello World $1 $2" return 10}# Invo...
2022-05-11
通过脚本修改xcode pbxproj文件
分析 xcode pbxproj 文件格式 创建一个新的iOS工程demo, 进入工程目录, 找到project.pbxproj。 12345➜ demo git:(main) ✗ lsdemo demo.xcodeproj demoTests demoUITests➜ demo git:(main) ✗ cd demo.xcodeproj➜ demo.xcodeproj git:(main) ✗ lsproject.pbxproj project.xcworkspace xcuserdata 通过code打开看看文件内容。 The Xcode project file is an old-style plist (Next style) based on braces to delimit the hierarchy. The file begins with an explicit encoding information, usually the UTF-8 one. project.pbxproj文件格式是旧式的plis...
2022-02-25
Shell 变量
Shell 变量变量名The name of a variable can contain only letters (a to z or A to Z), numbers ( 0 to 9) or the underscore character ( _). By convention, Unix shell variables will have their names in UPPERCASE. 合法的变量 1234_ALITOKEN_AVAR_1VAR_2 非法变量 12342_VAR-VARIABLEVAR1-VAR2VAR_A! 定义变量1variable_name=variable_value 例如: 1NAME="Zara Ali" shell 允许变量存你想要的任何值, 例如 12VAR1="Zara Ali"VAR2=100 获取变量的值通过在变量前添加$来引用变量 1234#!/bin/shNAME="Zara Ali"echo $NAME 输出 1Zara Ali 只读变量在变量前添...
2022-02-24
常用的shell语句
常用的shell语句判断软件是否安装 1234567#!/bin/bashif [ ! -x "$(command -v xcodeproj)" ]; then echo "xcodeproj is not installed. installing..." > &2 echo "run 'gem install xcodeproj'" gem install xcodeprojfi 当前shell脚本所在目录 1SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd)";
2023-05-17
oh my zsh prompt 展示当前路径
使用的主题为 1ZSH_THEME="robbyrussell" 修改配置, path ~/.oh-my-zsh/themes/robbyrussell.zsh-theme, 将 %c 替换为 %d 123456789# beforePROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ ) %{$fg[cyan]%}%c%{$reset_color%}"PROMPT+=' $(git_prompt_info)'# afterPROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"PROMPT+=' %{$fg[cyan]%}%d%{$reset_color%} $(git_prompt_info)' 参考: EXPA...
2022-02-25
Shell 循环语句
shell 循环语句while 循环while 循环可以嵌套,语法如下 1234567891011while command1 ; # this is loop1, the outer loopdo Statement(s) to be executed if command1 is true while command2 ; # this is loop2, the inner loop do Statement(s) to be executed if command2 is true done Statement(s) to be executed if command1 is truedone 示例 1234567891011121314#!/bin/sha=0while [ "$a" -lt 10 ] # this is loop1do b="$a" while [ "$b" -ge 0 ] # this is loop2 do echo -n &q...
公告
This is my Blog
