Sending iOS Push Notifications with PushLayer

We’ve just launched a new service, called PushLayer, that makes sending push notifications to iOS devices a breeze.

iOS push notifications with PushLayer

Over the years, we’ve worked on quite a few iOS apps, and more than a few have had to deal with push notifications in one form or another. Unfortunately, dealing with device tokens and communicating with Apple’s Push Notification Service (APNS) is cumbersome, very time consuming, and isn’t tolerant of mistakes.

In the past, we’ve tried using one of the other services out there, but have been very frustrated when we couldn’t effectively debug notifications that weren’t delivered (in fact, on one of our most recent projects, we went months without getting any notifications from our staging builds). We were also always mystified by pricing based on “active” devices.

We’ve also tried rolling our own system for communicating with Apple and managing device tokens. While this gave us the best flexibility in terms of debugging, it required several weeks of intensive development time, and was not forgiving of mistakes (for instance, Apple will blacklist sending notifications if you don’t properly monitor their feedback API). It also leaves us with a long-term commitment to ensuring we update our code to any changes Apple rolls out.

So we come to PushLayer, a service we’ve been working on over the last few months, that makes sending iOS push notifications about as simple as it gets. For instance, to send a notification, you just:

  1. On the iOS device, prompt the user to enable push notifications. If the user accepts, iOS gives you a unique device token.
  2. Store this token someplace safe (such as on your own server as you’ll need to reference it when you want to send a notification).
  3. Send a POST request to PushLayer using our handy RESTful API, referencing the device token you got in step #1. For testing purposes, you can even login and use our handy interface for constructing a notification.

That’s it! PushLayer communicates with Apple, constructs the binary payload, and the notification pops up on the device usually within a few moments.

PushLayer has a number of compelling features we wish we had when we were last working with APNS:

  • Every notification gets an entry in your PushLayer account, allowing you to drill into what the status of each notification actually is.
  • Save time by not having to roll your own communication system with APNS (and avoid having to maintain it later).
  • Pay for the actual notifications you send rather than some vague concept of “active” devices, with prices significantly below other services out there.

If you’ve been thinking of adding push notifications to your iOS apps, give PushLayer a try. It’ll save you a ton of time.

Make music on the iPad with Shapemix

We’ve been working on a fun, powerful, music-making iPad app called Shapemix and are thrilled to see it go live in the App Store!  We’ve been working with Colin Owens and his team to build the app and get it launched, and are thrilled to see some of the positive press it’s already gotten (check out the Mashable article).

The app is designed to help you create music in a fun, intuitive way that anyone – even those without a musical background – can pick up quickly.  The idea is to grab some tracks (at launch, there were over 100 free tracks in the Shapemix store), then mix them together to create completely new songs.

There’s two ways to mix tracks, each giving you different levels of control over your song:

Mix View

Each track is represented as a circle: as the song plays, you’ll see visual cues representing which track is playing and what effects are applied to it.  Tracking these circles around the screen changes the volume and pan of the track.

It’s a great way to get real-time feedback of changes you make for your song.  It also takes great advantage of the multi-touch capabilities of the iPad.

Time View

As you create your songs, you’ll get to a point where you want finer-grained control over what tracks are being played.  That’s where the time-view comes in.  It looks a bit like a traditional music-editing program, but still retains the app’s simplicity.

You can drag clips around, solo and mute, and decide exactly where each clip will start and stop in your song.

We were thrilled to be part of the development team.  Shapemix is made up of a number of great musicians, designers, and programmers.  Be sure to check out Shapemix in the iTunes store.

Getting your iOS app to talk to web services and APIs

Many iOS apps connect to HTTP-based APIs, which may be RESTful but are often just XML and JSON responses to various URLs with various methods (usually a GET or POST, but also PUT and DELETE).  There’s no one methodology for talking to these types of APIs in an iOS app, but here’s the basic process I use.

If the web service happens to be a Ruby on Rails application and follows the standard RESTful practices, then Objective Resource is a great tool.

If not, then what I tend to do is use ASIHTTPRequest which provides a nice network layer. Depending on the API, I might use ASI objects directly, or else I’ll subclass an existing ASI class to add per-request functionality (such as authentication or response parsing).

