gpt4 book ai didi

ios - Frank(iOS验收测试框架)找不到Alamofire

转载 作者:行者123 更新时间:2023-11-28 05:29:39 25 4
gpt4 key购买 nike

我正在尝试设置 Frank 来测试我的 iOS 应用程序。我关注了this tutorial但是当我运行 frank build 时出现错误。可以找到完整的输出 here .我得到的主要错误是:

CompileSwift normal i386 /Users/paymahn/Documents/Lunchr/Lunchr/Lunchr/LoginViewController.swift
cd /Users/paymahn/Documents/Lunchr/Lunchr
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/paymahn/Documents/Lunchr/Lunchr/Lunchr/LoginViewController.swift /Users/paymahn/Documents/Lunchr/Lunchr/Lunchr/RegisterViewController.swift /Users/paymahn/Documents/Lunchr/Lunchr/Lunchr/HomePageViewController.swift /Users/paymahn/Documents/Lunchr/Lunchr/Lunchr/ViewController.swift /Users/paymahn/Documents/Lunchr/Lunchr/Lunchr/AppDelegate.swift /Users/paymahn/Documents/Lunchr/Lunchr/Lunchr/CurrentUser.swift -target i386-apple-ios7.0 -target-cpu yonah -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -I /Users/paymahn/Documents/Lunchr/Lunchr/build/Debug-iphonesimulator -F /Users/paymahn/Documents/Lunchr/Lunchr/build/Debug-iphonesimulator -F /Users/paymahn/Documents/Lunchr/Lunchr/build/Debug-iphonesimulator/Pods-Lunchr -F /Users/paymahn/Documents/Lunchr/Lunchr/build/Debug-iphoneos/Pods-Lunchr -g -D COCOAPODS -Xcc -I/Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Lunchr-generated-files.hmap -Xcc -I/Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Lunchr-own-target-headers.hmap -Xcc -I/Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Lunchr-all-target-headers.hmap -Xcc -iquote -Xcc /Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Lunchr-project-headers.hmap -Xcc -I/Users/paymahn/Documents/Lunchr/Lunchr/build/Debug-iphonesimulator/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/DerivedSources/i386 -Xcc -I/Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -emit-module-doc-path /Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Objects-normal/i386/LoginViewController~partial.swiftdoc -Onone -module-name Lunchr -emit-module-path /Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Objects-normal/i386/LoginViewController~partial.swiftmodule -serialize-diagnostics-path /Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Objects-normal/i386/LoginViewController.dia -emit-dependencies-path /Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Objects-normal/i386/LoginViewController.d -o /Users/paymahn/Documents/Lunchr/Lunchr/build/Lunchr.build/Debug-iphonesimulator/Lunchr.build/Objects-normal/i386/LoginViewController.o
/Users/paymahn/Documents/Lunchr/Lunchr/Lunchr/LoginViewController.swift:10:8: error: no such module 'Alamofire'
import Alamofire

我使用 CocoaPods 安装了 Alamofire。这是我的 Podfile:

# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
use_frameworks!
target 'Lunchr' do
pod 'SwiftHTTP', :git => "https://github.com/daltoniam/SwiftHTTP.git", :tag => "0.9.1"
pod 'SocketRocket'
pod 'Socket.IO-Client-Swift', '~> 1.1'
pod 'Alamofire', '~> 1.1'
pod "SwiftyJSON", ">= 2.1.3"
end

target 'LunchrTests' do
pod 'SwiftHTTP', :git => "https://github.com/daltoniam/SwiftHTTP.git", :tag => "0.9.1"

end

值得一提的是,当我正常运行我的应用程序(通过 iOS 模拟器)时,一切都完美无缺。我怎样才能让 Frank 认出 Alamofire?

最佳答案

这可能是因为您正在使用 CocoaPods 并且没有为 frank build 提供工作区和方案参数。这是人们在尝试使用 Frank 和 CocoaPods 时遇到的常见问题。

如果是这种情况,您的问题可能与

How do I install Frank when my project is using Cocoapods?

有关详细信息,请参阅此页面。

http://blog.thepete.net/blog/2012/10/16/frank-with-cocoapods/

关于ios - Frank(iOS验收测试框架)找不到Alamofire,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29308922/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com