防止出现“ Podfile包含框架目标...”警告

Bad*_*Cat 5 xcode ios cocoapods

每当我执行以下操作时pod install,都会收到此警告:

[!] Podfile包含框架目标,但Podfile不包含主机目标(嵌入框架的目标)。如果该项目用于框架开发,则可以忽略此消息。否则,将目标添加到嵌入这些框架的Podfile中,以使此消息消失(例如,测试目标)。

我的项目是针对框架开发的,警告说我可以忽略它,但是我讨厌不需要警告的东西出现的警告,那么是否有任何解决方法可以消除此警告?

我的Podfile看起来像这样:

workspace 'myworkspace.xcworkspace'
platform :ios, '10.0'

target 'framework' do
    use_frameworks!
    project 'framework/framework.xcodeproj'
    pod 'Alamofire', '~> 4.5', :inhibit_warnings => true
    pod 'Serpent', '~> 1.0', :inhibit_warnings => true
end

target 'demo-objc-uitests' do
    use_frameworks!
    inherit! :search_paths
    project 'demo-objc/demo-objc.xcodeproj'
    pod 'Alamofire', '~> 4.5', :inhibit_warnings => true
    pod 'Serpent', '~> 1.0', :inhibit_warnings => true
    pod 'myframework', :path => 'myframework.podspec'
end

target 'demo-swift-uitests' do
    use_frameworks!
    inherit! :search_paths
    project 'demo-swift/demo-swift.xcodeproj'
    pod 'Alamofire', '~> 4.5', :inhibit_warnings => true
    pod 'Serpent', '~> 1.0', :inhibit_warnings => true
    pod 'myframework', :path => 'myframework.podspec'
end
Run Code Online (Sandbox Code Playgroud)