Mac机获取IOS手机udid

ideviceinfo -u UDID

查看iphone7plus的手机相关信息

deviceinfo -u 9df9e2a39ddd9a8f2d0fe870cec16bcbe4d0e4c9

mac获取ios手机的udid

命令:idevice_id -l

mac获取Android手机的udid

命令:adb deivces

查看 iOS 模拟器 udid命令: xcrun simctl list | grep Boo

通过运行xcrun simctl list可以获取到当前可用的设备列表,包括设备类型、设备系统版本、设备名称、设备UUID,运行状态等信息。

iOS模拟器命令xcrun simctl系列(自动化测试)

iOS模拟器命令xcrun simctl系列(自动化测试) - 走看看

1. 列出安装的可用的模拟器: xcrun instruments -s

【如:iPhone 5s (9.0) [00AB3BB6-C5DC-45C7-804F-6B88F57C2AFF] (Simulator)】

1. 查看已安装的模拟器: ios-sim showdevicetypes

【如:iPhone-6s, 11.1

iPhone-6s, 10.0

iPhone-6s, 9.0

iPhone-6s, 11.2

iPhone-6s, 10.1

iPhone-6s, 9.2】

1. 查看已安装的模拟器: xcrun simctl list

【如:

-- iOS 11.3 --

iPhone 5s (9ABF3B1A-4A86-4BAC-BBB2-5D63CC30F0DE) (Shutdown)】

查看启动的模拟器 xcrun simctl list | grep Booted

2. 开启上面列表中指定的模拟器: xcrun instruments -w "iPhone 8(11.2)"

2. 开启指定的模拟器: xcrun simctl boot udid

3. 关掉模拟器: xcrun simctl shutdown udid

关掉所有打开的模拟器: xcrun simctl shutdown all

4. 重置模拟器(清除模拟器的数据和设置)xcrun simctl erase udid

5. 安装指定app: xcrun simctl install booted <app路径>

多设备时:xcrun simctl install <device> <app路径> 

5. 安装指定app: ios-sim launch /Users/nali/Desktop/ting.app --devicetypeid iPhone-X, 11.2

6. 运行指定的app: xcrun simctl launch booted <bundle identifier>

多设备时:xcrun simctl launch <device> <bundle identifier>

7. 关闭已经打开的应用: xcrun simctl terminate booted <bundle identifer>

多设备时:xcrun simctl terminate <device> <bundle identifier>

8. 卸载指定应用: xcrun simctl uninstall booted <bundle identifer>

多设备时:xcrun simctl uninstall <device> <bundle identifier>

9. 截图:xcrun simctl io booted screenshot screenshot.png

会发现在当前目录下会多了一张照片

多设备时: xcrun simctl io <device> screenshot screenshot.png

10. 录屏:xcrun simctl io booted recordVideo example.mp4

多设备时:xcrun simctl io <device> recordVideo example.mp4

11. 日志: tail -f <filename>

日志文件的路径:

/Users/$UserName/Library/Logs/CoreSimulator/$simulator_hash/system.log

Yarn for mac 安装教程

Yarn for mac 安装教程 - 掘金

Yarn是Facebook最近发布的一款依赖包安装工具。
复制代码

快速安装

  • MacOS 直接使用脚本
curl -o- -L https://yarnpkg.com/install.sh | bash  
复制代码
  • Homebrew方式
brew install yarn 
复制代码
  • npm方式
npm install -g yarn  
复制代码

查看是否安装成功

yarn --version 
复制代码

异常情况处理:

➜  ~ yarn --version
zsh: command not found: yarn
复制代码

解决方式:

需要在环境变量中配置yarn,需要在终端执行下面两个步骤命令:

1. touch ~/.bash_profile   //touch的意思是没有就创建;.bash_profile这是系统临时的环境变量, 
   
2.  sudo open -e ~/.bash_profile
复制代码

如果从来没有改过 .bash_profile文件,可以会提示被锁定,这时需要将这个文件的内容复制到另一份txt文件,做二次保存,之后删除.bash_profile:

rm -rf ~/.bash_profile
复制代码

重新执行第1,第2步骤,就可以修改.bash_profile文件了

为了在全局访问Yarn的可执行文件,需要在.bash_profile配置PATH变量,如下:

export PATH = "$PATH:`yarn global bin`"

具体实现方式:

export PATH="$PATH:`/Users/allenlas/node_global/bin/yarn`"

复制代码

之后运行:

3. source ~/.bash_profile

4. yarn --vesion 
复制代码

运行日志如下:

➜  ~ npm install yarn -g 
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.17.3
added 1 package in 3.524s
➜  ~ yarn -version
1.17.3
➜  ~    


 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用中的描述,使用Mac系统连接华为手机并升级到HarmonyOS 2.0后,无法通过官方文档提供的命令获取UDID。因此,我推测使用Mac系统获取华为手机UDID可能存在问题。 如果您想在Mac系统上获取华为手机UDID,我建议您尝试以下步骤: 1. 确保您的华为手机已连接到Mac电脑,并且已启用开发者选项。您可以在手机设置中的"关于手机"或"系统"菜单中找到开发者选项,并启用USB调试模式。 2. 打开终端应用程序,在终端中输入以下命令:adb devices 这将显示已连接到Mac电脑的设备列表。确保您的华为手机显示在列表中,并具有状态"设备"。 3. 输入以下命令获取华为手机UDID:adb shell getprop ro.serialno 这将返回华为手机UDID号码。 请注意,这些步骤可能因您的具体情况而有所不同。如果您仍然无法成功获取华为手机UDID,请考虑联系华为技术支持或相关论坛以获取更详细的帮助和指导。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [HarmonyOS鸿蒙App开发真测试以及那些坑儿](https://blog.csdn.net/hanru723/article/details/117563773)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [如何获取鸿蒙系统手机udid(待更新)](https://blog.csdn.net/weixin_37438128/article/details/117705295)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Android Q 获取设备唯一ID(UDID\GUID\UUID\SSAID\GAID)](https://blog.csdn.net/weixin_45371676/article/details/108013310)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值