1

I'm trying to set up Frank to test my iOS app. I've followed this tutorial but I get errors when I run frank build. The full output can be found here. The main error I get is:

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

I have Alamofire installed using CocoaPods. Here's my 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

For what it's worth, when I run my app normally (through the iOS simulator) everything works flawlessly. How can I get Frank to recognize Alamofire?

Paymahn Moghadasian
  • 9,301
  • 13
  • 56
  • 94
  • I literally lol'd at the title of your question. It's a bit ... misleading, don't you think? I'm speaking for those who don't know what Frank is. – Vatsal Manot Mar 27 '15 at 19:42
  • 1
    Didn't even realize. Now that you point it out I'm laughing too. I've updated the title to make my problem a bit more apparent ;) – Paymahn Moghadasian Mar 27 '15 at 19:48
  • @PaymahnMoghadasian are you currently using frank with swift in your iOS app or objective-c? I'm actually trying to figure out the best cucumber/gherkin compliant framework to use in iOS.. and frank seems poorly maintained (only two merges in the last year.. not cool > https://github.com/TestingWithFrank/Frank/commits/master).. do you recommend it? – abbood Apr 26 '16 at 08:09
  • the sample app in the tutorial you wrote @PaymahnMoghadasian has a deployment target of 3.0... :| – abbood Apr 26 '16 at 08:20

1 Answers1

2

This is probably because you're using CocoaPods and aren't supplying workspace and scheme arguments to frank build. This is a common problem people run into when trying to use Frank and CocoaPods.

If that's the case, your question is possibly a duplicate of

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

See this page for more details.

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

Community
  • 1
  • 1
Michael Buckley
  • 4,095
  • 1
  • 26
  • 23