pod lib lint时podspec验证错误

时间:2018-03-20 13:55:15

标签: ios cocoapods

这是我的podspec配置

Pod::Spec.new do |s|
s.name             = 'GoogleDriveBrowser'
  s.version          = '0.1.0'
  s.summary          = 'A short description of GoogleDriveBrowser.'

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                   DESC

  s.homepage         = 'https://github.com/sourovsuet@gmail.com/GoogleDriveBrowser'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'name' => 'something@gmail.com' }
  s.source           = { :git => 'https://github.com/something@gmail.com/GoogleDriveBrowser.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '8.0'

  s.source_files = 'GoogleDriveBrowser/Classes/**/*'

  s.platform     = :ios, '9.0'

  s.static_framework = true
  s.dependency 'GoogleAPIClientForREST/Drive', '~> 1.2.1'
  s.dependency 'Google/SignIn', '~> 3.0.3'

  s.resources = "Resources/**/*"

  s.public_header_files = 'GoogleDriveBrowser/Classes/SDGDTableViewController.h'
end

运行此命令获取此错误

  
      
  • 错误| xcodebuild:/Users/sourov08/Library/Developer/Xcode/DerivedData/App-bbthnzgzgpswrxfepjqmoltfojki/Build/Products/Release-iphonesimulator/GoogleDriveBrowser/GoogleDriveBrowser.framework/Headers/SDGDTableViewController.h:10:9:   错误:在框架模块中包含非模块化头   &#39; GoogleDriveBrowser.SDGDTableViewController&#39 ;:   &#39;页眉/公共/谷歌/谷歌/ SignIn.h&#39;   [-Werror,-Wnon模块化-包括功能于框架模块]
  •   

1 个答案:

答案 0 :(得分:0)

我找到了chiness blog

的答案

在我的公共头文件而不是

中使用前向声明解决
@import GoogleSignIn; instead of #import <Google/SignIn.h>