Archive

Posts Tagged ‘iphone’

Adventures at Open MIC 8

November 7th, 2010 No comments

A couple of weeks ago, a friend of mine in Bath, Julian Cheal, pointed a friend of his, Chris Book my way on Twitter. Chris runs OpenMIC (Mobile Innovation Camp) and was looking for Brighton based mobile developers to meet up with to promote the upcoming OpenMIC 8, held at The Grand Hotel in Brighton on 4th November.

Naturally I invited him down to Brighton to attend the monthly meeting of the Brighton iPhone Creators group and get royally drunk with some fellow mobile devs in The Basketmakers, and equally as naturally Chris agreed.

The next day, slightly worse for wear, Chris and I met for a coffee to chat about life, business and mobile development. During this time I mentioned that I was currently investigating PhoneGap and was intrigued by Titanium as alternatives to native development. I knew very little about them at the time and wanted to learn more. Obviously whatever I said must have inspired Chris for later that day he asked whether I would like to present the result of my investigations at OpenMIC. After some consideration I decided that I would be a fool to pass up the opportunity to speak at a conference for the first time and accepted. I then realised that I had less than two weeks to pull everything together.

In reality, I had even less time than that. With other work commitments and the existing commitment of talking at the Five Pound App that Tuesday to present an app that Ian and I had been working on, it ended up boiling down to one full day and 2 evenings. I had decided to write the same app twice, once in each technology, and compare the results. I wrote the Titanium app on the Sunday afternoon, the PhoneGap app on the Monday evening after a full days work and the presentation on Wednesday.

Luckily for me it all came together (quite late on Wednesday night) and Ian and I rocked up on the Thursday morning at The Grand raring to go. There were 4 talks in the morning session, followed by a developer panel, then after lunch  2 ‘barcamp’ style sessions before the evenings socialising (partly funded by Microsoft).

Up first was Tom Hume of Future Platforms talking about how he felt that using web technologies in mobile app dev was the future. He explained how HTML and CSS were mature technologies that had already solved a lot of the UI problems that were still incredibly difficult to achieve when developing natively and proposed that mixing the two, using HTML where most suitable, and native when tackling more difficult problems, was his ideal.

Then came Stuart Scott, CEO of infohand, who had a lot of commercial experience and knowledge in the mobile world. He explained about the economics of mobile experiences and developing mobile applications and how perhaps using the web in mobile could help reduce the costs of creating engaging applications.

Next up was Mike Ormond, a developer evangelist at Microsoft. Mike showed us Windows Mobile 7, a handset and operating system that had so far been unmentioned when talking about cross platform development. Windows mobile 7 looks fantastic and his argument was that in order to keep the experience fantastic you had to develop specifically for the device, and that meant natively. Despite the talk being centered purely around WM7, I felt that the point stood in relation to all devices.

Finally it was my turn. Mine was the only purely technical talk, showing code. I felt rather embarassed when we got the first page of code and discovered that the colours had washed out totally on the projection and it was very hard to read what it said, but subsequent feedback was that this made me explain the code in a detail which I might otherwise have missed and so made the talk more useful. I learned a valuable lesson about displaying code snippits on projectors. You can view my presentation on SlideShare, download the code at GitHub and read more about it on this blog post.

I got asked to stay up on ‘stage’ for the developer panel which I gladly did. The panel was asked to explain why should a client pay multiple times for an application written natively for many devices, and not just pay once for a mobile website to cover all devices. The general conclusion was that it all came down to that last 5% of polish that makes a good mobile app a fantastic mobile app and that last 5% was far harder to achieve using the mobile web that with native apps.

Somehow I got volunteered to run a barcamp session about PhoneGap and Titanium in the afternoon and also managed to get a good play in with a Galaxy Tab that one of the delegates brought along. After that it was beers and more beers and then curry with beers. All of the delegates that I met were fantastic. So many knowledgable and friendly people and I had lots and lots of fun.

I am now trying to organize my time so that I can make it to the next openMIC on 2nd December in Oxford. Chris, Pinar and co have developed a great conference and I highly recommend that you find the time to go if one happens to pop up in your area in future, or make the effort to attend one somewhere else in the country.

What to build? A dilemma

July 2nd, 2010 7 comments

How do you choose which of your many ideas to pursue? Do you choose the one with the interesting technologies that you want to explore, or do you go for the one that you think would be the most useful?

