简体   繁体   中英

podspec validation error when pod lib lint

Here is my podspec configuration

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

run this command getting this errors

  • ERROR | xcodebuild: /Users/sourov08/Library/Developer/Xcode/DerivedData/App-bbthnzgzgpswrxfepjqmoltfojki/Build/Products/Release-iphonesimulator/GoogleDriveBrowser/GoogleDriveBrowser.framework/Headers/SDGDTableViewController.h:10:9: error: include of non-modular header inside framework module 'GoogleDriveBrowser.SDGDTableViewController': 'Headers/Public/Google/Google/SignIn.h' [-Werror,-Wnon-modular-include-in-framework-module]

I have found the answer from a chiness blog

solved with forward declaration in my public header file instead of

@import GoogleSignIn; instead of #import <Google/SignIn.h>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM