【发布时间】:2019-03-31 06:18:33
【问题描述】:
使用 NativeScript 如何在 iOS 下运行项目?我在运行 tns run iOS --bundle 时收到这些消息
Webpack compilation complete. Watching for file changes.
Webpack build done!
Copying template files...
Platform ios successfully added. v4.2.0
Executing before-shouldPrepare hook from /Users/Zian/Documents/Projects/NativeScript/Hybrid/hooks/before-shouldPrepare/nativescript-dev-webpack.js
Preparing project...
Executing before-prepareJSApp hook from /Users/Zian/Documents/Projects/NativeScript/Hybrid/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Installing pods...
Analyzing dependencies
Downloading dependencies
Installing Socket.IO-Client-Swift (11.1.3)
Installing StarscreamSocketIO (8.0.7)
Installing Toaster (2.0.4)
[!] Unable to determine Swift version for the following pods:
- `Socket.IO-Client-Swift` does not specify a Swift version and none of the targets (`Hybrid`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
- `StarscreamSocketIO` does not specify a Swift version and none of the targets (`Hybrid`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
- `Toaster` does not specify a Swift version and none of the targets (`Hybrid`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
Unable to apply changes on device: 21FFE2BB-EB0D-48E3-A7AD-28CA08DD21E5. Error is: Command pod failed with exit code 1 Error output:
[!] Automatically assigning platform `ios` with version `8.0` on target `Hybrid` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
有人可以帮帮我吗?
【问题讨论】:
-
已经做了,谢谢
-
消息非常清楚......“请联系作者或在至少一个集成此 pod 的目标中设置
SWIFT_VERSION属性。”有关详细信息,请参阅 cocoapods 文档。 -
确保您的 POD 存储库是最新的,并尝试在大多数情况下修复问题的干净构建。
-
@Manoj 尝试您的解决方案,但仍然没有工作
-
@FauziyyanThafhanRahman 请将答案标记为已接受,如果它解决了您的问题,或者在您的结果中添加另一条评论。
标签: ios swift vue.js cocoapods nativescript