Problems with frankifying my app

62 views
Skip to first unread message

Brant Merryman

unread,
Mar 17, 2015, 3:07:09 PM3/17/15
to frank-...@googlegroups.com
Hi. The app I'm trying to test with Frank is a commercial MacOS X application. The problem I am having is that when do 'frank build --mac", the build does not succeed. The specific error I am getting is link errors on various projects on which my project depends.The project itself has several dependent subprojects.

In trying to address this, I think that I might need to understand how "frank build" works. However, when I look at the "frank" program that is invoked - "which frank" returns /usr/bin/frank - its a ruby script that invokes something else. I don't know ruby, so I'm not sure what its doing exactly. It looks like its trying to load "frank-cucumber".

So, then I did a search on my computer for "frank-cucumber'. I found a directory called "frank-cucumber" which is at /Library/Ruby/Gems/2.0.0/gems/frank-cucumber-1.2.5/lib/frank-cucumber on my machine.

In that directory, I see a bunch of .rb files which I assume are ruby scripts, plus a file called frank.xcconfig.erb. Anyway, I don't know what these things are or how/what they specifically do. Only that it doesn't seem to work with my project.

My project is setup as a workspace file which has several .xcodeproj files in it each of which have several targets which depend on each other.

So, I think my options are:

1. Perhaps someone can tell me what I need to do to make "frank build" work with such an arrangement.
2. Break the dependencies and have build the various components separately and then only frankify my main application.
3. Figure out specifically how "frank build" works and how it (I assume) invokes xcodebuild and then modify it to work with an app like mine.
4. Figure out what "frank build" does to alter the app and setup a "frank" build style myself in Xcode. Pitfall here is that I am not sure I'd be able to setup the other frank tools.

Any advice would be appreciated towards a suggested path forward.


Michael Buckley

unread,
Mar 17, 2015, 3:54:52 PM3/17/15
to frank-...@googlegroups.com
Hi Brant,

By default, "frank build" attempts to build the first xcodeproj file it finds in the current directory. Since you're using a workspace, you'll need to specify a --workspace and --scheme argument to frank build like so.

frank build --workspace YourWorkspace.xcworkspace/ --scheme YourProject

As you surmised, frank build calls a ruby script to generate an xcodebuild command. The actual xcodebuild command is output to the console, so you can see exactly what it's trying to build. If you're interested in the specific ruby code that generates the xcodebuild command, it's lines 76-159 in https://github.com/TestingWithFrank/Frank/blob/master/gem/lib/frank-cucumber/cli.rb

As with any programming problem, posting the exact errors you're encountering makes worlds of difference in solving the problem. Of note, Frank attempts to link in CocoaAsyncSocket, CocoaLumberjack, and CocoaHTTPServer. If your project already links those libraries, you'll get linker errors. There are flags you can pass to frank setup ( --without-cocoa-http-server --without-cocoa-async-socket and --without-cocoa-lumberjack ) which will generate an xcconfig file that does not attempt to link those libraries. This xcconfig file is used by the frank build command.

--
You received this message because you are subscribed to the Google Groups "Frank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to frank-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brant Merryman

unread,
Mar 17, 2015, 5:27:08 PM3/17/15
to frank-...@googlegroups.com
Hi Michael,


Thank you. I really appreciate your response.

So, I just tried using my workspace. Here is what happened when I tried that.

brantm$ frank build --workspace VyprVPN.xcworkspace --scheme VyprVPN --mac
You don't appear to have set up a Frank directory for this project. Would you like me to set that up now? Type 'y' or 'yes' if so. y
ERROR: frank skeleton was called with arguments ["--workspace", "VyprVPN.xcworkspace", "--scheme", "VyprVPN", "--mac"]
Usage: "frank skeleton".

Do you have any advice as to how I should setup frank for the workspace?

Michael Buckley

unread,
Mar 17, 2015, 5:31:17 PM3/17/15
to frank-...@googlegroups.com
It sounds like you haven't yet run "frank setup". I recommend doing so before running "frank build".

The "frank setup" command created a directory named "Frank" next to your project file. The "You don't appear to have set up a Frank directory for this project" error is noting the absence of this directory. 

Brant Merryman

unread,
Mar 17, 2015, 5:34:49 PM3/17/15
to frank-...@googlegroups.com
Just to follow up, I seem to be much closer now.

I went into the folder where the xcodeproj file for my main application was located and did a setup from there. Then returned to the folder with the workspace and ran "frank build --workspace VyprVPN.xcworkspace --scheme VyprVPN --mac" again. 

Now I have only a few remaining link errors which I think I know how to solve.

Thanks so much for your help.

Brant Merryman

unread,
Mar 17, 2015, 5:52:42 PM3/17/15
to frank-...@googlegroups.com
When I run frank setup in the folder with the workspace file, it will crash, but before it crashes it appears to do the setup correctly.

