Permalink
Browse files

clean up documentation

  • Loading branch information...
1 parent a0023a4 commit bfe175a3f9a6b673a6837b84cd082d16a7164e1d @textarcana textarcana committed Mar 14, 2010
Showing with 78 additions and 72 deletions.
  1. +78 −72 README.md
View
150 README.md
@@ -1,74 +1,6 @@
-## Driving Brominet from a Ruby process
-
-First, to see Brominet in action, take a look at the Cucumber
-functional tests for iPhone that
-[Ian Dees presented at OSCON 2009](http://www.oscon.com/oscon2009/public/schedule/detail/8073).
-
-### Instant gratification: test drive the JustPlayed example app
-
-If you just want to test drive Brominet, you can follow the instructions in
-[my fork.](http://github.com/textarcana/justplayed/doc/install)
-
-### Getting Brominet to work with YOUR app
-
-I'm using
- [**my fork of the JustPlayed example application**](http://github.com/textarcana/justplayed)
- as an example. **The procedure outline here is the same for any app
- into which you've installed Brominet.**
-
-If you build and start the simulator with
-[**my fork of the JustPlayed example application**](http://github.com/textarcana/justplayed),
-then you should notice a new service running on port 50000. You can
-then control the app in the simulator, by sending chunks of XML over
-HTTP. This is all handled by Ian's `encumber.rb` library.
-
-### Remote-controlled iPhone apps
-
-If you build the Brominet-enabled app onto an iPhone, then you can
-control the iPhone over a wi-fi network.
-
-To find your iPhone's IP address, follow these instructions.
-
-1. Assuming you are already connected to a wi-fi network, go to Settings > Wi-Fi.
-
-2. Tap the name of the network to which you are currently connected (the one with a check mark next to
-it).
-
-3. In the DHCP tab, note the IP address of your device.
-
-4. Assuming your computer is connected to the same wi-fi network, you
-can now connect to the Brominet Web service on your iPhone, on port
-50000.
-
-### Test-driving Brominet from the IRB
-
-Here is how to use the IRB to call the app directly and dump the
-XML of the GUI. Type or paste the following 3 commands into the IRB.
+# Getting Brominet to work with YOUR app
- load 'lib/encumber.rb'
-
- @gui = Encumber::GUI.new 'localhost'
-
- File.open('encumber_gui.xml', 'w') {|f| f.write(@gui.dump) }
-
-Then open `encumber_gui.xml` in an XML editor like Firefox or XML
-Spy. Once you work out which XPaths correspond to the buttons in your
-app, you can start tapping buttons using `Encumber::GUI#press`
-
- @gui.press '//xpath/to/button'
-
-If you have deployed a Brominet-enabled app on an iPhone, then you can
-use the same procedure to connect to it.
-
- @gui = Encumber::GUI.new '10.0.1.23'
-
-Finally, if you start the the
-[IRB](http://mislav.uniqpath.com/poignant-guide/book/expansion-pak-1.html)
-in the root of my fork of JustPlayed, then you can use the convenience
-methods that are implemented in
-[**my `.irbc` file**](http://github.com/textarcana/justplayed/blob/master/.irbrc).
-
-# Integrating Brominet into your own application
+How to go about integrating Brominet into your own applications.
It is recommended to look at
[**JustPlayed**](http://github.com/textarcana/justplayed) in order to
@@ -120,7 +52,7 @@ Do a "Get Info" on the brominet Brominet target, and in Build section, do the fo
4. make sure GCC_C_LANGUAGE_STANDARD is c99 or gnu99
-### Include the dependencies in project
+## Include the dependencies in project
Now update the app delegate with some ifdefs. The easiest way to see
which files are required, may be to look at the app delegate in
@@ -136,7 +68,10 @@ Do a "Get Info" on the brominet Brominet target, and in Build section, do the fo
3. add the ifdef stop the server and garbage collect, to `AppDelegate.m`
-## Troubleshooting
+## Troubleshooting your Brominet installation
+
+Because Brominet is integrated with your app, it's important to be
+aware of all the dependencies for both Brominet and your own code.
### ASIHTTPRequest and Reachability.h versions
@@ -145,6 +80,76 @@ since upgraded the Reachability library to 2.0, and [ASIHTTPRequest now supports
version is backward compatible, be aware that newer applications may
already be including Reachability 2.0.
+## Driving Brominet from a Ruby process
+
+First, to see Brominet in action, take a look at the Cucumber
+functional tests for iPhone that
+[Ian Dees presented at OSCON 2009](http://www.oscon.com/oscon2009/public/schedule/detail/8073).
+
+### Instant gratification: test drive the JustPlayed example app
+
+If you just want to test drive Brominet, you can follow the instructions in
+[my fork.](http://github.com/textarcana/justplayed/doc/install)
+
+I'm using
+ [**my fork of the JustPlayed example application**](http://github.com/textarcana/justplayed)
+ as an example. **The procedure outline here is the same for any app
+ into which you've installed Brominet.**
+
+If you build and start the simulator with
+[**my fork of the JustPlayed example application**](http://github.com/textarcana/justplayed),
+then you should notice a new service running on port 50000. You can
+then control the app in the simulator, by sending chunks of XML over
+HTTP. This is all handled by Ian's `encumber.rb` library.
+
+### Remote-controlled iPhone apps
+
+If you build the Brominet-enabled app onto an iPhone, then you can
+control the iPhone over a wi-fi network.
+
+To find your iPhone's IP address, follow these instructions.
+
+1. Assuming you are already connected to a wi-fi network, go to Settings > Wi-Fi.
+
+2. Tap the name of the network to which you are currently connected (the one with a check mark next to
+it).
+
+3. In the DHCP tab, note the IP address of your device.
+
+4. Assuming your computer is connected to the same wi-fi network, you
+can now connect to the Brominet Web service on your iPhone, on port
+50000.
+
+### Test-driving Brominet from the IRB
+
+Here is how to use the IRB to call the app directly and dump the
+XML of the GUI. Type or paste the following 3 commands into the IRB.
+
+ load 'lib/encumber.rb'
+
+ @gui = Encumber::GUI.new 'localhost'
+
+ File.open('encumber_gui.xml', 'w') {|f| f.write(@gui.dump) }
+
+Then open `encumber_gui.xml` in an XML editor like Firefox or XML
+Spy. Once you work out which XPaths correspond to the buttons in your
+app, you can start tapping buttons using `Encumber::GUI#press`
+
+ @gui.press '//xpath/to/button'
+
+If you have deployed a Brominet-enabled app on an iPhone, then you can
+use the same procedure to connect to it.
+
+ @gui = Encumber::GUI.new '10.0.1.23'
+
+Finally, if you start the the
+[IRB](http://mislav.uniqpath.com/poignant-guide/book/expansion-pak-1.html)
+in the root of my fork of JustPlayed, then you can use the convenience
+methods that are implemented in
+[**my `.irbc` file**](http://github.com/textarcana/justplayed/blob/master/.irbrc).
+
+
+
## Sources
1. <http://code.google.com/p/bromine/wiki/UsingBromine>
@@ -157,3 +162,4 @@ already be including Reachability 2.0.
See also <http://delicious.com/thefangmonster/brominet>
+

0 comments on commit bfe175a

Please sign in to comment.