Financial Times launches HTML5 web app

The Financial Times is turning towards HTML5 for its upcoming application (technically, a web app), in contrast to its older native iOS app. FT was not happy with the new subscription model offered by Apple, and was working with Apple to keep the revenue and demographic information from its 590,000 website subscribers. These negotiations must have been rocky as the Financial Times is now releasing a web-based application instead of a platform-specific application.

The UK-based business newspaper is looking to HTML5 to deliver its content to multiple platforms using a single app instead of multiple apps. Mobile chief Steve Pinches points to the convenience of developing one application using a single development environment.

Though it may be easier to deploy and make changes, the Financial Times faces the challenge of teaching people how to setup a homescreen shortcut to the app and how to use an app that runs in a web browser. Initial responses from our readers to the new FT web app are mixed (slow loading and poor responsiveness are the primary complaints).

Financial Times launches HTML5 web app originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 07 Jun 2011 12:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Video of "PC-free" iOS 5 setup

One new feature in iOS 5 is PC Free setup, which lets you activate your iPhone without connecting it to your computer. You enter your Apple ID, configure the Cloud services including Find my iPhone and then finally activate your device right from the phone.

Even in this early release, the setup process works smoothly. You can see the activation from start to finish in this YouTube video provided by XcodeDev.

[hat tip MacRumors]

Continue reading Video of “PC-free” iOS 5 setup

Video of “PC-free” iOS 5 setup originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 07 Jun 2011 11:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

iOS 5 jailbroken already

iOS 5 has been jailbroken within 24 hours of its debut in the iOS dev center. According to iOS hacker MuscleNerd, the exploit uses limera1n and is a tethered boot on the iPod touch fourth generation at this time. Cydia installs fine and seems to work without issue. This achievement is good news for devs who are rocking iOS 5 and those looking forward to the release version of iOS which should land this fall.

[Via Redmond Pie]

iOS 5 jailbroken already originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 07 Jun 2011 09:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

TUAW’s Daily iPhone App: Traveler’s Quest

Traveler’s Quest is an oldie but a goodie in the App Store — it’s a GPS-based treasure hunting map that will send you searching around your own area for virtual treasure with a game layer on top of it. It’s simple to play and learn, but there’s an addictive quality to hunting down and finding a certain location with your iPhone’s GPS that will keep you playing while out and about, whether you’re wandering around a vacation spot this summer or just exploring your own neighborhood.

The app just got updated to version 3.0 as well, and the new version adds a whole list of interface improvements, along with a “Message in a Bottle” feature (allowing you to leave virtual messages along with any treasure you happen to claim — kind of like virtual geocaching, and very fun) and some new Game Center achievements to chase after. Great app — Traveler’s Quest is a free download on the App Store, with various features available for an extra in-app purchase price.

TUAW’s Daily iPhone App: Traveler’s Quest originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 07 Jun 2011 08:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

iTunes 10.3 is now live

iTunes 10.3 is now available for download through Apple’s site. We haven’t seen it appear in Software Update as of yet, but it should be there shortly.

iTunes 10.3 introduces iTunes in the Cloud beta with the music you purchase in iTunes appearing instantly on all your devices. You can also download past iTunes purchases, which was first enabled on iOS devices late Monday. The download is 74.02 MB.

iTunes 10.3 is now live originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 07 Jun 2011 01:34:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Compiling Your Own Version of SQLite for iOS

ikhoyo (Bill Donahue) works in the publishing industry on UI development for the web and mobile devices, like the iPhone and iPad. You can read more on my blog. I also have lot’s of open source iOS software available at GitHub.

A version of the SQLite database is integrated into iOS. For many apps, the version that exists isn’t sufficient. The most common reason is the existing version does not support full text search, a very powerful feature of SQLite. But there are other reasons, which include:

  1. Performance improvements.
  2. Threading concerns.
  3. Concurrent operation handling.
  4. Using a more up to date version of SQLite.

I’ll show you how to compile your own version of SQLite with recommendations on what compilation options are important, which options I use, and why. I’ll also introduce you to a static library that simplifies SQLite programming. All of the source code for this article can be found here. You can also get the SQLite source code directly here.

After you’ve cloned the ikhoyo-public repo, open the ikhoyo-public workspace in the workspaces directory (if you’re using Xcode 4). Then look in the ikhoyo-sqlite project. The three files of interest are:

Look in sqlite3.c. This is where we specify the compilation options for our customized version of SQLite. Detailed information about all the options can be found here. Here’s a peek inside sqlite.c:

