Deploy to iPhone
Friday, 23 October 2009
Download the SDK
First off hit the Apple Developer Connection website and register for an iPhone Developer Account, you can download the iPhone SDK (weighing in at 2.3gb) without paying the $99 / £59 but if your going to develop for the iPhone and you've got one or an iTouch you might as well do the whole thing. The licence lasts 12 months after which you need to renew each year and you'll get all the cool beta kits.
Once you've registered, paid the money, downloaded the SDK and installed it let's move on.
Certificates
While on the site, you'll need to create your team, get your iPhone device ID registered, then generate your Development certificate and Distribution certificate; along with your provisioning profile files.
Once you've downloaded them, install the Key files (has the .cer extension) into your KeyChain (double-click the downloaded key files); should ask you for your user password to install them in.
Important bit next.
Apple WWDRCA file
Download the Apple World Wide Developer RCA file http://developer.apple.com/certificationauthority/AppleWWDRCA.cer and double-click that to add it to your KeyChain, this should turn your Developer & Distribution certificates green and active.
Check those Certificates
Fire up Keychain Access, select the Login keychain, and My Certificates; you should see your Developer & Distribution iPhone certificates, select them and they should show green ticks with This certificate is valid.
Make sure their trust level is Use System Defaults and they're in the Login keychain, either of these three things don't happen and you won't be able to deploy to your iPhone / iTouch device.
Provisioning Certificates
Another important stage, make sure your iPhone / iTouch is plugged in, fire up XCode and click Window / Organiser; here you'll be able to deploy your provisioning certificates to your device. Select IPhone Development / Provisioning Profiles and drop in your two profile files into here, select Devices and your device and in the central area you should see those two profiles now copied and embedded into your device.
Deploy
Next up with XCode running and your iPhone app built;
- In the drop-down, select the Active SDK to IPhone Device
- In the Groups & Files area, select Target, expand it and select your target file, hit the Info button
- In the Properties tab, make sure your identifier is the same as your AppID, (e.g. com.myself.appname)
- Select the Build tab and scroll down till you see Code Signing Identity and you should see your two active profiles (generated from your certificates + provisioning profiles)
- Select the Developer one for now, close the dialog and hit Build and Run
This will now build your app and send it to your device.
If all goes well, put your feet up, you've just done one of the hardest tasks of IPhone app development; well done!
Cucumber Cheat Sheet
Tuesday, 14 April 2009
install cucumber
sudo gem sources -a http://gems.github.com
sudo gem install cucumber
install webrat
sudo apt-get install libxslt1-dev libxml2-dev
..needed by linux
sudo gem install webrat
In your test_helper.rb or env.rb (for Cucumber) add:
require "webrat"
Webrat.configure do |config|
config.mode = :rails
end
install rspec
sudo gem install rspec rspec-rails
gem dependencies + rake commands
add to: config/environments/test.rb
config.gem "rspec", :lib => false, :version => '>=1.2.2'
config.gem "rspec-rails", :lib => false, :version => '>=1.2.2'
config.gem "webrat", :lib => false, :version => ">=0.4.3"
config.gem "cucumber", :lib => false, :version => '>=0.2.2'
sudo rake gems:install :install gems
sudo rake gems:install RAILS_ENV=test :install gems for [test] env
sudo rake gems:build :build gems needing native extensions
sudo rake gems:unpack :unpack gems
sudo rake gems:unpack GEM=hpricot :unpack specific gem
cucumber commands
script/generate cucumber :setup cucumber in your app
cucumber features -n :test against /features
script/generate rspec_model Article title:string content:text
..generate rspec model + db migrations
rake db:migrate :migrate database
rake db:test:clone :clone migrations to test database
script/generate rspec_controller articles index
..generate rspec controller
webrat commands
script/generate integration_test authentication
..generate integration test 'authentication'
rake test:integration :run integration tests
tutorials
beginning with cucumber
- http://railscasts.com/episodes/155-beginning-with-cucumber
- http://asciicasts.com/episodes/155-beginning-with-cucumber
webrat
look inside the /examples directory for help on specific scenarios
commands
rake features :run this to list each scenarios rake tasks
cucumber --help :list cucumber help
...and no, a cucumber is a fruit, not a vegetable
Colourful Testing
Saturday, 07 March 2009
So I don't forget more than anything, here's how to colourize your testing output in ZenTest (thanks PeepCode)
sudo gem install ZenTest redgreen
Next go into your rails project and create a file called .autotest
gedit ~/.autotest
And add some styling to AutoTest
require 'redgreen/autotest'
Now everytime you're testing, passed tests will be in green and failures will be in red.
Kick off ZenTest with
autotest
More here
10 Dirty Little Web Dev Tricks
Thursday, 12 February 2009
nice article and good pointers...
Quick-Install Django
Sunday, 28 December 2008

Developed four years ago by a fast-moving online-news operation, Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.
Install Latest
Install Guide
svn co http://code.djangoproject.com/svn/django/trunk/ django
cd django
sudo python setup.py install
Check installed ok by doing,
python
import django
If the library was imported ok then Django's installed fine.
Create Project
cd ..
django-admin.py startproject mysite
Creates a new project called mysite
Check the development webserver runs ok with...
cd mysite
python manage.py runserver
..or run on different port
python manage.py runserver 8080
More
Django on Nginx
Quick Link, prefer Nginx over Apache or Lighty so will want to have it under this from day one.
IronRuby (aka Ruby for .NET)
Tuesday, 02 October 2007
With all the talk about this hot new language it seems only right that Microsoft has moved their focus over to the opensource arena with the impending release of IronRuby.
What this is in a nutshell is a plugin to Visual Studio 2005 that allows users to develop Ruby Apps within the VS.NET Dynamic Language Runtime.
They did this a while back with the release of IronPython (Python on .NET), but this is one developer who really hopes the impending Orcas release of Visual Studio has this beauty firmly tied in.
Fingers crossed,









