Wednesday, May 5, 2010

Certificate has new life!

The certificates expired two days ago for our group, but apple didn't really spend as much time locking down their certificates. Setting the time on the development machines and iPad nano back to a day when they were valid seems to work. I was able to continue development and install the final project on the device.

Sunday, April 25, 2010

A Long weekend

I spent most of the weekend trying to integrate the different parts our group has been working on into a single program. I ran into various problems: Objective-c does not have good static program analysis, and since the machines at school do not have the debug function enabled, I had to go trough trying to figure out what was causing the program to crash. There were some errors caused by trying to cast from one type to another, and other errors caused by trying to call methods that do not exist. Small typos would cause the program to compile but fail at run time.

Our group did manage to get the pieces put together. We will be working on sending the order to the server next.

Friday, April 16, 2010

UI Update

Here is a quick update on the UI --

Selecting a table in edit mode brings up a UIPickerView:

Selecting a Patron in edit mode brings up a window to change the text:

Sunday, April 11, 2010

iOrder interface

I started looking into some of the components of the user interface for the application. I played around with the interface builder and found it to be non-intuitive and difficult to use. I looked trough the iPhone SDK documentation, and found how to implement the user interface without the xib files. I found this approach to be easier to implement.

I updated the source files in kiln with the new UI implementation. The different tabs can now be selected, tables can be added and edited. The program looks almost identical to the mock-up.

Saturday, April 3, 2010

iOrder communication

Group 4 has made some progress in our application. We were able to add the server client code to the application. I created a small wrapper for the c sockets that allows creating and using sockets without having to know much about them. Creating a server is as easy as saying createServer( port ) and for the client createClient ( ip, port ). Communication is done via the methods send ( string ) and recieve ( string ).

I did run into some trouble making the server application multi-threaded. Parameters can't be passed directly to the methods in C. I had to use a struct to pass the parameters around... if we run into problems later, i think switching the server over to java would be the best choice.

I have been uploading my source changes into mercurial. I don't like the interface very much (command line). It would have been nice to have the built in support that xcode has for subversion.

Saturday, February 27, 2010

Aloha POS

I found some useful information about a good Point of Sale program.
Aloha is a widely used program to place orders. link

Maybe our group can find some of the information on the website helpful.

Friday, February 19, 2010


Group 4: iOrder for restaurants. After evaluating the project risk in class, we came up with the following potential risk: Server Client: Can we use the iPod touch to connect to a server? how hard is it? UI Feasibility: Can we create a user interface that is fast enough to place orders? The biggest risk for our group project is that we need to have a server and client. After doing our risk evaluation in class we started to work on trying to tackle this issue. Prof of Concept: I worked on trying to get the iPod touch to communicate with a server. I took some server client code that I used from a previous school project and tried to port it over to the Ipod. This was not as difficult as I expected. The iPhone SDK natively supports c, c++, objective c/c++. The client code I had was written in c++. I was able to copy it into the project in Xcode and have it compile without any modifications. Using the code from objective-c was more difficult. I had to rename the extension of the file that was using the class from *.m to *.mm. After this I could call the c++ code without any problems. I was actually impressed at how objective-c++ can keep track of both objective-c and c++. I had overloaded operators in my clientSocket class and they worked just fine. I was able to connect both the iPod touch and a linux server and send unencrypted data back and forward. I saw a potential problem setting up the server address in the client though. We really don't want people to have to enter the ip address of the server and port number in order to connect to the server. If for some reason the server goes down and comes back with a different address, having to go trough and change many iPod touches to reflect these changes would be a hassle. This got me thinking: iTunes automatically shares music libraries across a network. It does some magic and automatically the libraries of anyone on a network are shared with everyone else. Can our group do this? I looked around the Internet and found out how this magic is done. Apple uses a zeroconf protocol called bonjour. Bonjour locates devices such as printers, other computers, and the services that those devices offer on a local network using multicast Domain Name System service records (source). I was able to broadcast my server on a local network using avahi. Avahi is an open source implementation of bonjour (source). I was able to do it with the following steps in ubuntu: - run my server using port 5555. - create file in /etc/avahi/services/iorder.service with following contents
<?xml version="1.0" standalone='no'?>
  <name>iOrder Server</name>
avahi-deamon will now take care of broadcasting the service. To browse for services using bonjour apple provides the class NSNetServiceBrowser. I had a hard time getting this to work. I am not familiar with objective-c so writing code was very slow. The biggest problem I had was that after discovering a service(by name) it needs to be resolved to get the ip address and port number. When a service is found, the method
(void)netServiceBrowser: ...didFindService ( NSNetService* ) service moreComing: ( BOOL )more
is called and a request needs to be done to resolve the address:
[service resolveWithTimeout:5.0]
but for some reason it can't be called on the service that is being passed by the didFindService method. It needs to be a new service. It took a very long time to figure this out. I spent hours looking at my code and examples trying to figure out why it was not working. I was able to get networking/bonjour working on the prof of concept app. It automagically finds the server and connects to it. It does take a few min to resolve the address and port but these can probably be saved until they are no longer valid. In conclusion, having a server client is not a huge risk, although we will need to be careful moving forward.

Software Ideas

originally posted on Wednesday, February 10, 2010, 06:36 PM

I am still not quite sure on some software ideas. I'm not sure if the ideas I have would help the community.

Here are my ideas so far:

Software program that allows food servers to place orders from the ipod touch. Restaurants usually have a few computers used by the waiters to place orders at most restaurants. I think it would be neat to allow the waiters/waitress to place the order from the ipod touch. Typically waiters need to wait for an open machine to be available to place an order. Sometimes waiters forget what it was the customers wanted since it takes them so long to get an available machine.

Brain Age for the ipod touch. This is a brain activity game created by Nintendo for their NDS consonle. It is a game that allows old people to do simple math and reading exercises to keep their mind sharp. The interface is similar to the ipod touch so it would be feasable to write a

OS update 3.1.3

originally posted on Monday, February 8, 2010, 06:00 PM

I finished setting up the development environment on my machine. I Installed the latest version of xcode, and had to upgrade the iPod touch to the latest version in order to be able to use it for development.

I did the setup on my own machine and found the following issues:
The certificate I got from apple was displaying as being from an untrusted source. I had to install the "WWDR intermediate certificate" from the apple developers website to avoid this.

I was looking around the web trying to find objective-c compilers that do not require a mac and found GNUstep. It allows developing applications using objective-c. This is not a replacement for cocoa and xcode, but it does allow practicing objective-c without having to be on campus.

Software Engineering

I am taking a graduate level Software Engineering class.  We are going to be developing software for the iPod touch.  I am required to maintain a blog... so I decided I could also post them on here.  You'll be hearing from me more often, at least twice a week.  That is what is required :p