I am currently suffering from this dilemma in relation to which app I concentrate on as my ‘signature’ app.  If you’ve got time to build one app, in this case an iPhone app, to demonstrate your skill as a programmer to future potential clients, how do you decide what to do? I have 3 choices in this regard:

  1. Hikers footpath planner. A really complex and difficult app that will take a long time to put together but that demonstrates all my skill as a back end developer while also showing an ability to do some nice things with the front end. This app, although sounding ideal, is a risk. I have limited time and the app is complex enough that it might not meet the App Store requirements on stability within the time frame and, with my current dev time limited to evenings and weekends, might not get be completed to the final most impressive stage by the time my (admittedly self imposed) deadline come around. This app has, I believe, a wide audience, but only if done exactly right.
  2. OCR Menu reader and translator. An app that allows me to explore some really interesting technologies and demonstrate some skills with both backend and front end work. The app, however, would be trying to compete directly with another app, Google Goggles. Do I really want to develop in my spare time an app that could potentially be utterly eclipsed by a company who have million of dollars to spend on getting it right?
  3. Open Plaques. An app that demonstrates some back and front end skills and that solves a specific purpose for a group of passionate individuals. This app would provide a service to this group of people that would not only ease the lives of the owners and developers of the Open plaques site but also make is much easier for users of the site to add content. This also will use some of the technologies that would be used in the OCR menu reader.

So I guess the question is, is it better to make something that is popular and useful, or something that shows off my skills but with an uncertain audience or competing against a much more powerful opponent? I can’t help thinking that the popular app, if I add lots of bells a whistles, would be the way to go. I can always work on the hikers app at a later date, for if nothing else I want one even if it never makes it as far as the app store. Maybe I should just take a well learned lesson from Software Development, KISS (Keep It Simple, Stupid). If anyone has any opinions, I would really like to hear them.

Objective Flickr on the iPhone

June 27th, 2010 4 comments

I have been working towards building my very first iphone app, and one of the challenges was to upload some images to Flickr. After much failure to create the signature that the Flickr API requires to authorise requests that flickr would accept, I was pointed towards ObjectiveFlickr, an Objective C library designed to ease the pain of working with the Flickr API.  This is a fantastic tool and has saved me endless headaches, however getting the library to work when in Device mode in XCode is a right pain in the butt. In order to ease any development pains that others might experience when using this library, I will now detail what I did in order to get everything to work.

After downloading the Objective Flickr library from github, I followed the instructions for adding the library to an iphone project as detailed in the documentation. I was most distressed when, after following the install instructions word for word, my app would not build. To check I was doing things correctly, I created a new project just to play around and test ObjectiveFlickr. Here the project built just fine and I could use the libraries with no problems. I went back to my original project, removed ObjectiveFlickr and reinstalled. Again, compilation errors.

"No architectures to compile for (ARCHS=x86_64, VALID_ARCHS=i386)."

As an iphone newbie, the compilation error did not immediately raise any warning flags so I hit our old friend google and tried to find out more about it.  After a bit of digging I found that this was actually the only bug raised against ObjectiveFlickr in the github project.  This is a problem that only raises it’s ugly head using ObjectiveFlickr when building against the device. The reason my test project worked was that it was building against the simulator. If I changed my target to the simulator then the project compiled. However I was using the camera in my app, which does not work in the simulator, so I needed it to work against the device.  The workaround from the ObjectiveFlickr site was this:

Build the objectiveflickr.xcodeproj project with changed settings "Architectures : Standard(32-bit Universal)" and then rebuild the project using objectiveflicr.

Turns out it’s not quite as simple as all that, so here was what I had to do, step by step, to get ObjectiveFlickr working in XCode building against the iphone device 3.1.3:

  1. Open objectiveflickr.xcodeproj in XCode
  2. Go to Project->Edit Project Settings and select the Build tab
  3. Change the Base SDK to iPhone Device 3.1.3
  4. Change the Architecture to ${ARCHS_STANDARD_32_64_BIT}
  5. Change the C/C++ compiler version to GCC 4.2
  6. Rebuild ObjectiveFlickr
  7. Return to your project
  8. Rebuild you project (probably best to Clean All Targets first, just to be on the safe side)

If ObjectiveFlickr does not compile after setting the Base SDK to iPhone Device 3.1.3, return the Base SDK  to Current Mac OS. Changing the compiler version from the LLVM compiler to the GCC compiler was neccessary because once I had recompiled objective flickr against the iphone libraries, when I then recompiled my project it complained that the LLVM compiler was not available.

error: can't exec '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2' (No such file or directory)

Turns out that for iPhone SDK’s 3.1.3 and below at least, the LLVM compiler is not available on the device. It’s available for simulator though, which is annoying to say the least.

This has highlighted to me one very annoying thing that I was not aware of before. Things that compile, build and deploy successfully on the simulator, may not compile build and deploy successfully on the device. Why Apple have not created the simulator to exactly simulate behaviour on the device is beyond me, but now I am aware of it I shall be careful not the be caught out like this again.