Frank(iOS验收测试框架)找不到Alamofire
Frank (iOS acceptance testing framework) can't find Alamofire
我正在尝试设置 Frank 来测试我的 iOS 应用程序。我关注了 this tutorial but I get errors when I run frank build
. The full output can be found 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。这是我的播客文件:
# 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/
我正在尝试设置 Frank 来测试我的 iOS 应用程序。我关注了 this tutorial but I get errors when I run frank build
. The full output can be found 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。这是我的播客文件:
# 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/