레이블이 Developer인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Developer인 게시물을 표시합니다. 모든 게시물 표시

2010년 6월 9일 수요일

Bing Opens to Developers with Maps SDK & Search Library for PHP

bing_logo_jun10.jpgGood news for developers and fans of mashups, as this morning Microsoft has announced the availability of a software development kit (SDK) for building map apps on Bing Maps. What's more, last week Microsoft announced the creation of the Bing Search Library for PHP - a wrapper built in conjunction with PHP expert Cal Evans that gives developers easy access to the Bing Search API via PHP. Microsoft seems to be embracing third-party developers more openly now with these tools, so here's a breakdown of what's available now.

 

Read more...

2010년 5월 7일 금요일

Preparing to Write Your First iPhone App

You’ve seen the statistics and glowing success stories and you’re interested in writing your first iPhone app. Good for you! If you’ve never developed content for a mobile device, or if you’re new to software development, learning iPhone development can be a fun and rewarding experience. In future articles I’ll be providing you with tips and tricks for getting your first application up and running. However before we jump into the code, let’s take a step back to consider the building blocks of your first app.

Will it make sense to your audience?

As in all things related to software development, the goal of your app will be to provide a solution to a set of end users. In some cases your “solution” could be an answer to a specific problem, or it could allow people to discover something new about their environment. Perhaps the solution already exists on another platform (e.g. desktop, web) but doesn’t exist for the iPhone.

One thing you do know is that your audience is on the go. People who use mobile applications find value in quick interactions with limited user input. They don’t want to use your app to write a Word document. However, people will like your app if they can get the information they need by pressing a button or two. In the case of a mapping application or email, they may only launch the app (with no user input) to get the information they need.

Think “Pocket Computer” instead of Mobile Phone

As an experienced web developer, the first thing that comes to mind when I hear the term “mobile phone” is limited functionality on a screen that’s too small. All things being equal, this has been the typical experience of previous mobile platforms. With the iPhone, think of the device as a pocket computer. For example, many new iPhone users report decreased usage in both laptop and desktop computers. In addition, successful applications like Pandora that have typically struggled in a desktop setting now flourish as a pocket computer solution. When planning your application think about what is unique to the iPhone that can be utilized in your app. If you can figure this out you’ll have the next Bump or Urbanspoon.

Consider the differences between the iPhone and iPod touch

With your cool app idea and a good understanding of your audience, let’s consider the actual hardware and software. Depending on which frameworks (major components of the iPhone SDK) are used in your application, your app may not work on every iPhone device. For example, an application that makes use of the camera, compass or microphone will work on an iPhone but not an iPod touch. It’s OK to write an app that’s limited to iPhone 3G or iPhone 3GS – just be sure you account for it when you develop (and market) your app. This should also go without saying, but be certain to have a physical iPhone or iPod touch to test your code before submitting your app to the App Store.

Document your ideas

Before you commit any code to your new project, take some time to document your end-user experience. This doesn’t need to be a lengthy requirements document. It could be as simple as writing down some notes on paper or sketching some drawings. When I created Jingle! [iTunes] I sketched the design using a stencil kit provided by UI Stencils. Using actual paper and a stencil kit was especially cool as it was a fun way to piece together user interface elements. I also tracked my notes, marketing materials and communication using Evernote.

When you start looking at Apple documentation, one recurring theme you will see is reference to a document called the Human Interface Guidelines (HIG). Essentially this is the master document for how your iPhone application should look and behave. Most of us have heard the stories of how XYZ app was “rejected” by Apple because of an apparently random decision. If you want a head start on what Apple is looking for in an application, you will benefit greatly by starting with this document.

Another way to ensure a great experience is to look at other leading applications that may be in your category. Ask yourself why those applications are the leaders and what elements they used to create a great experience. Also check out the ideas of usability expert Jakob Nielsen.

Manage Memory and Battery Life

To ensure your project is successful also consider how your app will manage memory and battery life. As we will discover in the code, there is no garbage collection for iPhone so you as a developer will be in command of memory management. Also, certain iPhone functions will use more battery life than others. For example, applications that stream data from the Internet or make extensive use of the Core Location Framework (e.g. GPS) will drain battery life more quickly.

Data Management