You usually want to run web requests in the background, so that the UI isn’t blocked while waiting for the request to finish. There’s always the background thread route, but a nice “Objective C” style approach that ASIHTTPRequest provides is to instead provide a delegate which is called when the request finishes (see also “Creating an asynchronous request” at http://allseeing-i.com/ASIHTTPRequest/How-to-use). In many cases the request delegate is the view controller that initiates the request.

The model layer depends on the complexity, and also what format the data comes in. Most of the APIs I’ve worked with use JSON, for which json-framework or yajl-objc are good for parsing. These usually give the data parsed into base classes like NSString, NSArray and NSDictionary. Sometimes that’s sufficient, or if I want the models to exist as their own classes, then I have the models inherit from a base class that takes care of turning the NSDictionary/NSArray into properties.

Finally for caching, Core Data provides a good way to persist to disk. For caching in memory, I have the requests occur in a separate “manager” class that is shared between controllers. These managers use the Singleton design pattern as described here.

Why Email Confirmations Are Bad

When designing a web application it’s common to see the following user registration process:

  1. User fills out the registration form, including their email and password.
  2. After submitting, the user is told to check their email for a confirmation link.
  3. After waiting for the email, they click the link and are marked as “activated” on the site.
  4. The user can now start using the site.

The thinking behind this is that you need to make sure the user has provided a valid email address, and one that is actually theirs.

However, there are a number of problems with confirming email addresses this way. It breaks up the user’s flow; if I’m signing up on a site I’m eager to start using it. Needing to wait for an email breaks that flow.

Second, email is a notoriously unreliable delivery mechanism. Because of the huge amount of spam prevalent nowadays, email providers are especially quick to err on the side of spam, if they even deliver the email at all. Confirmation emails in particular can often appear spammy, as they usually have a long link with a lot of random characters, and often contain only the user’s email address without their real name.

The last thing you want is someone choosing to sign up for your site, only to never start using it because they got distracted waiting for an email, or move on to something else because the email never comes.

Rather than blocking all functionality until the email address is validating, instead consider allowing as much use of the site as possible. When they get to a point where it’s necessary to know that the email they signed up with is correct, you can say something like “We need to verify your email address before you can proceed. Click here to re-send”. This also has the benefit of giving people a chance to re-send the emails if it was missed the first time.

Most functionality doesn’t require a verified email address. The main exception is that you don’t want to send out too many emails without knowing a user’s address. Otherwise, I could signup with someone else’s address and cause them to be spammed. This means you might want to wait on things like notifications (friend requests, direct messages, etc). Other than that, there’s little that’s truly required.

It can be tempting to require a verified email address for all functionality. However, the added complexity is worth the improved user experience.

From Zero to a Million Users

Xobni and Dropbox, two highly successful VC-backed ventures, had an impressive growth in their users within a fairly short period of time (2 million users within 2 years).  Adam Smith of Xobni has a presentation discussing some many of the lessons learned from the experience of these two startups.

Of the strategies they tried, they used “learn without launching” techniques to gauge market fit: including AdWords tests, landing pages, and building a list of email addresses of people interested in the product.

Their private beta launches were also used to create scarcity and buzz, which further increased their waiting lists.  In addition, they made it very easy for users to tell their friends via social media.  A referral program even resulted in a 50% increase in signups.

Finally, and perhaps the most important point any entrepreneur needs to calculate, the acquisition cost of customers offset by the total lifetime value of that customer.  Finding the cheapest way to acquire customers while maximizing the lifetime value of that customer is the key to any business (some examples, including Netflix, are included).

Check out the slides.  It’s a great set of lessons learned for two highly successful consumer-facing sites that focused on doing one thing, and one thing very well.

How to Use a Blog to Increase Organic Traffic

There are many great reasons for businesses to blog but one clearly stands out, increasing your keyword rankings and growing your organic search traffic.

via How to Use a Blog to Increase Organic Traffic.

Both on-page and off-page factors are important in building traffic from search engines.  Obviously there’s more you can do immediately about on page factors. Here HubSpot discusses how to optimize blog posts for keywords for which you’d like to rank well.  Selection is important, because you don’t want keywords that are overly competitive, but neither do you want keywords no one will search for.  The route advocated here is to think “long tail” and grow a large set of optimized pages that slowly bring in traffic.

How Online Businesses Make Money

The majority of people online aren’t on the Internet to make money. Instead, they use the Internet for things like entertainment, news, games, and keeping up with friends and family.

However, for those who want to want to start a business, the Internet is a great place to look. It’s a relatively new, growing area that still has tons of potential. Because of its newness, there are almost certainly new sources of revenue still to be discovered and explored. It’s never been easier or cheaper to start a business.

With that said, there are a number of common models that have developed. Each have their tradeoffs with regards to risk and reward, which we’ll compare below.

1. Advertising

Advertising was one of the first business models to develop on the Internet, given it’s long history on paper, radio and television. In the early days, ads were sold like they are on television. They were generally sold on highly popular destination sites, with the goal of being in front of as many eyes as possible.

Google was one of the first to really take advertising to a new place on the Internet. By using peoples’ search queries they were able to target ads better than ever before, while simultaneously reducing the barrier of entry for companies looking to advertise by only charging an advertiser when a user clicked on their ad.

You don’t need to be a search engine to make money from advertising. Indeed, in many cases advertising is the de-facto model for converting a large number of users into revenue. Be careful though: part of Google’s success was that people come to a search engine looking for something, and if an ad gives them what they want, they’ll click it. On many sites, users aren’t necessarily looking for anything, and click-thru rates can be notoriously low.

Investment: Medium. Building a website, hosting it and marketing it requires some capital. However, the idea is to start making money soon after you launch, and hopefully make a return on your investment within a short amount of time.

Odds of success: Medium. As shown in the Google example, there is the potential for a lot of revenue in advertising, but it’s also a notoriously difficult market for websites. Getting a lot of traffic is key here. It also requires you to essentially become an advertising company, which means your real customers are your advertisers, not your users.

Potential return: Medium. It’s very difficult see huge profits from advertising. You’re basically a middleman between other companies and their potential customers, and there’s a limit to how much companies will spend on adveritising. Companies that depend on advertising are also very prone to swings in revenue, as advertising budgets are often the first thing to be cut when times get tough.

2. Promoting an existing product or service

In this case, you already have a business with a source of revenue, be it a restaurant or a law firm. Creating a presence online can be a great way to dramatically expand your customer base.

What’s great about this is that if you’re a profitable business, then you have a proven track record. On the other hand, if you don’t already have a business, starting an offline business can be very expensive (buying property, getting licenses, etc).

Investment: Medium. Again, the main investment is building and marketing the site. However, if you already have a profitable product or service, then you should already have the capital to create an online presence.

Odds of success: Medium to High. What’s key is marketing properly. Simply putting up a webpage doesn’t guarantee new business. On the other hand, keen marketing can make your revenues explode. A great example of this is Wine Library, which started as a New Jersey liquor store and came a $50 million dollar business thanks to the marketing of Gary Vaynerchuck.

Potential return: Low to Medium. While there are certainly cases where a small but successful company can go on the Internet and exponentially increase their revenue by going from local to global, you’re also opening yourself up to a lot more competition. But if your competition isn’t online yet (or isn’t competing effectively online), it’s a great way to get some new customers.

3. Selling an online product or service

The difference here is that you’re creating something new, and usually something that only exists on the Internet. An example of an online product is an eBook, while an online service might be a dating site.

There’s a lot of money changing hands on the Internet these days, and the more businesses and individuals depend on the Internet, the more need they have for other services and products. Subscription models are popular here, where customers keep paying as long as they get the desired service.

Investment: Medium to High. All the costs that exist in the cases above exist here, but multiplied. Not only do you need to create a compelling website, it needs to be so compelling that people will actually give you their money. Similarly, your marketing needs to be good enough to actually convince people to buy your product instead of just going to your site.

Odds of success: Low to Medium. Certain kinds of online businesses can do quite well for themselves. In particular, doing business with other businesses (B2B) is a growing online market. 37signals is a pioneer and great example of this kind of company. Be careful though, as consumers are traditionally loathe to part ways with their hard earned money for an online service.

Potential return: Medium to High. A successful online business can easily make tens or hundreds of millions of dollars a year. The key is to be scalable. In other words, being able to grow from 100 customers to 10,000 customers while remaining profitable. One of the nice things about the Internet is that there’s less friction holding back your growth (you don’t need to spend $10 million on a new factory, for example)

4. Be acquired by another company, or go public

This a trend that’s been exemplified by some high profile acquisitions made a few companies including Google, Yahoo and Microsoft. Since the dot-com era, Internet IPOs are much less common, and there are a lot startups whose main goal is to be bought out by a bigger company. It doesn’t always have to be a billion dollar acquisition by Google; there are many small (under $1 million) acquisitions made by medium sized companies.

This is a risky model to say the least. There are many factors that cause an acquisition to take place, most of which are out of the control of a small business. While Google might acquire your company because it creates synergy with their products, they also might purchase a competitor or just build your product themselves.

Investment: Very High. It’s very unlikely that you will be acquired without having a large number of existing users and/or a proven track record. This means not only building your business and marketing it, but sustaining it and growing it to the point where another company finds value in what you’re doing. You almost certainly need outside investments to get you to this point, which means angel funding or more likely venture funding. This opens up a new set of challenges as you now need to market your business to an investor.

Odds of success: Very Low. For every very public example like YouTube (which Google acquired for $1.2 billion) there are countless unseen examples of failed companies who never see the big payday and run out of money trying.

Potential return: Very High. If you’re one of the lucky examples, you can easily make tens of millions (or more). But remember the odds of this happening are low. Make sure you’re willing to take a big risk for a potentially big reward.

5. Get traffic/users, then choose one or more of the above

This is a bit of a side case that doesn’t exactly compare to the examples above, but is worth mentioning nonetheless. There are a growing number of companies that launch without figuring out how they will make money.

The idea is to focus on getting a large number of users, and that when that happens, making money from those users is comparatively “easy”. Twitter is a high profile example of this, having only recently starting to announce a business model. When the time comes, any of the above models can be considered.

Investment: High. Outside funding (angel or venture) is almost certainly required.

Odds of success: This is hard to say, as the market hasn’t really played itself out for this one. My personal opinion is that the odds are still very low, because outside funding means that investors will want a big return, and it’s unlikely advertising will do that. This means one of two things. Either you come up a really great paid service, and even then you’re at a disadvantage as you now have to either convince people to pay for something that used to be free, or create a really good new idea that people will pay for. The other option is to look for an acquisition, which is also risky as discussed above.

Potential return: High. If you’re able to get a large number of users, you get to start with a big customer base. Or if you sell the company, you can possibly get a nice payday.

If you want help building a business, or just want to discuss a potential business, please contact us — online business is our passion!

Apple's Thoughts on Flash

There’s a very interesting article up on Apple’s site from Steve Jobs himself discussing the decision to keep Flash off Apple iPhones and iPads.  I thought I’d select a couple of the most interesting:

Flash was designed for PCs using mice, not for touch screens using fingers. For example, many Flash websites rely on “rollovers”, which pop up menus or other elements when the mouse arrow hovers over a specific spot. Apple’s revolutionary multi-touch interface doesn’t use a mouse, and there is no concept of a rollover. Most Flash websites will need to be rewritten to support touch-based devices. If developers need to rewrite their Flash websites, why not use modern technologies like HTML5, CSS and JavaScript?

In addition to the above, there’s also video which: decoding video to display on a computer screen using software requires a lot of the CPU (and kills battery life), while using a hardware-based encoding (H.264) is much more efficient.  Flash didn’t support H.264 until very recently.

We know from painful experience that letting a third party layer of software come between the platform and the developer ultimately results in sub-standard apps and hinders the enhancement and progress of the platform. If developers grow dependent on third party development libraries and tools, they can only take advantage of platform enhancements if and when the third party chooses to adopt the new features. We cannot be at the mercy of a third party deciding if and when they will make our enhancements available to our developers.

One of the most intriguing points Jobs makes is the concept of being beholden to a third-party to make updates to their libraries whenever Apple introduces a new technology.  With the speed of changes in the iPhone OS, I can see his point.

Perhaps Adobe should focus more on creating great HTML5 tools for the future, and less on criticizing Apple for leaving the past behind.

via Thoughts on Flash.

When To Place Ads On Your Site

Many clients have approached us for suggestions to monetize their site, and invariably there are questions about advertising. Although it’s easy to place ads on your site, there are reasons why it may not lead to the kind of revenue you might expect. There are also some drawbacks that need to be considered as well.

Of course, not every site is a good candidate for advertising in the first place. If your business model is about selling products or services through your site, incorporating ads could reduce your credibility (not always, such as if you place ads only on your blog for instance). On the other hand, if you’ve created a comprehensive site with an extensive library of content, advertising makes perfect sense.

When is the Right Time To Place Ads on a Site?

First and foremost, placing ads on a site is not a panacea for generating revenue. Chances are, you won’t see much revenue from your ads, and you can actually drive away traffic (and reduce credibility) by doing it incorrectly. Since each site is different, only the site owner knows the kind of expectations of its audience.

Take it slow: don’t place any ads on a site right off the bat (expect in a few circumstances). Instead, focus on building your audience. Increase the number of loyal users, get people to participate, and build your traffic levels. Use this time to establish credibility for your brand, and to become known as an authority in your field.

Advertising

Once you’ve built a solid audience, then it’s time to start experimenting with advertising. But again, take it slow. Try placing some Google text ads in an unobtrusive place on your site and gauge the reaction of your users. Then, continue to experiment. Try some text ads in other places around the site, try alternating between text and banner ads, etc.

At every step, keep very careful track of your results: reactions from audience members, traffic levels and impression counts, revenue results, and of course the click-through (CTR) rate. Meticulously track all of this in a spreadsheet, and be sure to provide ample time for each experiment.

Over time, you’ll come up with a set of data in your spreadsheet that identifies the key areas of your site that are best for advertising: what pages and the placement on those pages that generate the highest CTR. You’ll also learn what spots don’t help and detract from the usability of your site.

Setting up carefully-constructed experiments and allowing plenty of time will give you the data to optimize your advertising: giving you the greatest revenue with the least distraction for your users.

21 Creative Ways To Increase Your Facebook Fanbase

Yesterday, we created a Facebook page for Draconis (yes, it took us this long to do it).  For now, it’s just mirroring our blog content, but we may do more with it in the future.

In the meantime, I was curious about getting people to check it out.  Here’s a roundup of some creative ideas for getting people to become your fan: 21 Creative Ways To Increase Your Facebook Fanbase | Social Media Examiner.