ios - XCTest 中的 Alamofire cocoapod 集成问题

标签 ios xcode cocoapods alamofire xctest

我在我的 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/

相关文章:

ios - 在 Swift 框架中导入和使用 Google SignIn iOS SDK

ios - 通过 .podspec 文件创建 .framework

ios - Cocoapods 0.39.0更新错误

swift - 如何使用 Swift 2.3 和 3.0 编译模块?

ios - 使用swift对日期进行排序

ios - CrashLytics 在初始化后打印一些日志消息,并通过电子邮件发送崩溃日志

ios - Parse.com - 将指针从用户类设置为安装类

ios - 使用 NSPredicate 过滤具有对象属性的查询结果

ios - texturecube 和 texture3d 的区别

ios - 如何使用 Xamarin 在 iOS 的 NavigationController 中更改 1 个字符的标题文本颜色