Finally, one of the most complex items you will need to consider is data management. You have three options. If your app is a basic utility (e.g. temperature converter, calculator) you shouldn’t have to worry about storing data. If you plan to build an app that connects to an Internet-based service (e.g. how Tweetie works with Twitter), you’ll connect to these online resources through web services. Your third option will be to store user data on the device using the Core Data Framework.

If you are planning your first app, feel free to send in your questions, thoughts and ideas!

 

http://theappleblog.com/2010/05/06/preparing-to-write-your-first-iphone-app/

2010년 3월 3일 수요일

Hold and Copy in UIKit

Recently, I wanted to implement an interface where a user holds down on a UIView class or subclass to reveal a copy menu. Basically, I didn’t want to have to present the user with a UITextField just to provide the ability to copy some data to the pasteboard. In this case, I’m working with a UILabel, but a similar paradigm already exists in many Apple-supplied apps where one can hold down on an image and be presented with the Copy menu option.

Going in it seemed pretty straight-forward, but it ended up taking me the better part of an afternoon of trial and error alongside the Event Handling section of “iPhone Application Programming Guide” to work it all out, so I believe a tutorial is in order. A reference project with sample code is available on Github.

Getting Ahold of a Hold

One can easily calculate the length of time a touch was held when the touch ends (by calculating the difference between the timestamp properties of the passed UIEvent and UITouch objects), but I found making this the point of responding to the event less than ideal because it means responding to the user’s interaction after the user lifts her finger, rather than while she is holding down on the screen. I’d rather respond while the user is still holding her finger down to let her know that the instruction was received. If the software will only respond after the user lifts her finger, she has no idea how long she has to hold her finger down, which is a nuisance, really.

Old Cocoa pros and experienced UIKitters probably saw the solution from a mile away: we intercept the touches began event for the view we’re interested in, and tell some object to do something after a long enough delay (the minimum time we want a user to have to hold to do something). We then cancel the request if any of the other touch events fire before our delay hits. That looks something like this, depending on your needs:


  - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
  	UITouch *t = [touches anyObject];
  	if ([t locationInView:someViewWeAreInterestedIn])
  		[self performSelector:@selector(showMenu) withObject:nil afterDelay:0.8f];
  	}
  }

  - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
  	[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(showMenu) object:nil];
  }

  - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
  	[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(showMenu) object:nil];
  }

  - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
  	[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(showMenu) object:nil];
  }

There may be better ways to do this, but this seems pretty solid. In the sample code you can see this at work in the view controller, which shows a hidden image once a user holds down on another image for long enough. Just under a second (0.8s) seemed to feel right to me.


  - (void)holdingView:(id)view {
  	[hiddenView setHidden:NO];
  }

  - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
  	NSSet *imageTouches = [event touchesForView:imageView];
  	if ([imageTouches count] > 0) {
  		[self performSelector:@selector(holdingView:) withObject:imageView afterDelay:0.8f];
  	}
  	[super touchesBegan:touches withEvent:event];
  }

Implementing a Custom Copy

I feel like there’s real pun-potential for this subtitle, but reasonably groan-inducing text is eluding me. In any event, now that we can detect when a user has held our view long enough to warrant a response, we need to make a move: presenting the UIMenuController with the Copy option and actually copying something in response. I’m sure there are various approaches that can be taken, but my approach was to start by subclassing UILabel, curious to hear other ideas.

First, I wired the subclass to intercept touch events, and to save that touch-down for the extra point (ho!):


  - (BOOL)canBecomeFirstResponder {
      return YES;
  }

  - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
  	if ([self canBecomeFirstResponder]) {
  		[self becomeFirstResponder];
  		UITouch *t = [touches anyObject];
  		holdPoint = [t locationInView:self];
  		[self performSelector:@selector(showMenu) withObject:nil afterDelay:0.8f];
  	}
  }

  // (other touches* methods implemented to cancel perform) ...

