Control rails application from Iphone's cucumber - iphone

I'm using Frank to test my iPhone app's features.
The iPhone app is synchronizing data from a rails application and I would like to cover the synchronization process with acceptance tests.
I would like to be able to use the standard ruby commands to manage my rails application's data for example creating a table of products in rails app and then i can check that it gets synchronized on the iPhone.
How can i configure cucumber (or Frank) so i can use Product.find_by_name("productname") from my iphone's tests?

I ended up hacking this together:
https://gist.github.com/2033123
Stick it in Frank/features/support
I'm not a great Rails dev so someone could probably clean it up but it works for our purposes.

Related

Where can I find out about coding a website to my app?

I just found out that an iPhone can act as a web server to access the app's data. I'm using Xcode. How do I extend my app's capabilities so that users can edit app data using a Mac. Where can I learn about this? Can you give me summary and a website please?
I hope it's using Apache Tomcat. I suppose I have to build a website to process and display the app's data. I wonder if iPhone supports jsp since it's using UNIX. I really don't want to use PHP.
Currently Money Manager has that feature.
Searching for embedded iOS web server returns a few solutions:
Run a webserver on an iOS device
A small, lightweight, embeddable HTTP server for Mac OS X or iOS applications
Lightweight GCD based HTTP server for OS X & iOS
You will be unlikely to fit php or tomcat onto an iOS device; the lack of memory and processing power will be technically challenging.
Apple will also likely take a negative view of the inclusion of a general purpose scripting language in any app your submit to the App Store.

iphone test tool for uiwebview

I'm looking for a iphone test tool which has big support for uiwebview. Because I'm making a hybrid app, basically make a native shell and render a website inside the uiwebview of my app. I need a tool to help me test the user interaction with the website. So when the other people change the website, they can run this test first to make sure their changes don't screw my stuff. I checked couple of popular iphone test tools, they don't have a good support on uiwebview. Is there any recommendation? Thanks!
Fonemonkey has inbuilt support for selenium, if you can write a selenium script for your hybrid web app and use fonemonkey to run them i guess it is quite possible to do the testing.
hey one more thing, fonemonkey is now replaced with monkey talk, try that out,
http://www.360logica.com/360logica-social/blog/item/123-monkey-talk-for-ios-set-up
monkey talk website: http://www.gorillalogic.com/testing-tools/monkeytalk

Running iOS Apps on Flash

I wrote an app for iOS on iPhone and iPad. I would like to make the app (a children's game) I wrote available on my website through Flash. I don't know if this is possible...
Would I just have to write the application in another language? I can't find any tools that would help me make it available.
If you wrote your app in HTML5, then you can make it available to your website, but if written with obj C, I highly doubt there is any easy way out solution beside re-write the app in another language.
There are no tools to make an iOS application run through Flash Player.
Probably your best bet on writing an application that will run as a native app and within the web is to pursue writing a web application optimized for smartphones. This way you could use a UIWebView to run it within a native application (and thus still have it in the App Store) but also make it available via the web. You could even consider leveraging tools like Phonegap to help with this. But of course this means re-writing your application.

Client-server web app with both client AND server running on iPhone - is this possible?

I'd like to build a simple native iPhone app with tools traditionally used for web apps.
I would prefer to use something like jQTouch and Rails, but I want it to work offline (not require an internet connection or a server).
Is there a framework that enables simple creation of native iOS aps by encapsulating a lightweight web server and a server-side app framework (Rails or something simpler and more lightweight that can run on a phone), thus allowing you to write the client side code in HTML+JavaScript ?
If there is not such a thing, is there a way to create an app (with HTML+JS) that basically only has a client-side component with persistent data storage?
Thanks.
Have you tried Phonegap?
www.phonegap.com
You write your app in HTML/CSS/JavaScript.
You access the phones APIs through JavaScript - boom!
Also; Appcelerator Titanium would be an option: http://www.appcelerator.com/
-IMO Titanium is more powerful, and offers a more native look.
Why would you want to run a webserver off of the iPhone?
Is it so that you could send back data to the mothership?
Yes, you can included a lightweight http server running in another thread inside your iPhone app, and have your UIWebView connect to it. But unless you are going to do a fancier web server that generates dynamic content, it might be easy to just download your HTML/CSS/Javascript content to a local directory, and then point any URLs to those local files when offline.

How to Use PHP in IPhone Applications

I need to create an iPhone application using Facebook.
The facebook FBConnect API supports FQL which is similar to SQL Queries.
I would be able to create the application easily using PHP as compared to Objective-C.
So if there is any way to create an iPhone application using PHP please reply to me.
Thanks.
Well, if you are developing something for jailbroken devices , yes it is possible to use PHP (you have to install it first from Cydia).Also note that you should implement a SQLite database if your app/script needs database functionality (you can't run a MySQL server natively on iPhone ATM).
But, as pekka mentioned, this is a really bad idea, because you must set up first a lighttpd web server on iPhone (not really comfortable), or if you're planing to implement a CLI PHP script, you should first launch it (using some C functions like pipe(), dup2(), fork(), execl()) and then parse its output inside your -not-so-Objective-C- iPhone app.
So think it again...