2
Pod::Spec.new do |s|

  s.name         = "CommonFramework"
  s.version      = "1.0.0"
  s.summary      = "Egova iOS Common Framework"

  s.description  = <<-DESC
               数字政通iOS客户端框架模块

               DESC

  s.homepage     = "http://www.egova.com/"
  s.license      = "Copyright 2015 egova.com"

  s.author             = { "huawei.zheng" => "zhhw_dev@163.com" }

  s.platform     = :ios, "8.0"

  s.source       = { :git => "git://192.168.32.168/ios_commonframework.git", :tag => s.version.to_s}

  s.resources = 'Images/*.png', 'CommonFramework/ProgressHUD/ProgressHUD.bundle'

  s.ios.deployment_target   = '8.0'

  s.compiler_flags = '-w'

 non_arc_files = ['CommonFramework/3rd/JSONKit/*.{h,m}',    'CommonFramework/Network/ASIHTTPRequest/*.{h,m}']

 s.default_subspec = 'All'
 s.subspec 'All' do |spec|
    spec.ios.dependency 'CommonFramework/NonARC'
    spec.ios.dependency 'CommonFramework/ARC'
 end

 s.subspec 'NonARC' do |nonarc|
   arc_header = "CommonFramework/**/*.h", "CommonFramework.h", "CommonDef.h", "CommonImg.h"
  nonarc.source_files = non_arc_files + arc_header
  nonarc.compiler_flags = '-fno-objc-arc'
  nonarc.frameworks = 'CoreGraphics', 'Foundation', 'UIKit', 'ImageIO', 'CFNetwork', 'CoreTelephony','SystemConfiguration','MobileCoreServices'
  nonarc.libraries = 'z', 'c++','sqlite3.0', 'xml2.2'
  nonarc.requires_arc = false
 end
  s.subspec 'ARC' do |arc|
    arc.source_files  = 'CommonFramework/**/*.{h,m}', 'CommonFramework.h', 'CommonDef.h', 'CommonImg.h'
    arc.public_header_files = 'CommonFramework/**/*.h', 'CommonFramework.h', 'CommonDef.h', 'CommonImg.h'
    arc.exclude_files = non_arc_files
    arc.prefix_header_file = 'CommonFramework/CommonFramework-Prefix.pch'

    arc.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'}
  arc.frameworks = 'CoreGraphics', 'Foundation', 'UIKit', 'ImageIO', 'CFNetwork', 'CoreTelephony','SystemConfiguration','MobileCoreServices'
  arc.libraries = 'z', 'c++', 'sqlite3.0', 'xml2.2'
  arc.requires_arc = true
end
end

这是 mu podspec,当我使用 pod lib lint --verbose 时,它​​给了我这样的错误:

 | [iOS] [CommonFramework/ARC] xcodebuild:  /Users/huawei.zheng/workspace/git/ios_commonframework/CommonFramework/Network/WebService/HttpClientZY.m:13:9: fatal error: 'ASIFormDataRequest.h' file not found

所有文件都在文件夹中。并且 ASIFormDataRequest 是一个非弧文件。HttpClientZY 是一个弧文件。为什么我的 podspec 是错误的???

4

0 回答 0