Showing the menu itself is a touch awkward, you need to provide a “target rectangle” (CGRect) to UIMenuController to tell it about where on the screen you want the menu to appear (it can appear above or below this point, depending on proximity to the screen bounds).


  - (void)showMenu {
  	NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
  	[center addObserver:self selector:@selector(reset) name:UIMenuControllerWillHideMenuNotification object:nil];

  	// bring up editing menu.
  	UIMenuController *theMenu = [UIMenuController sharedMenuController];
  	CGRect myFrame = [[self superview] frame];
  	CGRect selectionRect = CGRectMake(holdPoint.x, myFrame.origin.y - 12.0, 0, 0);

  	[self setNeedsDisplayInRect:selectionRect];
  	[theMenu setTargetRect:selectionRect inView:self];
  	[theMenu setMenuVisible:YES animated:YES];

  	// do a bit of highlighting to clarify what will be copied, specifically
  	_bgColor = [self backgroundColor];
  	[_bgColor retain];
  	[self setBackgroundColor:[UIColor blackColor]];
  }

Note that I’m registering for a notification: I basically wanted to know whenever the menu disappeared, because that would mean it’s time to stop high-lighting the text in the label, and restore the original background color. Totally not required for getting the menu on screen.

Next we have to make it clear to the UIMenuController that we mean serious business, and what kind of business we intend to conduct. In my case, I was only interested in Copy, but other options are available:


  - (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
  	BOOL answer = NO;

  	if (action == @selector(copy:))
  		answer = YES;

  	return answer;
  }

And in my case, the data I’m looking to copy is simply the text of the label itself, and I just want to put it on the general pasteboard so the user can paste it into another app, or wherever:


  - (void)copy:(id)sender {
    UIPasteboard *gpBoard = [UIPasteboard generalPasteboard];
  	[gpBoard setValue:[self text] forPasteboardType:@"public.utf8-plain-text"];
  }

That’s it!

 

http://www.mobileorchard.com/

2010년 2월 11일 목요일

Apple Surveying iPhone Developers’ Happiness With The App Store

 

Last year, there was no shortage of developers who were complaining about Apple’s App Store. The situation got so heated that no less than Apple senior vice president of Worldwide Product Marketing, Phil Schiller, got personally involved with a number of developers having issues. Since then, the complaints seem to have died down quite a bit, but Apple is still on the case.

The company has started sending out a survey to iPhone developers asking about their experience with the program. While the long survey covers a range of things, the majority of the questions are about the application review process, and developers’ overall happiness with the program.

Examples of questions asked include:

Please rate your level of satisfaction with each of the following aspects of the Application submission process (using iTunes Connect).

Please rate your level of satisfaction with each of the following aspects of the application review process (using iTunes Connect).

Please rate your level of satisfaction with the length of time it takes to get updates available on the App Store.

Apple asks you to answer with: “Very dissatisfied,” “Somewhat dissatisfied,” “Neither satisfied nor dissatisfied,” “Somewhat satisfied,” “Very satisfied,” or “Don’t know.”

They also ask, “What one thing could Apple do to make the iPhone Developer Program better?” and give you a text box to write anything you want. A few months ago they certainly would have gotten some interesting responses there.

Sometime around the first of the year, Apple made some changes to the App Store approval process that drastically sped things up for many developers. In fact, a number of developers noted that approval process wait time went from two weeks (or worse) to just a couple of days in some situations. There have also been reports of improved communication from the app review team.

It seems likely that Apple staffed up its app review team and also provided them with better training and instructions over the past few months. Still, if the App Store continues to grow at its blistering pace, it’s hard to imagine that things won’t get bogged down again. So during this time of relative peace, it’s smart for Apple to survey its developers to fine tune the system.

 

http://techcrunch.com/2010/02/08/apple-app-store-survey/

2010년 2월 3일 수요일

Using Bump’s New API To Exchange Data Between Phones

Bump, the Y Combinator funded company that got a lot of attention last year as the Billionth App, has released an API that lets devs use Bump’s bump-to-exchange scheme for swapping data phone-to-phone in their own apps.

The API is free to use unless you are generating revenue as a direct result of a bump, have more than 10,000,000 bumps/month or more than 2,500 simultaneous users.

Integrating the API looks straightforward and uses the protocol/delegate pattern familiar to iPhone devs. Have a look at this tutorial for details.

 

API Tutorial

This tutorial provides a step-by-step howto for integrating the Bump API with an iPhone app.
Source & Installation

Let's first download a sample Xcode project that will use the Bump API: BumpFour. Next, download the Bump API. Now, open the BumpFour Xcode project that you just downloaded.