The two options we are concerned with are SQLITE_THREADSAFE and SQLITE_ENABLE_FTS4. SQLITE_THREADSAFE specifies the threading model used by SQLite. The values can be 0, 1, or 2. 1 and 2 are multithreaded modes, and 0 specifies single threaded. There are many discussions about the pros and cons of multithreaded vs. single threaded operation in SQLite. After much research, I concluded that single threaded mode is the simplest choice, and the best choice, for the following reasons:

  1. Maximum performance. There is no mutex handling code compiled in SQLite, so performance is increased.
  2. Multihreading was tacked onto SQLite at a late stage in it’s development, and isn’t optimal. In other words, you won’t get much bang for the buck using multithreading (and may even suffer performance degradation in some cases).
  3. We’ll be using SQLite on a personal device, so even if there is a performance boost due to multithreading, it won’t be seen on a device such as the iPhone or iPad.
  4. Using SQLite in multithreaded mode introduces several complications at the programming level. We’ll  have to handle SQLITE_BUSY and SQLITE_LOCKED return codes from database operations.
  5. We don’t want ANY database operations executing on the main thread. Database operations are slow, and under no circumstance do we want them to execute on the main thread. This would make the UI unresponsive, resulting in a very bad user experience.

The only caveat to using SQLite in single threaded mode is that we have to make sure all our requests go through a single thread. This is easy to do in iOS, and I’ve done this for you with the supplementary classes included in the ikhoyo-sqlite project. All database operations are executed under a low priority thread that we create, so there is no impact on the responsiveness of your app. I’ll be discussing these classes briefly below, and in more detail in a future post.

The other compilation option we include is SQLITE_ENABLE_FTS4 (or the equivalent SQLITE_ENABLE_FTS3). This enables full text search, a very powerful feature of SQLite.

That’s all there is to it. No special compiler flags or anything like that. Build this project, and it’s ready to go.

As I mentioned, included in the ikhoyo-sqlite project are some classes that make it easy to interface with SQLite. The classes handle all the threading issues, and greatly simplify using SQLite in your apps. iOS 4 or higher is required, since blocks are used heavily. I’ll make a few comments now, and expect more details in a future post. Here is a peek inside the project:

The only class you have to use is IkhoyoDatabase. The IkhoyoThread class is used to handle the threading, and can be used standalone. IkhoyoDatabase contains all the methods you’ll need for operating on the database, including opening, querying, updating, and closing the database. Since all operations are executed on a separate thread, most of the methods accept a block as the last parameter. The block gets called on the main thread when the operation completes. Here is an example of opening a database:

Many thanks. I’ll be showing you more about IkhoyoDatabase in my next post. You can  read about other open source iOS software from ikhoyo here.

Tutorial: Easy Positional Audio With Cocos2D

Positional audio can definitely add to the immersion of a gaming experience.  This is especially noticeable on iPhone games where oftentimes you may be playing while using headphones.  It is certainly noticeable when the devs take the time to make the time to pan the audio, and adjust the volume to match what is going on within the game.

Positional audio can be handled easily in Cocos2D using the built-in CocosDenshion library, and I have found a tutorial with a sample project demonstrating how you can easily do this to enhance your game’s sound effects.

The tutorial is from Crocodella and can be found here:
Positional Audio With Cocos2D and CocosDenshion

A good tutorial for those looking to enhance the sound effects within their Cocos2D games.

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail

Tutorial: iOS Objective-C Unit Testing Frameworks And How To Use Them

Debugging can be extremely tedious, and chasing down some bad code that you may have written weeks or months earlier just makes things that much worse.  This is where unit testing can be great as you can take care of those bugs in an isolated section of code before they affect the entire program and need to be chased down.

There are quite a few frameworks out there for unit testing with Objective-C including Xcode’s own OCunit which is terrific and easy to use in most cases.  I have found an excellent guide from Doug Sjoquist covering the  benefits and differences of using OCUnit in Xcode 4 along with the OCmock and GHUnit testing frameworks along with tutorials on the basic usage of each.

You can find the tutorial here:
Unit Testing Quick Start Guide

The official documentation for unit testing with Xcode is here.

The github for GHUnit is here.

The official page for Ockmock is here.

A great intro for anyone looking to understand the basics of unit testing with Objective-C especially if you have trouble following the official documentation.

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail

Two Splash Screen display in iphone

In this application we will see how to applied two splash screen in the iPhone. So let see how it will work.

Step 1: Open the Xcode, Create a new project using Window Base application. Give the application “TwoSplashScreen”.

Step 2: Xcode automatically creates the directory structure and adds essential frameworks to it. You can explore the directory structure to check out the content of the directory.

Step 3: We need to add three UIViewController in the class in the project. So select the project -> New File -> Cocoa Touch ->ViewController class and give the class name “SplashScreen”,”FirstView” and “SecondView”.

