首页 > 解决方案 > SpriteKit NSTimeInterval 重命名

问题描述

我正在尝试在我的项目中使用 SpriteKit,但在安装并打开项目后,我收到 28 个错误。我试图将“NSTimeInterval”重命名为“TimeInterval”,但没有成功。我正在使用 Xcode 9.3

这是我的 Podfile:

platform :ios, '9.0'

target 'Aaa' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Aaa
    pod 'SpriteKit-Spring'
end

我收到这些错误(27 个相同 - 'NSTimeInterval' 已重命名为 'TimeInterval'): 错误列表截图

解决方案: 在 Podfile 中有这一行:

pod 'SpriteKit-Spring', :git => 'https://github.com/ataugeron/SpriteKit-Spring/'

标签: iosswiftxcodesprite-kitcocoapods

解决方案


SpriteKit-Spring 还没有更新到 Swift 4,至少没有更新到发布的 pod。有关解决方法,请参阅 https://github.com/ataugeron/SpriteKit-Spring/issues/12


推荐阅读