Locate the API-distro_* folder (that you downloaded), drag the file Bump.h and drop it onto the BumpFour project Classes group. A dialog will appear -- make sure "Copy items" is checked before clicking "Add".

Next, drag the Bump_Resources folder and drop it onto the BumpFour project Resources group. A dialog will appear -- make sure "Copy items" is checked before clicking "Add".

Then, drag libBump.a and drop it onto the BumpFour project Frameworks group. A dialog will appear -- make sure "Copy items" is checked before clicking "Add".

If you're integrating the Bump API with your Xcode project, make sure your project includes the CoreLocation, AudioToolbox, UIKit, Foundation, CoreGraphics frameworks. The BumpFour sample project already included these frameworks.

When you have added all the required Bump API assets, the Groups & Files will look similar to these:

Compile

At the time you register, you receive an API key. You need to insert your API key in GameBumpConnector.m here:

Press "Build and Go". If you've added (installed) everything correctly and you have a valid developer key, BumpFour should run on your simulator. Press "PLAY FRIEND". You should see this:

[Note: A demo warning message will show when you are not using a production key. To upgrade your API developer key to a production key, go here.]

Using the Bump API: Bump and exchange data

There are a few calls to make to integrate Bump with your project. These are the minimum calls you must make in order to bump and exchange data.

Let's take a look at the sample project BumpFour where the calls are made.

  1. Allocate a Bump object
  2. Set a delegate
  3. Use your API key
  4. Connect with Bump's server. You must only call this after the previous three calls.

    BumpFour calls this when user presses a button to "Play Friend". That's one way to invoke the Bump API popup. Another way might be, for example, if your app allows your users to bump a photo, when the user selects a photo from your photo picker, you can call connect. That will immediately bring up the Bump API popup, users bump, and photo is exchanged.

  5. Implement the required BumpDelegate methods
  6. Send and receive data
  7. Disconnect from Bump's server

In addition to the minimum calls above, the following are useful.

  1. Send a message to the Bump feed
  2. Configure a message on the Bump API popup:
Using the Bump API: Bump and share your app

The Bump API also has a "tell-a-friend" feature. To implement that in your app, send the connectToShareThisApp message to your Bump object. In addition, you instruct your users to bump your app into the Bump App via the configActionMessage:, doing so will take the receiver (the Bump App) to the iTunes page for your app. Let's take a look at a view controller whose sole function is to share app (we won't reference BumpFour for this example).

 

http://www.mobileorchard.com/

http://bu.mp/apitutorial.html

2010년 2월 2일 화요일

HTML5 is Great for Mobile, Developers Say

ipad_150_jan10.jpgThe iPad has been this week's media darling with active discussion about the device's merits, a look at how it fails to encourage AR innovation and of course, this morning's announcement of a developer fund. Although it's exciting from a consumer standpoint, between the iPhone, Android, Blackberry and now the iPad, application developers have their work cut out for them. While consumers may flock to the new tablet, the thought of locking more developers into the purgatory of the Apple approval process is one that few will celebrate.

phones_html5_jan10.jpgWith the caveat that there is no current "write once, run anywhere" solution to app development, Director of Developer Relations at Palm Dion Almaer is betting on web-based apps and HTML 5 to solve some of our concerns.

Says Almaer, "We can share a lot with the Web - take Gmail as an example. There isn't a true iPhone app, and it doesn't need one. The HTML5 rich app that uses local data and the like is great. The experience is slightly crippled, but to me it shows that the notion of "apps" and stores is restricted and probably wrong. I hope we get past app stores as we know them in the near future."

Developer Kevin Systrom opted to write his stealth-mode app in HTML 5 for a number of reasons. In addition to being able to develop for multiple devices and the fact that it offers instant deployment sans App Store, Systrom makes the case for HTML 5 in saying, "Hands down, the developer pool for HTML / JS rock stars is tenfold larger [and] there is no download attrition. You simply point people at a URL and there you go -- it's installed." The fact that apps can be directly installed by URL rather than by waiting for an App Store download means that developers reduce barriers to virality. As for downsides, explains Systrom, "Although there are many tricks that you can use to speed up apps, writing a native app will always have an advantage when it comes to responsiveness, etc. However, let's not forget that we saw this happen on the desktop, too. Then, as technology improved, consumers and businesses alike all flocked to web apps as they realized the advantages of building in the browser."