Step 4: We need to add two image in the Resource folder.

Step 5: Open the TwoSplashScreenAppDelegate.h file and make the following changes in the file.

#import <UIKit/UIKit.h>
@class SplashScreen;

@interface TwoSplashScreenAppDelegate : NSObject <UIApplicationDelegate> {
   
     SplashScreen *splashScreen;

}

@property (nonatomic, retain) IBOutlet UIWindow *window;
 @property (nonatomic, retain) IBOutlet SplashScreen *splashScreen;

@end

Step 6: Double click the MainWindow.xib file open it to the Interface Builder. First drag the “Image View” from the library and place it to the window. Select the window and bring up attribute inspector and select the “logo.png”. Now save it, close it and go back to the Xcode.

Step 7: In the TwoSplashScreenAppDelegate.m file make the following changes:

#import "TwoSplashScreenAppDelegate.h"
#import "SplashScreen.h"

@implementation TwoSplashScreenAppDelegate

@synthesize window=_window,splashScreen;

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
       
    splashScreen = [[SplashScreen alloc]
                    initWithNibName:@"SplashScreen"
                    bundle:nil];
    [_window addSubview:splashScreen.view];
   
    [splashScreen displayScreen];

   
    [self.window makeKeyAndVisible];
    return YES;
}

(void)applicationWillResignActive:(UIApplication *)application
{
   
}

(void)applicationDidEnterBackground:(UIApplication *)application
{
   
}

(void)applicationWillEnterForeground:(UIApplication *)application
{
   
}

(void)applicationDidBecomeActive:(UIApplication *)application
{
   
}

(void)applicationWillTerminate:(UIApplication *)application
{
   
}

(void)dealloc
{
    [_window release];
    [super dealloc];
}

@end

Step 8: Open the SplashScreen.h file and make the following changes in the file:

#import <UIKit/UIKit.h>

@interface SplashScreen : UIViewController {
   
    IBOutlet UIImageView *displaySplash;
    UITabBarController *tabBarControlller;

}

 @property (nonatomic, retain) IBOutlet UITabBarController *tabBarControlller;

 @property (nonatomic, retain) IBOutlet IBOutlet UIImageView *displaySplash;

(void)displayScreen;
(void)removeScreen;

@end

Step 9: Double click the SplashScreen.xib file and open it to the Interface Builder. First drag the “Image View” from the library and place it to the window. Select the window and bring up attribute inspector and select the “screen.png”.Connect File’s Owner icon to the Image View and select displaySplash. Drag the TabBarController from the library in the interface builder. First select the first tab from the TabBarController and bring up Identity Inspector and select “FirstView” class. Do the same thing for the Second Tab and select “SecondView”.Now save it, close it and go back to the Xcode.

Step 10: In the SplashScreen.m file make the following changes:

#import "SplashScreen.h"

@implementation SplashScreen
@synthesize displaySplash,tabBarControlller;

