»
S
I
D
E
B
A
R
«
Adobe abandons iPhone code tools
May 11th, 2010 by Anish Kumar

Adobe has decided to stop developing software tools that allow Apple’s iPhone and iPad to use its popular Flash technology.

The decision reverses an earlier pledge in which it said it would help get Flash working on the gadgets.

Closed tools

In mid-April, Adobe released software  Creative Suite 5 that contained option to export Flash applications into native iPhone applications. Shortly before the release, Apple updated the terms and conditions of the license software developers must sign to create iPhone and iPad applications. The revised terms placed strict restrictions on what developers can use to create these applications and effectively banned them from using 3rd party tools such as Creative Suite 5.

At the time Adobe wrote that it still intended to deliver the feature. Now it has said it will halt development of future export tools for Creative Suite.

“We will still be shipping the ability to target the iPhone and iPad in Flash CS5,” wrote Mike Chambers, Adobe’s principal product manager for developer relations, on his blog. “However, we are not currently planning any additional investments in that feature.” Mr Chambers also commented on Apple’s revision of its terms and conditions. He wrote: “…as developers for the iPhone have learned, if you want to develop for the iPhone you have to be prepared for Apple to reject or restrict your development at any time.”

Apple responded in a statement to technology news site CNet in which it described Flash as “closed and proprietary”. Apple preferred to support more open standards which replicate everything Flash can do, added the statement.

Mr Chambers wrote that now Adobe will concentrate on Google’s Android smartphone software and ensure that its Flash technology works well with that. “Fortunately,” he wrote, “the iPhone isn’t the only game in town.”

Localizing Settings.bundle
Apr 12th, 2010 by Anish Kumar

For adding internationalization support to iPhone Settings.bundle, follow these steps:-
1. Close the Xcode IDE
2. Drag and duplicate the settings bundle onto the desktop (or wherever)
3. Open bundle contents by selecting “Show Package Contents” from the right click menu options
4. Drag Root.strings into the en.lproj folder
5. Duplicate the en.lproj folder and rename to whatever language you want (using 2-letter code. Eg: fr.lproj for French)
6. Replace the original settings bundle with the new one.
7. Open Xcode IDE and the new files and folders should be there
This methods works fine in the simulator and on my iPhone device.

New Features In iPhone OS 4.0
Apr 9th, 2010 by Anish Kumar

iPhone OS 4 is the next generation of the world’s most innovative mobile operating system. Its unique capabilities and new technologies will change what you thought was possible on a mobile platform. With a rich set of over 1500 new APIs, iPhone SDK for iPhone OS 4 provides you with an amazing range of technologies to enhance the functionality of your iPhone and iPod touch apps. iPhone Developer Program members can visit the iPhone Dev Center to download the iPhone SDK 4 beta now.

Multitasking

iPhone OS 4 delivers seven new multitasking services that allow your apps to perform tasks in the background while preserving battery life and performance. These multitasking services include:

  • Background audio – Allows your app to play audio continuously. So customers can listen to your app while they surf the web, play games, and more.
  • Voice over IP – Your VoIP apps can now be even better. Users can now receive VoIP calls and have conversations while using another app. Your users can even receive calls when their phones are locked in their pocket.
  • Background location – Navigation apps can now continue to guide users who are listening to their iPods, or using other apps. iPhone OS 4 also provides a new and battery efficient way to monitor location when users move between cell towers. This is a great way for your social networking apps to keep track of users and their friends’ locations.
  • Push notifications – Receive alerts from your remote servers even when your app isn’t running.
  • Local notifications – Your app can now alert users of scheduled events and alarms in the background, no servers required.
  • Task finishing – If your app is in mid-task when your customer leaves it, the app can now keep running to finish the task.
  • Fast app switching – All developers should take advantage of this. This will allow users to leave your app and come right back to where they were when they left – no more having to reload the app.

Read the rest of this entry »

Error: “CGGStackRestore: gstack underflow”
Nov 2nd, 2009 by Anish Kumar

Today while I was working with some CoreGraphics API’s, I encountered a error which I was seeing it for the first time. CG for dumping an error “CGGStackRestore: gstack underflow” in the console everytime I invoked a method that was doing some CG based operations. Googling around I found that in CoreGraphics, you can save (CGContextSaveGState) and restore (CGContextRestoreGState) the graphics state. When the  state is saved, a copy is put on the graphics state’s “stack”, and when it is restored, the top state on the stack is removed and used. If we restore the state more times than we save it and then when we try to remove and use the top item of the stack, the stack is empty, causing a stack “underflow” error. So just make sure you have enough save-restore state methods called and it will fix the issue.

CGGStackRestore

CGGStackRestore

Coming Soon: Develop Native iPhone Application Using Actionscript
Oct 20th, 2009 by Anish Kumar

