我开始遇到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
。