由于`未声明的类型:xxx`

时间:2016-10-06 15:53:51

标签: objective-c swift cocoapods

我正在转换'将Xcode框架转换为Cocoapod。我已经深入了解这个过程,但是我无法让pod变成lint。它是一个混合项目,使用ObjC和Swift,但它在Xcode中构建得很好,但不是通过lint,这让我觉得涉及Cocoapods的东西很棘手。

错误:

    - ERROR | [OSX] xcodebuild:  EonilFileSystemEvents/EonilFileSystemEvents/FileSystemEventMonitor.swift:17:43: error: use of undeclared type 'EonilFileSystemEventFlag'
    - ERROR | [OSX] xcodebuild:  EonilFileSystemEvents/EonilFileSystemEvents/FileSystemEventMonitor.swift:89:28: error: use of undeclared type 'EonilJustFSEventStreamWrapper'
    - ERROR | [OSX] xcodebuild:  EonilFileSystemEvents/EonilFileSystemEvents/FileSystemEventMonitor.swift:63:15: error: use of unresolved identifier 'EonilJustFSEventStreamWrapper'
    - ERROR | [OSX] xcodebuild:  EonilFileSystemEvents/EonilFileSystemEvents/FileSystemEventMonitor.swift:138:14: error: use of unresolved identifier 'NSStringFromFSEventStreamEventFlags'

EonilFileSystemEvents.podspec:

#
#  Be sure to run `pod spec lint rebekka.podspec' to ensure this is a
#  valid spec and to remove all comments including this before submitting the spec.
#
#  To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
#  To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |s|
  s.name         = "EonilFileSystemEvents"
  s.version      = "0.0.4"
  s.summary      = "Dead-simple access to FSEvents framework for Swift."
  s.description  = "Provides dead-simple access to FSEvents framework for Swift by Hoon H."

  s.homepage     = "https://github.com/128keaton/FileSystemEvents"
  s.license      = "MIT License"
  s.author       = "Hoon H"
  s.frameworks = 'CoreServices', 'EonilFileSystemEvents'

  s.requires_arc  = true

  s.osx.deployment_target = "10.10"
  s.source        = { :git => "https://github.com/128keaton/FileSystemEvents", :tag => "0.0.4" }
  s.source_files  = "EonilFileSystemEvents/*.{h,m}"
  s.source_files  = 'EonilFileSystemEvents/*.swift'

end

项目: https://github.com/128keaton/FileSystemEvents

1 个答案:

答案 0 :(得分:0)

使用:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<html>
  <body>
    <div id="VCBody">
      <div class="vcElementContainer">1</div>
      <div class="vcElementContainer">2</div>
    </div>
  </body>
</html>

而不是:

s.source_files  = "EonilFileSystemEvents/*.{h,m}", 'EonilFileSystemEvents/*.swift'`