(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

(void)dealloc
{
    [super dealloc];
}

(void)displayScreen
{
   
    [NSThread sleepForTimeInterval:0.02];
    [self performSelector:@selector(removeScreen) withObject:nil afterDelay:16.0];
   
}

(void)removeScreen
{
       
    [self.view addSubview:tabBarControlller.view];
   
}

(void)didReceiveMemoryWarning
{
    // Releases the view if it doesn’t have a superview.
    [super didReceiveMemoryWarning];
   
    // Release any cached data, images, etc that aren’t in use.
}

#pragma mark – View lifecycle

(void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

(void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end

Step 11: Now double click the FirstView.xib file and open it to the Interface Builder. Select the View and bring up Attribute Inspector and change the background color. Now save the it , close it and go back to the Xcode.

Step 12: Double click the SecondView.xib file and open it to the Interface Builder. Select the View and bring up Attribute Inspector and change the background color. Now save the it , close it and go back to the Xcode.

Step 13: Now compile and run the application in the Simulator.

You can Download Source Code from here TwoSplashScreen

Doing the Math: At $29.99, Mac OS X Lion was WWDC’s most expensive product

Our own Dave Caolo pointed out something that took the rest of the TUAW team aback: at US$29.99, Mac OS X Lion was the most expensive product discussed at WWDC today. It’s not as though the next version of the Mac’s operating system had a lot of pricing competition at the keynote. iOS 5 will be a free upgrade to users with supported hardware, and iCloud’s services — which used to cost $99/year under MobileMe — are all completely free. In fact, other than Lion itself, the only thing Apple announced at WWDC that costs anything at all was iTunes Match at $25 a year.

One of the major anti-Apple memes over the lifetime of the Mac has been that Apple’s products are far more expensive than those of its competitors. While there are arguments both for and against that line of thinking for Macs and equivalently-configured PCs, the iPad’s pricing compared to other tablets’ blows that argument out of the water, and Apple’s software prices undercut those of Windows by an astonishing margin, as demonstrated in the graphic above.

Windows 7 comes in a spread of flavors, while Mac OS X Lion comes in only two: the standard $29.99 user edition and an upgraded server edition that costs $50 more. Both will be downloads from the Mac App Store, and while there’s no official word yet, based on a cursory reading of the current terms and conditions it seems that both Lion and Lion Server Edition will be installable on up to ten machines associated with a user’s iTunes account.

So our graphic is wrong in one sense: while you could buy multiple copies of Lion for the same price as the equivalent Windows software, you don’t actually have to. If anything, this makes Lion an even more economical prospect than Windows. Even if you want to make the argument that it’d take a Server Edition upgrade to put Lion’s feature set on parity with Windows 7 Ultimate Edition (an assessment with which we’d politely disagree), Windows 7 is still only installable on one machine. Therefore, even with “Lion Server Edition” costing a total of $80, that’s $80 for a 10-machine license under the current terms and conditions versus $220 to install Windows 7 Ultimate Edition on one.

Put another way: for the amount of money you’d pay for a single-machine license for Windows 7 Ultimate Edition, you could install Mac OS X Lion and its server tools on 20 machines and still have 60 bucks left over. If you’re like us and you think Lion doesn’t need the server tools to be on parity with Windows 7 Ultimate, you could install Lion on 70 machines and buy yourself a six-pack for the same price as one Windows 7 Ultimate license.

Apple charged $129 for Mac OS X Leopard and older iterations of its operating system, which were still considered bargains against the pricing of equivalent Windows packages. But Lion’s incredibly low cost compared to that of Windows merely demonstrates what we’ve known all along: Apple is at its heart a hardware company. It makes money off of its hardware, but the only purpose of the software is to make the hardware sing. iTunes? Free. iCloud? Free. iOS? Free. Mac OS X? 30 bucks.

Microsoft, on the other hand, is primarily a software company dependent on hardware makers to run its software. XBox 360 and some minor pilot projects aside, Microsoft makes an overwhelming majority of its money off licenses of Windows and Office editions. With that in mind, it’s little wonder that Microsoft’s software costs so much more… or that Apple is currently cleaning Microsoft’s clock financially.

Doing the Math: At $29.99, Mac OS X Lion was WWDC’s most expensive product originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Jun 2011 22:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

The iBookstore comes to iTunes

Apple has added the iBookstore to iTunes. The way it looks and works will be immediately familiar to anyone who’s made an iTunes purchase. Featured books appear at the top along with a list of New and Notable releases and charts.

Several pre-orders are also available, as well as a large number of titles currently discounted to US$2.99.

I clicked to download a sample of “Feathers” by Thor Hanson and iTunes gave me the message, “Sample has been sent.” I launched iBooks on my iPhone and presto! There it was. Next I grabbed the free Lonely Planet travel guide, which iTunes downloaded and added to Books; it also magically appeared in iBooks on my iPad or iPhone.

I’ve wondered if the iBookstore would ever be a part of iTunes. Now we know.

The iBookstore comes to iTunes originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Jun 2011 21:10:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

If Lion is your future, make sure Snow Leopard is your present

As we mentioned in our what Mac owners need to know after today’s WWDC announcements roundup, Snow Leopard (Mac OS X 10.6) will be required for Lion.

If you are using Leopard (10.5) or less, you must first upgrade to Snow Leopard.

Amazon shows it backordered 2-5 weeks, (available from some 3rd parties), but the online Apple Store has it for $29USD plus shipping. Note that if you are running a version of Mac OS X before 10.5, you should buy the $129 Mac Box Set ($99.99 at Amazon) which includes Snow Leopard, iLife ’11, and iWork, but that is a legal/moral obligation, not a technical one. The Snow Leopard DVD will work on any supported Mac, regardless of which OS is installed on it (or even on a new drive).

Not sure what version you are running? Go to the Apple menu and select “About This Mac” and look in the window which appears (see image above). If it says anything starting with 10.6 you are running Snow Leopard. Anything less? Time to upgrade.

(If you are running Snow Leopard, make sure you are running at least version 10.6.6 and get the Mac App Store app!)

You may also want to make sure your Mac is compatible. Apple specifies “[y]our Mac must have an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor to run Lion.” That information is shown in the “Processor” line of the “About Mac” window, shown above.

If Lion is your future, make sure Snow Leopard is your present originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Jun 2011 21:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments