简体   繁体   English

iOS Project在模拟器,物理设备上运行,但无法为“ iOS设备”构建或归档

[英]iOS Project runs on simulator, physical device, but can't build or archive anymore for “iOS Device”

To distribute test builds via TestFlight, I select "iOS Device" in the scheme, then click in the menu Product, Archive. 要通过TestFlight分发测试版本,我在方案中选择“ iOS设备”,然后单击菜单产品,存档。 This all of a sudden stopped working with the error message: 这突然停止了处理错误消息:

When I try Product, Build, I get the same message. 当我尝试产品,构建时,会收到相同的消息。 I restarted my computer, auto-recreated the schemes, checked SDK settings and they look fine to me. 我重新启动计算机,自动重新创建了方案,检查了SDK设置,它们对我来说看起来不错。 I loaded up a different project, and it archived fine. 我加载了一个不同的项目,并将其存档。 Here are the product and target build settings (they are the same): 以下是产品和目标构建设置(它们相同):

在此处输入图片说明

My only guess is that a file may have gotten corrupted, because I didn't manually change any of these settings. 我唯一的猜测是文件可能已损坏,因为我没有手动更改任何这些设置。 Just editing code. 只是编辑代码。

EDIT: After I wrote this question, I left my computer for 10 minutes. 编辑:写完这个问题后,我离开计算机10分钟。 Upon my return, I tried to build and archive just for the heck of it and it worked. 回国后,我尝试仅出于构建目的而对其进行构建和归档,并且该方法行之有效。 I don't know what to say... 我不知道该说些什么...

EDIT 2: This is happening again and would like to get to the bottom of this. 编辑2:这是再次发生,并想深入了解这一点。

After this happening a few times, I figured out the issue. 几次发生之后,我发现了问题所在。 When my iPhone is hooked up to my Mac and tethering is on, this problem occurs. 当我的iPhone连接到Mac并启用网络共享时,就会出现此问题。 When I turn tethering off, or disconnect the phone, I can archive again. 当我关闭网络共享或断开电话连接时,我可以再次存档。 Not sure why this, but I hope it helps someone at some point. 不知道为什么会这样,但是我希望它在某些时候能对某人有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM