Get Updates By E-mail 

github

Open Source: Real-Time Congress App Phonegap And Native Source Code

  •  
  •  
  •  
  •  
  •  

As you may have noticed I like to keep a list on this site of open source ios apps.

Earlier I received a submission of the url to an open source iPhone app that updates on what is happening at the US congress in real time, and provides access to data about members of the US Congress.

Politics aside, it provides an example of an app that retrieves and organizes data from an online source, and there is also a Phonegap version if you are looking for any html/javascript enthusiasts out there looking for a starting point trying to build with Phonegap.

You can find the source code for the newer native version here:
https://github.com/sunlightlabs/realtimecongress-ios

The source code for the previous Phonegap version can be found here:
https://github.com/sunlightlabs/real_time_congress-iphone_html

You can find the app on iTunes here.

I’ll be adding it to the list of open source apps soon.


  •  
  •  
  •  
  •  
  •  

Open Source: Behavioral Driven Development Testing Framework

  •  
  •  
  •  
  •  
  •  

For those unfamiliar with the term behavioral driven development testing (BDD) frameworks are used so that you can test applications using logical English like syntax.

I have come across an open source  framework designed specifically for iOS devices.   What’s cool about this specific framework is that it can easily be attached to Objective-C methods, runs in the simulator, and let’s you store your different stories in different files so you could easily demonstrate your software’s ability to cope with different scenario’s.

Here’s an example of the types of a story used for testing:

Story: Example story showing the basic syntax.
Given Simon is working
Then I should be able to see abc and 5 in the log and say goodby at the end.

The framework is known as Simon, and was created by Derek Clarkson.

It can be found on Github here:
https://github.com/drekka/Simon

UPDATE: Got feedback about another framework known as Kiwi you may want to check out if this interests you.

I had never used one of these frameworks before, but it looks like a great way to illustrate an app does exactly what it should do. HKSAB58YGFWN


  •  
  •  
  •  
  •  
  •  

Open Source: UITableView Replacement With Swipeable Cells

  •  
  •  
  •  
  •  
  •  

You have probably noticed this in a few apps such as the Twitter app – you swipe a cell in a UITableView and it then disappears revealing new content.

I’ve come across a UITableView replacement that provides this functionality complete with animation effect so you can provide the impression that the user is uncovering hidden content.  Overall it is a very cool effect, and is great for those times when you only want the cell to a lead to a small amount of content rather than navigate to an entirely different view.

The library is TISwipeableTableView from Tom Irving and comes with a sample project demonstrating how implement the library.  It can be found on Github here:
https://github.com/thermogl/TISwipeableTableView

I can think of several places where this library would have been useful wish I’d found it earlier!


  •  
  •  
  •  
  •  
  •  

iPhone Balloon Game Programming Tutorial: Adding Retina Display Support

  •  
  •  
  •  
  •  
  •  

I have had several requests for updates to the iPhone action game programming tutorial, and among them was an update for retina display support.  So here is the process step-by-step for those looking to add retina display support to a game made with the Sparrow Framework.

This update goes through the process of creating the new images for the game, and updating the source code so that the images display at high resolution on the retina display.

Fortunately the Sparrow Framework makes it very easy for us to do this, and handles most of the required programming automatically.

Project Files

You can download the project files leading up to this tutorial here.

You can download the project including the HD images and retina display support here.

For those who prefer Github you can find the project here, the completed project is in the 7-BalloonGameTutorial folder.

Step 1 – Making The Images

Since my initial images were created for the smaller iPhone display size I needed to scale them up to twice their original size.

I decided to use a tool called SmillaEnlarger to do this, a free open source tool that uses a fractal algorithm to scale up images. In my testing it has actually done better on the types of images (non-photos) that I need to scale up, and the end result looks considerably better than using any of the filters built into Photoshop. I have even seen it stated that SmillaEnlarger provides better results than expensive Photoshop plugins.

You can find SmillaEnlarger here.

You simply drag and drop the images with enlargement selected and a scale of 200%. In order to use the larger display support of the Sparrow Framework you will need to add @2x to the name of your images.

In my settings with SmillaEnlarger for non-photographis I simply turned all the extra adjustments down to zero.

Do that for each image in the project.  After doing that I suggest re-saving the images after opening them in preview, not essential, but SmillaEnlarger tends to make oversized files.

Step 2 – Add Images Into The Xcode Project

For this step you can simply drag all the created images into the Xcode project under resources where all the original files are.

You can also add the images by ctrl-clicking and then selecting add resources, select the images, and import them into the project.

Step 3 – Turn On High Resolution Support In Game

The Sparrow Framework simply requires you to add one line of code at this point into the applicationDidFinishLaunch: method of your app delegate.

So open up BalloonGameTutorialAppDelegate.m, and in the first line within the applicationDidFinishLaunching: method add:

[SPStage setSupportHighResolutions:YES;

Your applicationDidFinishLaunching: method should now look similar to this:

- (void)applicationDidFinishLaunching:(UIApplication *)application {

// Enable retina display support
[SPStage setSupportHighResolutions:YES];

SP_CREATE_POOL(pool);

Game *game = [[Game alloc] initWithWidth:320 height:480];
sparrowView.stage = game;
[sparrowView start];
[window makeKeyAndVisible];
[game release];

[SPAudioEngine start];

SP_RELEASE_POOL(pool);
}

Now Build and Run the project, and you should be able to see the game running in retina display mode, I added the words High Definition to the images included with the project to illustrate that the new higher definition images are indeed displaying.  You can also select Window->Scale->100% to make your simulator display 1:1 for the iPhone’s resolution which makes it excessively large, but allows you to easily see HD is indeed working.

Conclusion

If you cannot see the words high definition you may have the retina screen turned off in the simulator, which means that in the Mac OS X menu you need to make sure Hardware->Device->Phone (Retina) is selected.

That is all there is to it, it is a very painless process with the Sparrow Framework.

The first tutorial in this series can be found here:
iPhone Balloon Game Programming Tutorial

You might be wondering why I didn’t pack the images using texture packer like in the Sparrow Framework’s tutorial on hd support.  My reason for that is simply because we’re still adding images to the project, and rather than pack the images over and over again we will do that when we add the finishing touches to the project.

In the next tutorial we will add menus to the game.


  •  
  •  
  •  
  •  
  •  

Open Source: Restkit Library For Easier Communication With RESTful Web Services

  •  
  •  
  •  
  •  
  •  

Communicating web services can be a pain on iOS.  Some of the Cocoa classes for web communication are not available which doesn’t help.  Fortunately there are a number of open source projects that have made things easier for communicating with web services in Objective-C.

One such project is Restkit, and what Restkit provides is a very high level framework for communicating with RESTful services.  Restkit works on the iOS and Mac OS X platforms.  What really makes Restkit different from the similar projects out there is simpler usage syntax, and direct integration with Core Data so you can easily persist remotely loaded objects locally.

There are some great examples on Git included with Restkit demonstrating usage with a message board built in Ruby on Rails, an example of how to communicate with Twitter, and a step by step tutorial demonstrating commonly used functionality.

You can find the homepage of Restkit here:
Restkit

The Github project can be found here:
https://github.com/RestKit/RestKit

Looks like a great framework for those looking to integrate Restful web services into their apps as quickly as possible.

Read More: Open Source iOS Libraries And Tools


  •  
  •  
  •  
  •  
  •