我正在尝试设置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模拟器)时,一切都可以正常运行。我怎样才能让弗兰克认识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/

10-09 16:17