I was able to get a successful build using frank setup in my xcodeproj folder and then again the workspace folder after explicitly adding a framework (CoreServices) my app had been linking to somehow implicitly.

Then building with --workspace, etc. worked.

Brant Merryman

unread,
Mar 17, 2015, 6:09:03 PM3/17/15
to frank-...@googlegroups.com
So, now when I try "frank launch" it is not launching my app, but instead launching my uninstaller.

I started by going into the folder where my app's .xcodeproj resides, then doing frank setup and choosing the target for my main application. Then I went to where the workspace was located and did frank setup again which resulted in a crash.

Then I did frank build --workspace <workspace> --scheme <myapp> --mac

This caused the build to succeed. However, it appears that it build my uninstall app as the "frankified" app rather than my main app. Could this be due to the crash when doing frank setup from the workspace folder?


This is the output from running frank setup in the folder where my workspace lives:









brantm$ frank setup


      create  Frank


      create  Frank/features/my_first.feature


      create  Frank/features/step_definitions/launch_steps.rb


      create  Frank/features/support/env.rb


      create  Frank/frank_static_resources.bundle/ViewAttributeMapping.plist


      create  Frank/frank_static_resources.bundle/ViewAttributeMappingMac.plist


      create  Frank/frank_static_resources.bundle/images/ajax-loader.gif


      create  Frank/frank_static_resources.bundle/images/file.gif


      create  Frank/frank_static_resources.bundle/images/folder-closed.gif


      create  Frank/frank_static_resources.bundle/images/folder.gif


      create  Frank/frank_static_resources.bundle/images/loader.gif


      create  Frank/frank_static_resources.bundle/images/loader.png


      create  Frank/frank_static_resources.bundle/images/minus.gif


      create  Frank/frank_static_resources.bundle/images/plus.gif


      create  Frank/frank_static_resources.bundle/images/treeview-black-line.gif


      create  Frank/frank_static_resources.bundle/images/treeview-black.gif


      create  Frank/frank_static_resources.bundle/images/treeview-default-line.gif


      create  Frank/frank_static_resources.bundle/images/treeview-default.gif


      create  Frank/frank_static_resources.bundle/images/treeview-famfamfam-line.gif


      create  Frank/frank_static_resources.bundle/images/treeview-famfamfam.gif


      create  Frank/frank_static_resources.bundle/images/treeview-gray-line.gif


      create  Frank/frank_static_resources.bundle/images/treeview-gray.gif


      create  Frank/frank_static_resources.bundle/images/treeview-red-line.gif


      create  Frank/frank_static_resources.bundle/images/treeview-red.gif


      create  Frank/frank_static_resources.bundle/index.html


      create  Frank/frank_static_resources.bundle/index.html.haml


      create  Frank/frank_static_resources.bundle/js/accessible_views_view.coffee


      create  Frank/frank_static_resources.bundle/js/accessible_views_view.js


      create  Frank/frank_static_resources.bundle/js/controller.coffee


      create  Frank/frank_static_resources.bundle/js/controller.js


      create  Frank/frank_static_resources.bundle/js/details_view.coffee


      create  Frank/frank_static_resources.bundle/js/details_view.js


      create  Frank/frank_static_resources.bundle/js/dropdown_control.coffee


      create  Frank/frank_static_resources.bundle/js/dropdown_control.js


      create  Frank/frank_static_resources.bundle/js/ersatz_model.coffee


      create  Frank/frank_static_resources.bundle/js/ersatz_model.js


      create  Frank/frank_static_resources.bundle/js/ersatz_view.coffee


      create  Frank/frank_static_resources.bundle/js/ersatz_view.js


      create  Frank/frank_static_resources.bundle/js/experiment_bar_model.coffee


      create  Frank/frank_static_resources.bundle/js/experiment_bar_model.js


      create  Frank/frank_static_resources.bundle/js/experiment_bar_view.coffee


      create  Frank/frank_static_resources.bundle/js/experiment_bar_view.js


      create  Frank/frank_static_resources.bundle/js/frank.coffee


      create  Frank/frank_static_resources.bundle/js/frank.js


      create  Frank/frank_static_resources.bundle/js/lib/backbone.js


      create  Frank/frank_static_resources.bundle/js/lib/coffee-script.js


      create  Frank/frank_static_resources.bundle/js/lib/jquery-ui.min.js


      create  Frank/frank_static_resources.bundle/js/lib/jquery.min.js


      create  Frank/frank_static_resources.bundle/js/lib/jquery.treeview.js


      create  Frank/frank_static_resources.bundle/js/lib/json2.js


      create  Frank/frank_static_resources.bundle/js/lib/raphael.js


      create  Frank/frank_static_resources.bundle/js/lib/require.js


      create  Frank/frank_static_resources.bundle/js/lib/underscore.js


      create  Frank/frank_static_resources.bundle/js/main.coffee


      create  Frank/frank_static_resources.bundle/js/main.js


      create  Frank/frank_static_resources.bundle/js/tabs_controller.coffee


      create  Frank/frank_static_resources.bundle/js/tabs_controller.js


      create  Frank/frank_static_resources.bundle/js/toast_controller.coffee


      create  Frank/frank_static_resources.bundle/js/toast_controller.js


      create  Frank/frank_static_resources.bundle/js/transform_stack.coffee


      create  Frank/frank_static_resources.bundle/js/transform_stack.js


      create  Frank/frank_static_resources.bundle/js/tree_view.coffee


      create  Frank/frank_static_resources.bundle/js/tree_view.js


      create  Frank/frank_static_resources.bundle/js/view_hier_model.coffee


      create  Frank/frank_static_resources.bundle/js/view_hier_model.js


      create  Frank/frank_static_resources.bundle/js/view_model.coffee


      create  Frank/frank_static_resources.bundle/js/view_model.js


      create  Frank/frank_static_resources.bundle/pictos/index.html


      create  Frank/frank_static_resources.bundle/pictos/pictos-web.eot


      create  Frank/frank_static_resources.bundle/pictos/pictos-web.svg


      create  Frank/frank_static_resources.bundle/pictos/pictos-web.ttf


      create  Frank/frank_static_resources.bundle/pictos/pictos-web.woff


      create  Frank/frank_static_resources.bundle/pictos/pictos.css


      create  Frank/frank_static_resources.bundle/pictos/pictos_base64.css


      create  Frank/frank_static_resources.bundle/stylesheets/css/symbiote.css


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_elements.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_header.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_inspect_tabs_list_tabs.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_jquery.treeview.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_jqui.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_layout.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_mixins.sass


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_reset.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_selector_test_toolbar.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_solarized.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_typography.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_unicode.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/_z_index.scss


      create  Frank/frank_static_resources.bundle/stylesheets/sass/symbiote.scss


      create  Frank/frankify.xcconfig


      create  Frank/libCocoaAsyncSocket.a


      create  Frank/libCocoaAsyncSocketMac.a


      create  Frank/libCocoaHTTPServer.a


      create  Frank/libCocoaHTTPServerMac.a


      create  Frank/libCocoaLumberjack.a


      create  Frank/libCocoaLumberjackMac.a


      create  Frank/libFrank.a


      create  Frank/libFrankMac.a


      create  Frank/libShelley.a


      create  Frank/libShelleyMac.a


      create  Frank/plugins