Google's Developer Relations Manager Patrick Chanezon lists a number of advantages to developing in HTML 5 for mobile devices namely that you can deploy roughly the same code base on all HTML5-ready phones and that you are not slowed down by the Apple vetting process. However, admits Chanezon, "The APIs are not all standardized in HTML 5 yet (the camera, mic, accelerometer or 3D), and not all HTML 5 is implemented completely on all phones yet." Nevertheless as more devices make webkit their browser of choice, Chanezon is convinced that HTML 5 will continue to build momentum.

While it's not perfect, HTML 5 might just be the step you need to decrease the time and cost of developing across devices.

For more information on HTML 5 and mobile development check out Peter Paul Koch's Mobile Compatibility Tables, the Google Code Chrome page, the Ajaxian blog, Mozilla Developer Center, Mark Pilgrim's Dive Into HTML 5, The Surfin' Safari WebKit Blog and JQTouch. As well, Chanezon's own Delicious account has a great selection of demos and articles.

 

http://www.readwriteweb.com/start/2010/01/html5-is-great-for-mobile.php

2010년 1월 28일 목요일

iPad: What Developers Need To Know

Apple just finished their iPad event. Here’s what you’ll want to know as a developer:

Jobs says the device is for, “Browsing the web. Doing email. Enjoying and sharing pics. Watching videos. Enjoying music. Playing games. Reading ebooks.”

It’ll run unmodified iPhone apps out of the box in two modes: actual size, which takes up half the screen, and scaled up 2x for full screen. This implies the 9.7″ screen has a resolution of 960-by-640. Update: henning informs us that it’s 1024×768.

The device runs Apple’s own A4 chip at 1GHz. Other than a bare Wikipedia page there’s not much data on the chip. It’s an ARM chip, which is why it can run the unmodified iPhone binaries.

The device has 802.11N WiFi and Blue Tooth 2.1 + EDD. Unlocked 3G GSM is an option. There is no camera. Not clear on compass/location hardware — maps app suggests location capabilities, but can’t find anything. Update: Ken Pespisa points out that Apple’s published the specs since I wrote this: compass and location in the 3G model.

Apple will release the SDK later today. It’s not clear whether this’ll be pre-release and, therefore, covered under NDA or not. If it’s not, we’ll have how-to pieces starting shortly. Update: it’s available, and it’s pre-release. We’ll queue up our pieces for after the NDA drops.

What’s notable about the SDK? From the press event we can say:

There’s still no multi-tasking.

With the larger screen comes many new UI elements and layout options. These options aren’t lifted directly from OS-X, but are a blend of OS-X and iPhone OS: Apps can have panels/panes. Tables can have multiple columns. Tab interfaces have been expanded to include OS-X like top-of-screen tab-window/panel picker style (vs. bottom of window iPhone tab menus). Most notable:

Pop-over/drop-dow style menus are in frequent use; e.g., the bookmark and font-chooser floating menus.

The iPhone HIG and other Apple documentation make it clear that iPhone is considered a one column, one window platform. Does that imply the pop-over style menus won’t come to the iPhone?

Lots of implications here for building your app specifically for one device or the other; if the new goodies on the iPad become expected/familiar then bare iPhone apps will rub iPad users the wrong way; conversely, spending the time to make a true iPad app has to be weighed against the 70MM devices with iPhone display specs.

As an incentive for developers Apple will be pimping iPad optimized apps in the store.

Finally, Apple is selling the iWork apps in the App store at $9.99 each. Good move, setting a higher price expectation.

 

http://www.mobileorchard.com/

2010년 1월 21일 목요일

Developer-To-Developer iPhone App Distribution Without Ad-Hoc Provisioning

Developers can share iPhone applications that they’ve created with other iPhone developers without using ad hoc provisioning. Setting this up takes less than 5 minutes.

This is one of the method’s I’m considering for distributing CodePromo, my app that makes it easy to generate and share promo codes from the iPhone.

This article provides step-by-step instructions; it’s an expansion of the summary of the technique by Erica Sadun.

Overview

