Moodstocks iPhone SDK enables you to integrate image recognition into your iPhone mobile applications in seconds. It has been built to work on iOS SDK 3.0 and higher.
Basically it wraps the native image picker component, and adds some magic like encoding, querying, and parsing. And you get a cool scanning effect for free!
To integrate Moodstocks iPhone SDK into your application:
- Drag
MoodstocksSDK.handlibMoodstocksSDK.afrom thelibrary/directory into your Xcode project - On your Xcode project, expand the Targets section and double-click your application's target
- Click on the General tab and add the following frameworks into the Linked Libraries section:
CFNetworkSystemConfigurationMobileCoreServicesCoreGraphicsQuartzCorelibz.1.2.3
- Click on the Build tab, choose All Configurations and add
-ObjC -all_loadfor the Other Linker Flags setting
You'll find an example application into sample/DemoApp which is properly configured.
Before you start using the SDK, you must first register for an account on Moodstocks API, create an access key and import reference images to be recognized.
Then, the SDK is pretty similar to the iOS UIImagePickerController:
- Initialize an
MImagePickerControllerwith your API key and secret pair - Present it modally
- Implement the
MImagePickerControllerDelegateprotocol:imagePickerController:didFinishQueryingWithInfo:: this method is called when the image recognition has completed. It returns a dictionary that includes thestatus(okorerror), themessage(useful when an error occurs) and the list ofmatchesthat refer to the item IDs you've imported into Moodstocks API. This list is empty in case of no match found.imagePickerControllerDidCancel:: this method is called when the end user decides to cancel the current image image picker
Fore more details, please refer to the sample/DemoApp example application that fully illustrates how to use the SDK.
For more details feel free to join us on our support chat, or contact us by email at [email protected].
Copyright (c) 2010 Moodstocks SAS