Xcode:尝试在iOS模拟器中运行应用程序时出现无效的符号链接错误 [英] Xcode: invalid symlink error when trying to run app in iOS simulator

查看:106
本文介绍了Xcode:尝试在iOS模拟器中运行应用程序时出现无效的符号链接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在应用程序编译阶段结束时,我看到一个无效的符号链接错误。

At the end of my app's compilation phase, I see an invalid symlink error.

这只是我每次运行时创建的临时目录。我尝试删除它无济于事。

This is just some temp directory that's created every time I run. I tried deleting it to no avail.

该应用在设备上运行良好。

The app runs fine on device.

任何帮助将不胜感激。

Any help would be much appreciated.

推荐答案

当您的应用程序包含指向应用程序包外部的符号链接时,通常会发生该错误。在为设备或模拟器进行构建时,Xcode会创建应用程序捆绑包,然后将其复制出来以进行MobileInstallation进行安装或更新。 MobileInstallation将不会安装符号链接到应用程序捆绑包以外位置的应用程序。

That error usually happens when your app contains a symlink that points outside the app bundle. When building for device or the Simulator, Xcode creates the app bundle, then copies it out for MobileInstallation to do the install or update. MobileInstallation will not install an app that has symlinks to locations outside the app bundle.

您是否有任何特定于模拟器的构建脚本或步骤?您的捆绑包中是否包含任何符号链接?在Xcode中打开产品组。右键单击< name> .app,然后选择在Finder中显示。右键单击该应用程序,然后选择显示包装内容。检查应用程序是否存在任何符号链接。您也可以在终端中打开该目录,然后使用 ls -al 。任何链接的第一个位置都将包含 l 字符。

Do you have any simulator-specific build scripts or steps? Does your bundle contain any symlinks? Open the Products group in Xcode. Right-click on "<name>.app" and select "Show in Finder". Right-click the app and select "Show Package Contents". Examine the app for the presence of any symlinks. You can also open that directory in Terminal and use ls -al. Any links will have an l character in the first position.

另一种可能性是您存在文件权限问题或其他文件系统损坏。运行磁盘实用程序以检查错误。假设一切正常,您可以使用 xcrun simctl全部清除重置模拟器。

The other possibility is you have a file permission problem or other filesystem corruption. Run Disk Utility to check for errors. Assuming everything is OK, you can reset your Simulators with xcrun simctl erase all.

这篇关于Xcode:尝试在iOS模拟器中运行应用程序时出现无效的符号链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