我在我的 ios 项目中集成了 Alamofire。在使用 XCTest(UITest) 测试我的应用程序时,我遇到了以下问题。我用谷歌搜索并尝试了所有解决方案。但没有得到解决方案。请帮助我解决这个问题.
Library not loaded: @rpath/Alamofire.framework/Alamofire Referenced from: /private/var/mobile/Containers/Bundle/Application/DA4702F0-6A4C-4EB6-99D0-255ABB6E3F57/Real Estate.app/Real Estate Reason: image not found Dyld Version: 353.12
这是我的 podfile。
target 'FreshBoss' do use_frameworks!
# FreshBoss 的 Pod
pod 'Alamofire', '~> 3.4'
pod 'MBProgressHUD', '~> 0.9.2'
pod“Google/登录”
目标“FreshBossTests”执行
inherit! :search_paths
# Pods for testing
pod 'Alamofire', '~> 3.4'
pod 'MBProgressHUD', '~> 0.9.2'
pod 'Google/登录'
结束
目标'FreshBossUITests'做
inherit! :search_paths
# Pods for testing
pod 'Alamofire', '~> 3.4'
pod 'MBProgressHUD', '~> 0.9.2'
pod 'Google/登录'
结束
结束
最佳答案
Embed Pods 框架是这个的原因。UITest -> Buildphases -> 缺少 Embed Pods 框架。从目标复制并将其粘贴到 UITest 目标中。它对我有用。
关于ios - XCTest 中的 Alamofire cocoapod 集成问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38458463/