When you build and run on your development device Xcode first creates a device-compatible binary. and then signs it using your developer certificate. This latter step is what allows your device and its development provisioning profile to run the application. Apple provides tools that allow a binary’s signature to be replaced; if you’ve got a development certificate and a binary you can re-sign an app; it’s this re-signing that’s at the heart of this technique.

Preparing For Distribution

Step 1. Compile A Device-Compatible Binary

You create a device-compatible binary when you build to your device in Xcode. Open any iPhone project in Xcode and:

  1. In the Overview menu, choose iPhone Device for the Active SDK.
  2. While still in the Overview menu, choose Release for the Active Configuration. This will produce the smallest sized binary.
  3. Build the project using Build > Build from Xcode’s menu or by using the command-b keyboard shortcut.

Proceed to the next step after everything builds cleanly.

Step 2. Locate The Binary

Locate the compiled binary:

  1. Locate the Products folder under the project’s folder in the Groups & Files panel in Xcode. Expand it to show its contents.
  2. Locate the .app file for the app, right-click or command-click its icon, and click Reveal in Finder.

This’ll reveal the binary in the Finder.

Step 3. Create A Re-Signing Script

The binary you’ve created will only run on devices that have your development provisioning profile installed on them. For other developers to run your app they’ll have to re-sign the app using their provisioning profile. We’ll include a shell script to make it easier for them:

  1. Create a shell-script using the text editor of your choice.
  2. Paste the contents below into the editor.
  3. Replace the _APP_NAME_ in the shell script with the name of your app.
  4. Name it re-sign.sh and save it somewhere convenient.

#!/bin/bash
export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
codesign -f -s "iPhone Developer" _APP_NAME_.app

Step 3. Bundle Items For Distribution Folder

We’ll distribute a zip containing the binary and helper script from the previous steps:

  1. Open a new Finder window, navigate wherever you want the folder to reside and create a new folder. Use the app’s name as it will appear on the springboard as the name of the folder.
  2. Copy the app’s binary and the helper script from the previous steps into the new folder.
  3. Zip the folder.

And you’re ready to distribute the app.

The next section of this article shows the steps the recipient uses to install the app onto their developer provisioned iPhone.

Installing The App

It’s straightforward to install an application prepared as above:

Step 1. Extract and Re-Sign The App

  1. Extract the contents of the zip to a convenient location.
  2. Open a terminal window and navigate to the folder containing the zip’s contents.
  3. Type re-sign.sh from the command prompt to run the helper script to re-sign the binary. The script will output _APP_NAME.app: replaced existing signature if successful.

Step 2. Install The App

  1. Connect your phone to your computer and open Xcode.
  2. Use Xcode’s Window > Organizer, or the keyboard shortcut command-o, to open the Organizer.
  3. Select the phone from the DEVICES section in the left panel.
  4. Click the “+” beneath the Applications list/section of the Summary tab in the right panel, locate the .app file in from the zip, and click Open.

And that should do it. The app should now installed on the phone.

 

http://www.mobileorchard.com/developer-to-developer-iphone-app-distribution-without-ad-hoc-provisioning/

2010년 1월 14일 목요일

CodePromo: Generate/Send Promo Codes From Your iPhone — Beta Testers Wanted

CodePromo is an iPhone app that interacts with iTunes Connect to generate promo codes for easy sharing.

Motivation

You’re chatting with someone. Might be at a bar, conference, or business meeting. You’re talking about your app — paid app to be precise — and decide that you’d like to share a copy of the app with your conversational partner. How would you do it?

Promo code, you’d naturally think. Take out your phone, bring up Mobile Safari, log into iTunes Connect, click through to generate a promo code and… nothing. You can’t generate promo codes from Mobile Safari.

Existing plan-B options are unacceptable: Get their contact info, send it to them later; loss of instant gratification. Take out your wallet, hand them the cost of the app; get 70% back when Apple pays out.

CodePromo

CodePromo makes it easy to generate promo codes and share them from your iPhone. It’s a native app that manages all of the iTunes Connect interactions right from your phone. Once it’s generated a promo code, you can email it right from the app or copy it to the pasteboard and e.g., send it via SMS. This <30 second video demonstrates it in action:

RSS readers: view the video

Beta Testers Wanted

