Jim*_*one 5 frameworks objective-c objective-c++ cocoapods
在我的项目中,我引用了我公司使用的几个私有pod.其中一个称为DKKit的pod依赖于另一个我称为BaseProKit的私有pod.BaseProKit包含3个框架,它在其头部和实现文件中引用,我认为这些框架被认为是vendored_frameworks.在BaseProKit的现有头文件中,通过导入引用了这些框架,这些框架#import <PPCommon/PPCommon>在编译时工作得很好(通常),而仅依赖于BaseProKit pod.但是,当包含DKKit时,DKKit会在导入BaseProKit.h包含上述导入的导入时查找标题别名.然而,在DKKit的上下文中,似乎DKKit pod不知道PPCommon框架的存在,并且它只看到它的头文件的别名通过Pods-BaseProKit引用.因此,任何和所有引用<PPCommon/ANYTHING>创建编译错误(未找到),以及我迄今为止唯一能够弄清楚的方法是只#import "PPCommon.h"需要通过引用来调整整个BaseProKit中的所有导入项目,这感觉不对.
我已经包含以下文件供参考:BaseProKit的Podspec:
  s.name         = "BaseProKit"
  s.version      = "1.0.5"
  s.source_files = "BaseProKit/BaseProKit.h",
                   "BaseProKit/Data/*.{h,m}",
                   "BaseProKit/Sensor Calibration/*.{h,m}",
                   "BaseProKit/SP3D/BaseballSceneController/*.{h,m}",
                   "BaseProKit/SP3D/SceneElements/*.{h,m,hpp,cpp}",
                   "BaseProKit/SP3D/SceneEnvironment/*.{h,m}",
                   "BaseProKit/Third Party/DeviceModelDetector.{h,m}",
                   "BaseProKit/Third Party/SkyProKitEmptyMMFile.{h,mm}"
  s.resources = "BaseProKit/SatelliteLibrary/SatelliteLibrary.bundle","BaseProKit/SP3D/SP3DResources.bundle", "BaseProKit/SP3D/Models/Vertex Data/*"
  s.frameworks = "GLKit", "OpenGLES", "Foundation", "UIKit", "Accelerate", "PPCommon", "SatelliteLibrary", "SP3D"
  s.library = 'c++'
  s.prefix_header_file = "BaseProKit/BaseProKit-Prefix.pch"
  # s.public_header_files = "BaseProKit/PPCommon/PPCommon.framework/Headers/*.h", "BaseProKit/SatelliteLibrary/SatelliteLibrary.framework/Headers/*.h", "BaseProKit/SP3D/SP3D.framework/Headers/*.h"
  s.vendored_frameworks = "BaseProKit/PPCommon/PPCommon.framework",
                          "BaseProKit/SatelliteLibrary/SatelliteLibrary.framework",
                          "BaseProKit/SP3D/SP3D.framework"
Run Code Online (Sandbox Code Playgroud)
DKKit的Podspec:
    s.name          = "DKKit"
    s.version       = "1.0.0"
    s.source_files  = 'DKKit/**/*.{h,m}'
    s.resources = 'DKKit/**/*.xcdatamodeld'
    s.dependency 'PromiseKit/Promise', '~> 1.3.0'
    s.dependency 'MBProgressHUD', '~> 0.9.1'
    s.prefix_header_contents = '#import "NSDictionary+Merge.h"'
    s.frameworks = 'CoreData'
    s.dependency 'BaseProKit', '~> 1.0.5'
    s.dependency 'SwingAnalysisKit', '~> 1.0.0'
Run Code Online (Sandbox Code Playgroud)
我的项目的Podfile:
pod 'SwingAnalysisKit', :git => "https://swing-analysis-kit-URL", :branch => "develop"
pod 'BaseProKit', :git => "https://base-pro-kit-URL", :branch => "develop"
pod 'DKKit', :git => "https://DKKit-URL", :branch => "develop"
Run Code Online (Sandbox Code Playgroud)
有没有什么我可以在我的podspec文件(特别是BaseProKit中的一个)中做不同的事情,以确保这些框架可以作为 Pod本身之外的框架(而不仅仅是它们的头文件)引用?
将此复制到Cocoapods/Cocoapods存储库也是一个问题:https: //github.com/CocoaPods/CocoaPods/issues/3810
CocoaPods 存储库上提出了许多与此相关的问题 -例如1824、3161。我相信它已在 0.38.0.beta.1 中修复 -
添加了对沙箱中自动链接的供应商框架的公共标头的递归支持。这修复了包含子目录的框架头目录的问题。托德·凯西 #3161
供应商框架的公共标头现在会自动链接到沙箱中。这允许传递包含其他 Pod 的标头。文森特·伊桑巴特 #3161
来源:变更日志
|   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           822 次  |  
        
|   最近记录:  |