/Library/Ruby/Gems/2.0.0/gems/frank-cucumber-1.2.5/lib/frank-cucumber/frankifier.rb:54:in `decide_on_project': There are no .xcodeproj files in this directory. Please move to your root project directory and try again. (RuntimeError)


        from /Library/Ruby/Gems/2.0.0/gems/frank-cucumber-1.2.5/lib/frank-cucumber/frankifier.rb:21:in `frankify!'


        from /Library/Ruby/Gems/2.0.0/gems/frank-cucumber-1.2.5/lib/frank-cucumber/frankifier.rb:9:in `frankify!'


        from /Library/Ruby/Gems/2.0.0/gems/frank-cucumber-1.2.5/lib/frank-cucumber/cli.rb:48:in `setup'


        from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'


        from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'


        from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'


        from /Library/Ruby/Gems/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'


        from /Library/Ruby/Gems/2.0.0/gems/frank-cucumber-1.2.5/bin/frank:5:in `<top (required)>'


        from /usr/bin/frank:23:in `load'


        from /usr/bin/frank:23:in `<main>'



Michael Buckley

unread,
Mar 17, 2015, 6:50:57 PM3/17/15
to frank-...@googlegroups.com
There's a couple things that could be happening here. When you specify your --scheme, it should be a scheme that builds only the app to be Frankified, and no other apps. If it's building your uninstaller app as well, both will appear in the builds folder, and Frank won't know which one to use. It picks one arbitrarily, and in this case, seems to be picking the uninstaller. Running "frank build clean" in each directory with a Frank folder is recommended to remove any apps that may already be in your frank output directory.

Second, the frank folder needs to be in the same folder as your .xcodeproj file, and that's also where you need to run your "frank setup", "frank build", and "frank launch" commands from. You only need a Frank directory next to your .xcodeproj file. The other Frank directory is not needed.

Brant Merryman

unread,
Mar 18, 2015, 11:12:34 AM3/18/15
to frank-...@googlegroups.com
Thank you so much. I was able to remove the uninstall as a dependency and now it launches my app.

I really appreciate all of your help with this. I'm so excited to be learning about frank.
...
Reply all
Reply to author
Forward
0 new messages