更新到 IOS 11 后在 IOS 模拟器上运行错误 - Ionic 3 [英] Error run on IOS emulator after update to IOS 11 - Ionic 3

查看:16
本文介绍了更新到 IOS 11 后在 IOS 模拟器上运行错误 - Ionic 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到IOS 11后,命令

After update to IOS 11, command

ionic cordova run ios -lc --target="iPhone-6"

ionic cordova run ios -lc --target="iPhone-6"

我有错误

** 构建成功 **

找不到iPhone 6"的可用运行时.[错误] 一个错误运行 cordova run ios --target iPhone-6 时发生(退出代码1).

No available runtimes could be found for "iPhone 6". [ERROR] An error occurred while running cordova run ios --target iPhone-6 (exit code 1).

命令后的模拟器列表

ios-sim 显示设备类型

ios-sim showdevicetypes

Apple-TV-1080p, tvOS 11.0
Apple-TV-4K-4K, tvOS 11.0
Apple-TV-4K-1080p, tvOS 11.0
Apple-Watch-38mm, watchOS 4.0
Apple-Watch-42mm, watchOS 4.0
Apple-Watch-Series-2-38mm, watchOS 4.0
Apple-Watch-Series-2-42mm, watchOS 4.0
Apple-Watch-Series-3-38mm, watchOS 4.0
Apple-Watch-Series-3-42mm, watchOS 4.0
iPhone-5s, 11.0
iPhone-6, 11.0
iPhone-6-Plus, 11.0
iPhone-6s, 11.0
iPhone-6s-Plus, 11.0
iPhone-7, 11.0
iPhone-7-Plus, 11.0
iPhone-SE, 11.0
iPhone-8, 11.0
iPhone-8-Plus, 11.0
iPhone-X, 11.0
iPad-Air, 11.0
iPad-Air-2, 11.0
iPad--5th-generation-, 11.0
iPad-Pro--9-7-inch-, 11.0
iPad-Pro, 11.0
iPad-Pro--12-9-inch---2nd-generation-, 11.0
iPad-Pro--10-5-inch-, 11.0

但是在命令之后

cordova 模拟 ios --list

cordova emulate ios --list

模拟器列表为空

Available iOS Simulators:
MacBook-Air-apple:Snaptofix2 apple$

请帮忙.

推荐答案

这是您使用(或者更好地说是 ionic)仍然是旧版本的 ios-sim npm 包的问题.随着苹果在 iOS 11(和平台)中更改模拟器.

Here is problem that you are using (or better say ionic) still old version of ios-sim npm package. As apple changed simulators in iOS 11 (and platform).

解决方法是使用最新的ios-sim(2017年9月22日有效,下周应该会发布正式版).所以这意味着只需更新 ios-sim 包.

Solution is to use latest ios-sim (this is valid for 22.09.2017, next week should be release a official version). So this would be mean just update ios-sim package.

今天,你需要使用最新"版本.

Today, you need to use "latest" version.

喜欢:

cd platforms/ios/cordova && npm install ios-sim@latest

这里也是未解决的问题:https://github.com/phonegap/ios-sim/issues/218

Here is also open issue: https://github.com/phonegap/ios-sim/issues/218

其他选择是将整个 ios 平台升级到适当的版本(对于 iOS 11,您至少需要 4.5.0):

Other option is to upgrade the whole ios platform to a proper version (for iOS 11 you need at least 4.5.0):

cordova platform add ios@4.5.0

(小心先删除平台!)

这篇关于更新到 IOS 11 后在 IOS 模拟器上运行错误 - Ionic 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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