我已多次use_frameworks在CocoaPods中使用过Podfile.我只是想知道为什么要使用它?我无法得到它的直接答案.
例:
platform :ios, '8.0'
use_frameworks!
target "CityWhether" do
pod 'Alamofire'
pod 'SwiftyJSON'
end
Run Code Online (Sandbox Code Playgroud) 当我在手机中运行UITest时,它会安装并作为单独的应用程序运行,同时给出以下错误.
2017-07-27 10:44:33.892639 + 0700 XCTRunner [11886:3502890]正在运行测试... 2017-07-27 10:44:34.137927 + 0700 XCTRunner [11886:3502890]捆绑"... UITests"不能因为它已损坏或缺少必要的资源而无法加载.尝试重新安装捆绑包.2017-07-27 10:44:34.137999 + 0700 XCTRunner [11886:3502890](dlopen_preflight(/ var/containers/Bundle/Application/75C9B589-CCD4-480D-9E23-BA86878E8B37/... UITests-Runner.app/PlugIns /...UITests.xctest/...UITests):未加载库:@ rpath/GoogleToolboxForMac.framework/GoogleToolboxForMac参考自:/ var/containers/Bundle/Application/75C9B589-CCD4-480D-9E23-BA86878E8B37/.. .UITests-Runner.app/PlugIns/... UITests.xctest/... UITests原因:图片未找到)
我试图找到这个问题的解决方案超过一天.
我想将UITests添加到我现有的应用程序中,并将UITest目标添加到我的应用程序中.我正在使用迦太基和可可豆荚.我更新了pod文件和更新的pod,然后我将框架添加到由Carthage安装的UITest目标.
这是我的pod文件
platform :ios, '9.0'
use_frameworks!
target 'ExampleApp' do
pod 'Charts'
pod 'ReachabilitySwift', '~> 3'
pod 'Fabric'
pod 'Crashlytics'
pod 'Google/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
end
target 'ExampleAppTests' do
pod 'Charts'
pod 'ReachabilitySwift', '~> 3'
pod 'Fabric'
pod 'Crashlytics'
end
target 'ExampleAppUITests' do
pod 'Charts'
pod 'ReachabilitySwift', '~> 3'
pod 'Fabric'
pod …Run Code Online (Sandbox Code Playgroud) 我的豆荚在这里
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'myAPP' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for myAPP
pod 'SwiftMessages'
pod 'IQKeyboardManager'
pod 'SwiftKeychainWrapper'
pod 'Tabman'
pod 'PagingMenuController'
pod 'Kingfisher'
pod 'Optik'
pod 'KRPullLoader'
pod 'AlamofireImage'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'TCPickerView'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'Whisper'
pod 'Fabric' …Run Code Online (Sandbox Code Playgroud)