I need a handful of beta testers. Free copy for your help. Beta testers need to be in the US, have paid apps in the store, have promo codes remaining, and have occasion to want to share their apps in-person. Please email me if your interested; please include an iTunes link to your apps (instructions). I won’t need your UDID.

But Wait…

If your reaction to this is, “it’ll never get into the store” please hold your horses. I’ll explain later. Promise.

 

http://www.mobileorchard.com/codepromo-generatesend-promo-codes-from-your-iphone-beta-testers-wanted/

Simulating Native Apps In iPhone Simulator For Better Demo Videos

As described in this article, the iPhone Simulator combined with screen capture software provide an easy way to record a demo video for your app.

However, if a key part of your app involves launching the Maps application to obtain directions or other native functionality like launching a YouTube video, the iPhone Simulator alone will fall short.

In this tutorial, you will learn how to emulate native apps in iPhone Simulator.

Background and Process

Applications such as Where To? and iGarageSale provide directions to specific locations by launching the Maps application. This is done by calling openURL: in UIApplication with an http://maps.google.com/… URL. The iPhone has a built-in custom URL handler for Google Maps URLs, so when the app is run on an iPhone, the Maps application is launched.

However, when the app is run on iPhone Simulator, Safari is launched and a standard Google Maps webpage is loaded. A similar effect can be accomplished in iPhone Simulator by creating a mock Maps application that uses screen shots taken from the native Maps application on the iPhone.

Outline

Creating and using a mock application involves three steps:

  1. Capture screen shots from the native application on the device.
  2. Download a mock application from GitHub and customize it.
  3. Create a demo build of your application to launch the mock application instead of the native one.

Capture Screen Shots of the Native Application

For every screen shot of the native app that you would like, tap the home button and the lock buttons simultaneously. The screen will flash indicating that a screen shot has been taken. For an added bonus, take a screen shot as the native app immediately as it is launching. This will serve as the Default.png file for your mock application. Then, sync your iPhone with iPhoto to download the screen shots taken.

Download The Native App Simulator Package from GitHub and Customize It

Step 1: Download the Native App Simulator package from GitHub

Either download a zip or clone the Native App Simulator repo by by opening a Terminal window and typing:

git clone git://github.com/performantdesign/NativeAppSimulator.git

There are two Xcode projects provided, MockApplicationLauncher and MockMaps. MockApplicationLauncher provides an example of how to launch your mock native application through a demo build and a custom URL handler. MockMaps is an example mock native application that displays the screen shots you’ll capture.

Step 2: Add screen shots to mock applications

Open the MockMaps application in Xcode. Copy the screen shots into your mock applications Resources folder as shown. If you captured the startup screen, be sure to rename it to Default.png before adding.

Step 3: Update DemoSequence.plist with references to the screen shots

Edit DemoSequence.plist. The property list file consists of an array of dictionaries, with each dictionary representing a screen shot in sequence. The dictionary should contain two key/value pairs – a number with a key of Delay and a string with a key of Image. If Delay is 0, you will advance to the next screen shot by tapping on the screen. If Delay is greater than 0, the screen shot will automatically advance after the number of seconds denoted. This is useful for showing a time delayed Loading… sequence.

Step 4: (optional) Add an icon and bundle display name to match the native app

If the home screen is displayed as part of your demo, you want to make sure your mock application has an appropriate display name and title. Edit the Info.plist file to set the appropriate values. You can grab the Icon.png for the application you are emulating from the SimFinger fake apps repository.

Create a Demo Build of Your Application

The example MockMaps application provided handles custom URL’s with a scheme of mockmaps:. A demo build of your application will be created that will launch the mock application instead of the native application. An #ifdef will be used to detect a demo build to launch the mock application instead. This technique is outlined in the MockApplicationLauncher project provided on Github.

- (IBAction)getDirectionsTapped {
	NSString *urlToLaunch;

#ifdef DEMO
	urlToLaunch = @"mockmaps://localhost/";
#else
	urlToLaunch = @"http://maps.google.com/maps?saddr=20807+Stevens+Creek+Blvd,+Cupertino,+CA&daddr=22350+Homestead+Rd,+Cupertino,+CA";
#endif

	[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlToLaunch]];
}

End Result

 

http://www.mobileorchard.com/simulating-native-apps-in-iphone-simulator-for-better-demo-videos/