Archive for 'Programming'

IAP: Anystone 0.4 vs. MKStoreKit 3.5

So we’ve got another project to add IAP support to tonight, and in line with the programmer’s natural desire to avoid work we’re checking out what news there might be on the open source IAP front since the 2.0 version of MKStoreKit we used a while back. And yes, there is a new playa in town:

Introducing the Anystone Store Kit

… However, there are a number of features missing that I wanted, and with no official source code repository for MKStoreKit I decided to kick off my own implementation: AnystoneStoreKit

Having read all of the background from Noel and Apple’s StoreKit documentation the decision was made to build a toolkit that met the following high level requirements:

  • Should not require changing toolkit source code to use it
  • Support for Consumable and Nonconsumable products (and eventually Auto-Renewable subscriptions)
  • Support for multiple product identifiers with the ability to link product ids against the same family (ie:buy 1 berry or 10 berries, they are still berries)
  • Detailed delegate methods to enable a great in-app store experience for the user
  • Lazy loading of the StoreKit data from iTunes
  • Ability to wipe the local data clean for an in app purchase so it can be restored or re-downloaded

That’s a nice list of features yes, and there’s some more interesting stuff planned; check out the 0.4 release notes on github.

However, MKStoreKit has been coming along too: there’s a github repository now, and it’s up to 3.5 with these recent release notes:

What’s new in Version 3.5

Support for Auto renewable subscriptions – MKStoreKit can automatically verify your subscriptions without requiring user to enter password

Bug fix in consumable module

What’s new in Version 3

Support for Server Product Model – MKStoreKit can automatically post the receipt data to your server and “remember” the purchases only when your server returns. The server code for the same in PHP is also available within MKStoreKit.

Well, given as how auto-renewable support is a requirement for us tonight, and server side verification is a probable near term request too, looks like MKStoreKit comes out as the winner and still champion here; we’ll go drop that in and update if we encounter anything worth mentioning. But if you think that Anystone looks like a better fit for your requirements, check it out and let us know how it worked for you!


A new open source option — mattt / CargoBay!

And ApptitudeNOLA / iTunesConnectHelper!

And dreamengineinteractive / DEStoreKitManager!

And robotmedia / RMStore!

(Don’t forget the Beeblex IAP validation service!)

Continue Reading →

Snippet: Shake Effect

Ever wanted to do a shake effect, like Springboard’s edit mode? Turns out it’s actually pretty easy:

[iOS] Springboard shake effect

In this short post, I’ll show you how to create an animation similar to the springboard shake effect, the one you see when you want to move or delete an application.

This little shake effect is funny, and easy enough to reproduce using CoreAnimation. When we take a look at this animation, we can see that it’s nothing more than a tiny repeated rotation of the icons…

h/t: @romainbriche!

Continue Reading →

String AR

This looks interesting if you’re interested in AR type stuff:

Augmented Reality Powered By String

Many developers ask me about natural feature tracking SDKs for mobile devices. One of the cool SDKs I like is the String SDK.

If you are already familiar with AR you’ll notice that String lives somewhere in middle of fiduciary markers and natural feature tracking. Tracking images combines the high contrast black border of a marker and a complex natural image in the centre. This mix actually works well. With a marker users can identify it as having special significance when presented to a camera (much the same way users identify QR Codes as having significance). With NTF images the challenge is telling the user that the image as has significance without providing a large amount of instructions. Combining the two therefore goes someway to solve the identification problem.

The String SDK which is currently available for iOS with an Android version in the works is powerful enough to build some pretty amazing solutions…

Doesn’t seem to be available for general download yet, but the contact form is here.

h/t: @AugmentedPlanet!


Also news that Qualcomm’s AR kit is coming to the iPhone “in July”.

And here’s mixare, another AR engine, if GPLv3 works for you.

3DAR looks interesting too.

Qualcomm’s renamed Vuforia SDK is pretty impressive.

Obvious Engine is another option.

Continue Reading →

Game Center Multiplayer

You know, it’s pretty much getting to the point that the first recourse for more information on any arbitrary iOS task should be “go look at Ray Wenderlich’s tutorials“. In particular, have you noticed any nice easy walkthroughs of setting up multiplayer matching using Game Center anywhere else? Nope, we’re pretty sure you haven’t. But why yes, yes His Rayness has a two-parter for you there:

How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 1/2

How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 2/2

Definitely worth a read if you’re implementing a game … or anything that would find direct device connections useful, really!

Continue Reading →


And in the “oddly compelling for no clear reason” category, today we present you with: Sphero! And what is Sphero?

Screen shot 2011-05-17 at 11.52.40 PM.png