With Flash Professional CS5, we can now build applications for iPhone and iPod touch using ActionScript 3. These applications can be delivered to iPhone and iPod touch users through the Apple App Store. A public beta of Flash Professional CS5 with prerelease support for building applications for iPhone is planned for later this year. At MAX 2009, Adobe showed a number of applications and games for iPhone that have been built using a prerelease version of Flash Professional CS5. The tooling update allows developers to use Flash technologies to develop content for iPhone and iPod touch. Developers can write new code or reuse existing web content to build applications for iPhone. Because the source code and assets are reusable across the Flash Platform runtimes,—Adobe AIR and Flash Player—it also gives developers a way to more easily target other mobile and desktop environments.

Read the rest of this entry »

XCode Error: “Loading Stack Frames”
Oct 9th, 2009 by Anish Kumar
Xcode: Loading Stack Frames

Xcode: Loading Stack Frames

Recently I encountered an new error for the first time in XCode. When my iPhone application under development crashed, instead of showing me the stack trace of where the application crashed, it threw an error “Loading Stack Frames” and was struck there indefinitely.  After researching about this for a while, I came to know my application crashed because of a stack overflow due to a non-terminating recursion in your code, and gdb is now trying to load all the stack frames on the stack . Usually, the stack of a application doesn’t get deeper than 50 frames or so (and that’s already a quite deeply nested stack). My application stack had run into 104708 frames which was quite too high.I finally figured out that the crash was due to an race condition.

Apple releases iPhone OS SDK 3.1.2
Oct 9th, 2009 by Anish Kumar

Apple on Thursday released an update for the iPhone SDK, bringing the current version of the SDK to 3.1.2.

The new SDK 3.1.2, which now includes Xcode 3.2.1, is available in versions that are compatible with Leopard and Snow Leopard for iPhone and iPod Touch developers.

The update contains general bug fixes for the SDK and Xcode. Dashcode is reported to now support the creation of Web applications that are optimized for Safari on the iPhone, PC, and Mac.

If you’ve used this new update, please tell us about your experiences with it in the comments.

Titanium User Group Kick Off Meeting
Sep 8th, 2009 by Anish Kumar
Titanium Developer Meet, Bangalore

Titanium Developer Meet, Bangalore

The first Titanium User Group meeting took place in Bangalore on 4th September 2009. The event was organized by Mohammad Khan (The guy in the blue T-Shirt in the snap)and others Of Esberi. The event started at 6:00PM and close to 15 people attended the event. It all began with an introduction to Titanium SDK and how to use the Titanium Developer tool to create applications for both iPhone and Android mobile platform. Since I already had played around using Titanium Developer tool, most of the stuff I heard there about using the tool was already known.

The meet was useful in that I got to learn what are the features and API’s provided by Titanium SDK to write applications for mobile. Some of the code samples shown at the meet were encouraging and I would say the code would be familiar to a person who had already worked on say Adobe Flex. Even for beginners, it’s not so tough to learn it.

Read the rest of this entry »

Best Practices For Creating Video For iPhone
Aug 26th, 2009 by Anish Kumar

Safari supports audio and video viewing in a webpage on the desktop and iPhone OS. You can use audio and video HTML elements or use the embed element to use the native application for video playback. In either case, you need to ensure that the video you create is optimized for the platform and different bandwidths.

iPhone OS streams movies and audio using HTTP over EDGE, 3G, and Wi-Fi networks. iPhone OS uses a native application to play back video even when video is embedded in your webpages. Video automatically expands to the size of the screen and rotates when the user changes orientation. The controls automatically hide when they are not in use and appear when the user taps the screen. This is the experience the user expects when viewing all video on iPhone OS.

Read the rest of this entry »

iPhone OS 3.0 Bug Leads to Disappearing Photos
Aug 21st, 2009 by Anish Kumar
MISC Directory

MISC Directory

After moving to iPhone OS 3.0, from past few days i have been experiencing a strange bug. The camera photos, images saved from the web, or iPhone screenshots are not showing up in the Camera Roll. The iPhone’s Camera Roll keeps a correct cumulative count, and I have no problem transferring the images files to my MacBook  using iPhoto or Picasa. Read the rest of this entry »

iPhone 3GS Battery Percentage Meter
Jul 28th, 2009 by Anish Kumar
iPhone 3GS Battery Meter

iPhone 3GS Battery Meter

iPhone 3GS now supports showing the battery charge level as a percentage rather than just the icon indicator.  Percentage indicator is really helpful. Most of the times I plug the charger to my macbook when it starts showing the battery level at less than 3%. And with iPhone I usually end up plugging the charger only when it shuts down completely running out of battery.  The 10% battery remaining warning is too early.

Unfortunately Apple has put this new option only in new iPhone 3GS. Its not available for iPhone 3G or the 1st gen iPhone. Apple is so cruel.

I wonder what big pain would it cause to Apple to include that feature in all iPhone models. Apple acts crazy.

XCode: Could Not Support Development
Jun 20th, 2009 by Anish Kumar
XCode: Could Not Support Development

XCode: Could Not Support Development

Today  when I started my work on an iPhone project, my XCode failed to mount my iPhone. The XCode organizer was showing an orange dot next to it instead of the usual green one. Organizer complained “Could Not Support Development”. I tried restarting my XCode, launched iTunes but in vain. iTunes was able to mount my iPhone but XCode simply failed and I was not able to test my app’s on my phone. Read the rest of this entry »

