mac下Xcode在iphone真机上测试运行iOS软件

最近一个需求需要在iPhone真机上测试一个视频直播的项目。

需要解决如何将项目 app 安装到真机上 在进行真机调试。

安装Xcode

直接在App Store上搜索Xcode安装即可。

关键是要安装Simulator。项目需要安装iOS17.5但是由于安装包太大,并且网络不稳定的原因。在Xcode上安装Simulator一直失败。

解决办法

参考这篇回答

手动下载安装包 - 网址

If your download speed is slow, you may need to use a VPN.

After downloading the runtime, follow the commands below in your Terminal:

bash 复制代码
sudo xcode-select -s /Applications/Xcode.app
xcodebuild -runFirstLaunch
xcrun simctl runtime add "~/Downloads/iOS_17_Simulator_Runtime.dmg"

添加账号

设备连接:使用数据线 将 mac 连上 iPhone 或 iPad

打开项目:用 Xcode 打开项目(确保 Bundle ID 唯一);如果无法打开项目文件,可以尝试在 Finder 点击文件打开

账户添加:选择非 Pods 的另一个文件,选择 TARGETS - Signing & Capabilities 内的 Team 添加账户 Add an Account...

真机测试

选择通过数据线连接的真机(真机需要开启开发者模式),进行测试即可。

相关推荐
游戏开发爱好者831 分钟前
抓包工具有哪些?代理抓包、数据流抓包、拦截转发工具
android·ios·小程序·https·uni-app·iphone·webview
梁辰兴2 小时前
计算机网络基础:以太网的 MAC 层
网络·计算机网络·macos·计算机·mac·以太网·梁辰兴
bybitq2 小时前
Go函数闭包实战-复用函数
ios·golang·xcode
renke33644 小时前
Flutter 2025 跨平台工程体系:从 iOS/Android 到 Web/Desktop,构建真正“一次编写,全端运行”的产品
android·flutter·ios
Zender Han5 小时前
Flutter 中 AbsorbPointer 与 IgnorePointer 的区别与使用场景详解
android·flutter·ios
老臣软件6 小时前
macOS 下载太慢?问题可能不在网速
经验分享·macos·mac·实用软件·网络下载管理器
Clarence Liu7 小时前
MacOS 在Trae IDE中构建现代C++开发环境:从新手到高效的完整指南
c++·ide·macos
Digitally7 小时前
3种简单方法备份 iPhone 短信
ios·iphone