nativescript - 获取 ios [Nativescript] 的新构建错误
问题描述
我开始为 ios 收到此构建错误
一切正常,然后我做了一个干净的构建并开始获取它。
有什么帮助吗?
Xcode build...
warning: Stale file '/Users/pandora/Projects/my-app/platforms/ios/build/sharedpch/SharedPrecompiledHeaders/11778268195216239247/ccsmobile-Prefix.pch.gch' is located outside of the allowed root paths.
warning: Stale file '/Users/pandora/Projects/my-app/platforms/ios/build/sharedpch/SharedPrecompiledHeaders/4227383043813640198/ccsmobile-Prefix.pch.gch' is located outside of the allowed root paths.
/Users/pandora/Projects/my-app/platforms/ios/Pods/Toast-Swift/Toast/Toast.swift:359:37: error: 'init(style:)' has been renamed to 'init(activityIndicatorStyle:)'
let activityIndicatorView = UIActivityIndicatorView(style: .whiteLarge)
^ ~~~~~
activityIndicatorStyle
UIKit.UIActivityIndicatorView:5:12: note: 'init(style:)' was introduced in Swift 4.2
public init(style: UIActivityIndicatorViewStyle)
^
/Users/pandora/Projects/my-app/platforms/ios/Pods/Toast-Swift/Toast/Toast.swift:388:47: error: 'common' has been renamed to 'RunLoopMode.commonModes'
RunLoop.main.add(timer, forMode: .common)
^~~~~~
RunLoopMode.commonModes
Foundation.RunLoop.Mode:9:23: note: 'common' was introduced in Swift 4.2
public static let common: RunLoopMode
^
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
/Users/pandora/Projects/my-app/platforms/ios/Pods/MaterialShowcase/MaterialShowcase/MaterialShowcase+Calculations.swift:43:20: warning: result of call to 'insetBy(dx:dy:)' is unused
expandedBounds.insetBy(dx: -expandedRadius, dy: -expandedRadius);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
** BUILD FAILED **
解决方案
如果您需要为插件设置特定的 Swift 版本...
在 App_Resources/iOS 文件夹中创建一个名为“Podfile”的文件
post_install do |installer|
installer.pods_project.targets.each do |target|
puts "Pods target name :" + target.name
if ['Toast-Swift'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
end
替换Toast-Swift
为您的插件名称。
推荐阅读
- android - Android WebView 设置自定义标头
- c# - 如何为领域模型中的 IList 属性使用 setter 选项 (get; set; )?
- javascript - 正则表达式 URL javascript
- corda - corda观察者节点不能补发现金吗?
- python - 来自不同类的调用函数会给出 TypeError: missing 1 required positional argument
- docker - 在 Ubuntu 16.04 docker 上为带有 GPU 的主机运行 Julia 时出错
- android - react-native assembleRelease 无法生成 app-release.apk
- html - 嵌套的 Mat-dialogBox 关闭问题
- jquery - Jquery Datatable 按钮在具有动态列的表中的空值的情况下不起作用
- javascript - momentjs isValid 在应该为真时返回假,反之亦然