【问题标题】:Alamofire cocoapod integration issue in XCTestXCTest 中的 Alamofire cocoapod 集成问题
【发布时间】:2016-11-22 08:16:09
【问题描述】:

我已经在我的 ios 项目中集成了 Alamofire。在使用 XCTest(UITest) 测试我的应用程序时,我遇到了以下问题。我已经用谷歌搜索并尝试了所有解决方案。但没有得到解决方案。请帮我解决这个问题.

库未加载:@rpath/Alamofire.framework/Alamofire 引用自:/private/var/mobile/Containers/Bundle/Application/DA4702F0-6A4C-4EB6-99D0-255ABB6E3F57/Real Estate.app/Real Estate 原因:图片未找到 Dyld 版本:353.12

这是我的 podfile。

目标'FreshBoss' 做 使用_frameworks!

#FreshBoss 的豆荚

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/登录'

结束

target 'FreshBossUITests' 做

inherit! :search_paths

# Pods for testing

pod 'Alamofire', '~> 3.4'

pod 'MBProgressHUD', '~> 0.9.2'

pod 'Google/登录'

结束

结束

【问题讨论】:

  • 您的Podfile 的副本会有所帮助。您可能只需将inherit! :search_paths 添加到Podfile 中的测试目标中
  • 发布您的podfile。我会尽力帮忙的。
  • 我已经编辑了我的问题。请看一下
  • @Hodson - 我已经添加了那行。

标签: ios xcode cocoapods alamofire xctest


【解决方案1】:

Embed Pods framework 是这个原因。UITest -> Buildphases -> 缺少嵌入 Pods 框架。从目标复制并将其粘贴到 UITest 目标中。它对我有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-07-20
    • 1970-01-01
    • 2018-01-09
    • 1970-01-01
    • 2018-06-24
    • 1970-01-01
    • 2013-10-17
    • 2023-03-14
    相关资源
    最近更新 更多