Meteor Cordova iOS HCP失败,日志显示PNG文件不存在时已经存在

问题描述 投票:0回答:2

我正在运行meteor run ios-device ...,正在查看Xcode中的日志。我在本地主机上使用热代码推送进行CSS更改,这些更改立即显示在iOS Simulator设备中。我将user_white.png添加到images文件夹,并在css中指向url(...)。我收到了我不理解的错误,因为user_white.png不“已经存在”。即使我停止在Xcode中启动模拟器,该错误仍然存​​在。任何想法这个错误是什么意思?

2018-07-28 12:48:51.511632-0400 Vium[41847:2439935] Download failure:   
Could not link to cached asset: Error Domain=NSCocoaErrorDomain Code=516 
"“user_white.png” couldn’t be linked to “images” because an item
with the same name already exists."
...
NSFilePath=/Users/opx/Library/Developer/CoreSimulator/Devices/6E759135-D5E3- 
4AC0-AF35-92FCC473A61D/data/Containers/Data/Application/D92D9589-4D22-4006- 
8A08-0AC35932E769/Library/NoCloud/meteor/PartialDownload/app/images/user_white.png,
NSUnderlyingError=0x60000024b520 {Error Domain=NSPO
2018-07-28 12:48:51.516594-0400 Vium[41847:2438252] ERROR: 
{"line":36,"column":30,
"sourceURL":"http://localhost:12072/plugins/cordova-plugin-meteor-webapp/www/webapp_local_server.js"}
ios xcode cordova meteor
2个回答
0
投票

更新:这是流星中的错误-有关详细信息,请参见https://github.com/meteor/meteor/issues/10181,尤其是https://github.com/meteor/cordova-plugin-meteor-webapp/issues/56。此问题导致iOS Meteor Cordova热代码推送失败。在导致HCP失败的情况下,下面的答案是不够的,但是在Xcode调试中也会出现问题,如下所述通过停止/启动解决了问题。据记录,此问题的答案是错误消息听起来很令人误解,user_white.png尚不存在对用户有意义的方式。解决方案非常简单:停止Xcode / iOS Simulator,停止在localhost上运行的Meteor服务器,然后重新运行meteor run ios-device ...

服务器端的重新构建以及Xcode中设备客户端的后续重新构建使问题消失了。热代码推送和Xcode设备模拟器的组合显然不能以报告您真正需要了解的方式来处理新的CSS引用图像的添加,即:停止一切并重建应用程序!


0
投票
这是实际答案:该修补程序已合并到cordova-plugin-meteor-webapp插件的流星代码中,因此从该插件的1.7.0版本开始,此问题已解决。有关详细信息,请参见我先前的“答案”中的链接,也请参见https://github.com/meteor/meteor/issues/10277,但它已在流星中修复。
© www.soinside.com 2019 - 2024. All rights reserved.