avatar
文章
50
标签
12
分类
0
首页
归档
标签
分类
关于
yxibng命令行重启iPhone 返回首页
搜索
首页
归档
标签
分类
关于

命令行重启iPhone

发表于2022-11-16
|浏览量:

参考: Any way to reboot a iDevice that is connected to a USB port via terminal (Mac terminal)?

安装libimobiledevice

1
2
brew install libimobiledevice

使用

1
idevicediagnostics restart
文章作者: yxibng
文章链接: https://yxibng.github.io/2022/11/16/Shell/2022-11-16-%E5%91%BD%E4%BB%A4%E8%A1%8C%E9%87%8D%E5%90%AFiPhone/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 yxibng!
Shell
上一篇
ios keychain 总结
Keychain 是什么一个加密的数据库, 可以用来存储小的用户数据, 包括 kSecClassGenericPassword:通用密码(可以用来存自定义数据) kSecClassInternetPassword:互联网密码 kSecClassCertificate:证书 kSecClassKey:秘钥 kSecClassIdentity:证书+秘钥 Figure 1 Securing the user’s secrets in a keychain 打开 mac 系统的 keychain 观察一下, 发现系统有多个keychain,每个keychain都有上图对应的项目 如何管理数据,增删查改Figure 1 Putting data and attributes into a keychain keychain 将要存储的数据封装为 SecKeychainItemRef,通过存取 SecKeychainItem 来达到对数据的管理。 SecKeychainItemRef 包含 data, CFData, 要存取的数据 attributes, 该条目的属性,存取权限,查...
下一篇
Xcode 配置 clang-format 格式化 C++代码
在命令行,通过clang-format工具,可以对代码进行格式化。但 clang-fromat 只能在终端中使用,有没有什么办法可以让它在Xcode中也可以使用呢,这样就很方便的对当前文档进行格式化了。 答案是: 借助 macOS 自带的 Automator 工具。 clang-format 安装1brew install clang-format 添加 Automator 服务打开 Automator 选择 “Quick Action”。 左侧 Library 中搜索 “Run Shell Script” 并拖动到右侧。在脚本编辑框中输入以下内容: 12source ~/.zshrcclang-format 同时记得勾选上 “Output replaces selected text”,然后保存并输入保存的名称,比如 clang-format。 至此一个服务便已添加好。 Automator 在磁盘上的位置The location of the user created services is under: 1~/Library/Services/ other locat...
相关推荐
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...
avatar
yxibng
文章
50
标签
12
分类
0
Follow Me
公告
This is my Blog
最新文章
无标题2026-04-16
CMake ios code signing2024-04-03
ios xib 总结2024-03-18
Xcode 源码调试微信 xlog2024-03-08
结构体位域中的高低位问题2023-06-09
© 2022 - 2026 By yxibng
搜索
数据加载中