Google Map API Performance

June 30, 2009 § 2 Comments

I am summarizing a session on Google Map API Performance here. This help you to evaluate using Google Map for iphone app.

Google JavaScript Map API

The total sequence of loading the script and resources is about 4.6 sec on avg web. However, it takes 18 sec to load on Android and iphone.

JavaScript library is 220 KB unzipped. It takes more than 4 sec to parse the API on iphone. Since engineers can’t reduce the codebase size after modularizing classes, Google map team decides to create Google Map API v3.

This v3 offers a few features – markers, infowindows, geocoding.

On v2 GMarker class is designed for features not for performance. Each marker is consisting of up to 5 divs. To show 10,000 GMarkers, you are loading 50,000 DOM nodes in the browser.

Google extends GOverlay class to create a custom lightweight marker. This MakerLight, overlay contains only 2 divs per marker.

Google Flash API is faster in rendering but it suffers from a slow DOM.


Adding External Accessory Framework

June 30, 2009 § Leave a comment

Documentation is not very accurate on where the ExternalAccessory.framework is located.

It is not located in “/System/Library/Frameworks/ExternalAccessory.framework”. It is found in “/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks”.

iPhone External Accessory Framework

June 30, 2009 § 2 Comments

External Accessory framework is a very new addition to SDK 3.0. It is still a under documented area where there is no code examples offered by Apple.

  • Add ExternalAccessory.framework to Xcode project
  • Add the following lines to any relevant source files .m

#import <ExternalAccessory/ExternalAccessory.h>

Hardware requirement

  • accessory must support at least 1 command protocol
  • decide to use custom protocols or standard protocols supported by other manufacturers
  • to prevent namespace conflicts, protocol names are specified as reverse-DNS strings of the form
  • manufacturers can define as many protocols
  • use a specific protocol to open a session to accessory
  • create an instance of EASession class
  • EASession class contains NSInputStream and NSOutputStream objects
  • Your app use these stream objects to send raw data packets in receive and send mode
  • must understand expected format of each data packet based on the protocol

Declare the protocols external accessory support in Info.plist file. This declaring support allow system to launch your app when the accessory is connected.

If no app supports the connected accessory, the system may launch the App Store and direct you to the app that support it.

  • Include UISupportedExternalAccessoryProtocols key in Info.plist file
  • This key contains an array of strings that identify the communication protocols your app supported
  • include any no. of protocols in this list in any order
  • system uses this list to determine if your app is capable of communicating with the accessory

Shared EAAccessoryManager object offers the main entry point for applications looking to communicate with accessories. This class contains an array of connected accessory objects such as EAAccessoary object such as name, manufacturer, model information for display purposes.

For a given accessory object, only one session is allowed for a specific protocol. The protocolStrings property of each EAAccessory object contains a dictionary whose keys are ths supported protocols.

After input and output streams are configured, the final step is to process the stream-related data. App doesn’t have to wait for an event before it can write bytes to the stream. It can call the stream’s hasBytesAvailable method to see if the accessory is still able to receive data.

External Accessory framework won’t send notifications when it is connected or disconnected automatically. Your app must call registerForLocalNotifications method in EAAccessoryManager class. Framework sends an EAAccessaryDidConnectNotification notification when an accessory is connected. It sends an EAAccessoryDidDisconnectNotification notification when an accessory is disconnected.

You’ll receive notifications using NSNotificationCenter by default. Delegate objects can handle EAAccessoryDelegate protocol with optional accessoryDidDisconnect: method.


Introduction to Stream Programming Guide for Cocoa

How to use AdWhirl Ad Network

June 27, 2009 § Leave a comment

Adding Ad Aggregate AdWhirl is easier if you can follow it step by step. Ad Aggregate is designed to optimize by rotating your Ad Network.

  • Add the AdWhirl SDK libraries into your project. 4 files (ARRollerProtcol.h, ARRollerView.h, libAdWhirlDevice.a, libAdWhirlSimulator.a) in the “AdWhirl” folder
  • Add supporting frameworks required by all supported Ad Networks. In addition to the defaulted UIKit.framework, Foundation.framework, CoreGraphics.framework, add the following frameworks.
    • AddressBook.framework
    • CoreLocation.framework
    • QuartzCore.framework
    • SystemConfiguration.framework
    • libsqlite3.dylib
    • libxml2.dylib
    • libz.dylib
  • Quattro Wireless requires that the ObjC flag is included under the “Other Linkers Flag” setting. App “Get Info” on Build tab 1) Set the configuration mode to “All Configurations” 2) Enter “ObjC” on Other Linker Flags section. ObjC is CASE-SENSITIVE. Capital-O, lowercase-b, lowercase-j, and Capital-C.
  • Add additional lines on AdRollSimpleViewController.h:18

#import “ARRollerView.h”
#import “ARRollerProtocol.h”

@interface AdRolloSimpleViewController : UIViewController <ARRollerDelegate> {


  • Add AdWhirl view to your app view and return AdWhirl application key from the required delegate method

In line 28 of AdWhirlSimpleViewController.m on -adWhirlApplicationKey method, add the following codes:

ARRollerView* rollerView = [ARRollerView requestRollerViewWithDelegate:self];
[self.view addSubview:rollerView];

#pragma mark ARRollerDelegate required delegate method implementation

– (NSString*) adWhirlApplicationKey

return @”xxxx”; // AdWhirl application key


Another issue relates to FBConnect. If you’re compiling FBConnect into your project, or if you’re using a platform that requires FBConnect, try using the workarounds above. Otherwise, since the Pinch Media library is the conflicting library, you can download a version without Pinch Media library.

Getting your iphone app to news/reporters

June 27, 2009 § Leave a comment

Our local iphone developer group discussed about the challenges of getting reporters to write about the app.

Press Release is definitely effective marketing PR tool.

Hello Vino founder shared his positive experience about releasing a formal press release to announce the launch via PRWeb. Hello Vino, a free wine pairing guide, issued a press release on Jun 15, 2009 Mon. Within a few days they were reviewed and mentioned in,, (SF) and other wine industry news sites and blogs.

Official Release: article:

Photo Stock for your Design

June 25, 2009 § Leave a comment

iStockphoto sells photo, illustration, video paying $1.2 million a week to photographers and 80,000 artists.

Fotolia offers similar products. Fotolia subscription offers 1 month at $199 with 25 downloads per day.

Fotolia offers a free photo stock photoXpress. iStockphoto launches stock.xchng, another free photo stock.

Billion Dollar HTML Tag

June 25, 2009 § Leave a comment

Marissa Mayer of Google discusses web site performance at the Velocity 2009 conference.

Mayer found a tag “align=right” table attribute from W3C HTML specs would allow the right-hand table to load before the search results. Being able to show Ad quicker lead to better revenue.

Injecting results delay the rendering produced a drop in searches. Showing 20 or 30 results rather than the default 10 results added 0.4-0.9 secs to the load time.

She explained how Google Checkout “shopping cart” icon next to ads load slower. An image opening another connection can contribute such slower loading. Connections are expensive. Google engineers find a way to draw Google Checkout cart using HTML as it renders faster. HTML & images can affect user impressions of speed.

Where Am I?

You are currently viewing the archives for June, 2009 at Web Builders.