Error Starting Executable
Jun 18th, 2009 by Anish Kumar
Error Starting Executable

Error Starting Executable

Quite a few times in our iPhone application development cycle we would encounter XCode error “Error Starting Executable – No provisioned iPhone OS device is connected.” even when we know the device is connected to the machine.   This error occurs when the connected device is not configured in the XCode->Organizer. Organizer would fail to mount the device as the version of XCode installed on the developer machine may not support the version of iPhone OS installed on the device.

Read the rest of this entry »

iPhone Online Mockup Creator
Jun 11th, 2009 by Anish Kumar

I found this web based iPhone mockup creator.
Nice tool. Supports sharing the design creation with multiple users and collabrate on the mockup….

My First Post Using Wordpress For iPhone
Jun 8th, 2009 by Anish Kumar

This is my first post using iPhone 3.0 Wordpress application. This is awesome cool in that now I can blog when I am travelling. I will write more about this app as I begin to use more of it.

the first feedback would be I am missing all the formatting options that I take for granted on desktop version of wordpress.

iPhone SDK: How To Set Max Character length in UITextField
May 14th, 2009 by Anish Kumar

We can use the UITextField’s delegate method

- (BOOL)textField: (UITextField *)textField shouldChangeCharactersInRange: (NSRange)range replacementString: (NSString *)string

to set the maximum character length.

This can be done by doing the following:

#define MAX_LENGTH 10

- (BOOL)textField: (UITextField *)textField shouldChangeCharactersInRange: (NSRange)range replacementString: (NSString *)string
{
    if (textField.text.length >= MAX_LENGTH && range.length == 0)
    {
        return NO; 
    }
    else
    {
        return YES;
    }
}
iPhone: Place A UIView On Top Of Other Views
May 14th, 2009 by Anish Kumar

There might be need at several stages of iPhone application development to insert a new view on top of other views. This can be achieved by setting the zPosition value of the view in question. If a View has a zPosition that is bigger than another views zPosition it will appear on top of the other view.

Read the rest of this entry »

App Icons Messed Up With iPhone OS 3.0 Beta 5
May 13th, 2009 by Anish Kumar
Messed Up Icons With iPhone OS 3.0 Beta 5

Messed Up Icons With iPhone OS 3.0 Beta 5

With the latest release of iPhone OS 3.0 seed 5, the icons of the applications are being messed up. This mostly occurs when we install updates to the applications from App store. Few applications will not have any icons altogether, few apps have icons of their neighbouring apps like shown in the figure. iPhone OS 3.0 beta 5 is lot more buggier than beta 4 or beta 3. Also I have observed beta 5 drains the battery very fast. My iPhone lost more than half of its power over night even without performing any tasks while lying idle. Seems Apple has purposefully made beta 5 buggy so that users are forced to move to the final version expected in the WWDC.

On the screenshot we can observe that, PingPongLite application doesnt have icon at all and NewsPro and Bloomberg have same icons.

However on a positive note, if we restart the iPhone, all icons are restored to their original application icons.

Read the rest of this entry »

Disabling ‘Action’ Alert in UIWebView
May 5th, 2009 by Anish Kumar
UIWebview Action Alert

UIWebview Action Alert

If there is an <a href></a> tag in the html that is being loaded in an UIWebView, then touching that link for few seconds would trigger an alert showing ‘Action’ or the alternate text provided for the link.

If we need to disable it, then we need to set

document.documentElement.style.webkitTouchCallout=”none”;

This can be called in the onload event of the html <body> tag which is being loaded in UIWebview. Put this piece of Javascript before the <body> tag

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Hide Action Alert In UIWebView</title>

<script type="text/javascript">
function OnLoad()
{
   document.documentElement.style.webkitTouchCallout = "none";
}
</script>
</head>
<body onload="OnLoad()"/>
</body>
</html>
Selecting Earlier Version Of SDK When iPhone SDK 3.0 Is Installed
May 5th, 2009 by Anish Kumar
iPhone OS Active SDK Targets Missing

iPhone OS Active SDK Targets Missing

The iPhone SDK 3.0 is great in offering tons of new features to developers to play with. It irresistable not to install it n use it. But we should be ready to make few sacrifices in using it. Firstly as the release notes says, iPhone OS 3.0 beta installed on iPhone can’t be revereted back to a earlier version of OS. While this was a big issue for people who skipped reading the release notes n were excited to install iPhone OS 3.0 Seed 1. However the later versions of iPhone OS 3.0 Seed 3 and 4 seem to be pretty stable and near production quality expect for few problems like low battery backup. The other major issue I am facing with iPhone SDK 3.0 is not being able to set the Active Target to a earlier version of iPhone OS other than 3.0. XCode silently removes all the other available options from the ‘Active SDK’ list and gives only iPhone OS 3.0. This can be annoying, but we cant blame Apple for this as they have warned this in their release notes. The image on the left shows the behaviour I am talking about. Read the rest of this entry »