It’s a … ball. A little rave ball that lights up. With an integration SDK for iOS and Android both.

We feel like we really should say something condescendingly sarcastic about geeks and their useless toys … but we have to go reserve one of these for ourselves now!

h/t: ManiacDev!

Continue Reading →

Adding Image Metadata

This’ll be handy if you’re saving images to the camera roll:

Adding metadata to iOS images the easy way

Are you writing a camera app or image editing app for iOS but are clueless on how to add geolocation to your pictures? … When developing Snap I wanted to add this feature so that it could actually replace the built-in camera app. And since the built-in camera app adds geolocation, along with a lot of other metadata to the images, Snap had to do this too.

I present to you my NSMutableDictionary category that will solve all your problems. Ok, maybe not all, but the ones related to image metadata on iOS anyway…

Source is on github, check it out!

h/t: @rwenderlich!

Continue Reading →

Tip: Category Instance Variables

Had you noticed that in recent runtimes every Cocoa object — no, seriously, every Cocoa object — can have arbitrary key/value data associated with it? No, we had not noticed that either. A particularly useful application of that, which no doubt you’ve wished for many times,

Faking instance variables in Objective-C categories with Associative References

In OS X 10.6 and iOS 3.1, Apple added Associative References to the Objective-C runtime. Essentially, this means that each and every object has an optional dictionary you can add arbitrary key/value pairs to.

This is a great feature, especially considering that Objective-C has forever had a feature to add methods to existing classes: categories. Categories, however, do not permit you to add instance variables. Using associative references, it’s easy to fake ivars.

Yep, it’s as simple as making your @dynamic implementation of the category’s declared @property wrap a couple C functions. Now that is something we will definitely be using in future!

h/t: @olebegemann!


Another example here of using associated references to add a UIActivityIndicatorView to every UIView.

Continue Reading →

Collect Them All Feature

This is a nifty idea for enhancing your brand identity/app discovery:

Adding a “Collect Them All” feature to your application

One of the pieces of polish that was called out recently in TweetBot was the way in which it displays which other TapBots apps that you have installed.


This is actually something I’ve been doing for a while in the WeeWorld apps I’ve worked on and since I’ve seen a few questions asking how it’s done I’ll give a quick run through.

There’s no hackery or use of private APIs as I’ve seen some people suggest; the trick is simply to publish a URL scheme for each application even if it isn’t used for anything else…

Yep, a solid idea, definitely!

h/t: @mattgemmell!

Continue Reading →

Free PayPal API Book

Here’s a hot action tip — pop over to the O’Reilly site today or tomorrow for a free book:

PayPal APIs: Up and Running


Does your web application provide users with a convenient way to complete transactions? This book introduces you to PayPal’s APIs with instruction and resources for integrating this popular payment solution in different application environments, including mobile. By the end of this book, you’ll have a clear understanding of what PayPal is and how you can get the most out of its powerful features for your particular payment situation.

Note particularly the “including mobile” part of that. Remember quite a while back we noted that they were beta testing an iOS PayPal integration component? Why yes, yes the last chapter of this book is all about that:

Mobile Express Checkout Library for iOS

PayPal provides a MEC library for iOS, available for download… This MEC library supports two different programming flows: it can be called either directly from your mobile application or via a PayPal button on your mobile website.

MEC Mobile Application Integration

MEC can be integrated into your mobile application, allowing you to start and end the payment process with screens inside your application…

And hey, you might want to put PayPal payments into an app sometime … so grab the book for free while you can!

(Or, if you’re stumbling across this via a search engine months later, here’s the regular book page for your convenience.)

h/t: @rwenderlich!

Continue Reading →

QLPreviewController Tutorial

OK, this is a really good one; if we ever had noticed the existence of QLPreviewController reviewing the 4.0 API changes, we had utterly and completely forgotten about its existence until today when we stumbled across

Preview Documents Tutorial with QLPreviewController

For the past few months I’ve been meaning to spend some time to check out the quick look document previewer on iOS – what follows is a short app that I wrote to get familiar with the QLPreviewController API.

For those unfamiliar with the quick look previewer, it is a framework that provides quick previewing of a range of document types – supported documents include iWork documents, Microsoft Office, Rich Text Format, PDF, images, text files and comma-separated (csv) files…

OK, there’s a good bit of iOS technologies we’re not as familiar with as we’d like, but we hope there’s not many more like this one that we somehow managed to miss completely. Sheesh. And here we’ve been dumping various forms of client-provided content into UIWebViews that it looks like we could probably display with vastly less effort on our part. Learn a new thing every day, indeed!

Continue Reading →
Page 30 of 95 «...10202829303132...»