Latest 0.2.5
Homepage https://github.com/aiqtech/aiqsdk-ios
License AIQ Platform LICENSE
Platforms ios 8.0
Authors

aiqsdk-ios

AIQSDK is a cocoapod for AIQ’s iOS SDK.

Full documentation

AIQSDK full documentation is hosted on a github page, you can acess it here:
https://aiqtech.github.io/aiqsdk-ios/

Integration using Cocoapods

AIQSDK is structure with subspecs with the default being AIQApi, the iOS library for using AIQ’s API.

Just with any other Cocoapod’s project, to use AIQ’s API for your iOS application, all you need is to include AIQSDK in your podfile.

Using CocoaPods, add to your podfile:

pod 'AIQSDK'

Run pod install to download AIQSDK and install it into your project. AIQSDK currently has no third party dependencies.

Initialization

In your App Delegate, initialise the SDK with the App ID and secret you obtained from the AIQ Dashboard Portal:

    #import <AIQApi/AIQApi.h>
    [AIQApi initializeWithAppKey:@"appID" appSecret:@"appSecret"];

Search using Image

AS part of AIQAiq framework, you can easily make API calls to AIQ’s platform API using AIQApiClient.

This is especially useful when you have built your own camera / scanner view.

    [[AIQApiClient sharedClient] scanWithImage:[UIImage imageWithData:imageData] 
                               withCompletion:^(AIQScanAPIResponse * _Nullable result, NSError * _Nullable error)
    {                  
        // no matches found
        if (error) {
            // handle it
            // display no image found
        } else {

            if (result.payloadUrl)
            {
                NSURL *payloadURL = [NSURL URLWithString:result.payloadUrl];
                // present and load trigger url in your webview controller
            }
        }
    }];

Search using Url

If you have an url for an image that you like to perform a search query, you can use the scanWithUrl method of AIQApiClient.

    [[AIQApiClient sharedClient] scanWithUrl:imageUrl 
                              withCompletion:^(AIQScanAPIResponse * _Nullable result, NSError * _Nullable error)
    {                  
        // no matches found
        if (error) {
            // handle it
            // display no image found
        } else {

            if (result.payloadUrl)
            {
                NSURL *payloadURL = [NSURL URLWithString:result.payloadUrl];
                // present and load trigger url in your webview controller
            }
        }
    }];

Latest podspec

{
    "name": "AIQSDK",
    "version": "0.2.5",
    "summary": "AIQSDK is the iOS SDK for AIQ's computer vision platform.",
    "description": "The AIQ SDK for iOS provides frameworks to utilze AIQ's computer vision platform:n* AIQApi       - iOS SDK Client for AIQ's platform API at https://api.aiq.tech",
    "homepage": "https://github.com/aiqtech/aiqsdk-ios",
    "license": {
        "type": "AIQ Platform LICENSE",
        "file": "LICENSE"
    },
    "authors": {
        "AIQ": "[email protected]"
    },
    "source": {
        "git": "https://github.com/aiqtech/aiqsdk-ios.git",
        "tag": "0.2.5"
    },
    "platforms": {
        "ios": "8.0"
    },
    "preserve_paths": "*.framework",
    "default_subspecs": "AIQApi",
    "subspecs": [
        {
            "name": "AIQApi",
            "vendored_frameworks": "AIQApi.framework"
        }
    ]
}

Pin It on Pinterest

Share This