This repository is for the iOS sample application using ARGear SDK.

Overview

ARGear sample application for iOS

(c) Copyright 2021 Seerslab. All rights reserved.

This repository contains an iOS sample application that uses ARGear SDK. It might be helpful when you write your own applications based on the ARGear SDK. Compared to the previous SDK, the new SDK provides easier APIs including cloud connections and network operations. Please refer to the API documentation in the doc directory. If you find any bugs, problems, or if you have any suggestions, please register them as issues of this repository.

Note: This release doesn't contain full features of SDK and the features will be added step by step.

  • 28th December, 2021: 3D contents augmentation and rendering, contents download, SDK validation.

1. Build & Run

You can build the sample application using Xcode.

1.1 Prerequisites

  1. Xcode
  2. Required deployment target is iOS 13.0 or higher
  3. Architecture : arm64

1.2 Xcode

  1. Open ARGearSDKSampleIOS project
  2. Click Product > Run (⌘ R) menu or the button in the toolbar
  3. Sample app will be built and installed on your device

2. Programming Guide

Please read while referring to the code of the sample project.
Also you can see the detailed information of the API and parameters from the API document.

2.1 Creating SDK Components

Prior to writing your own application code, you should create your project to communicate with your mobile application from the ARGear Console. After you log in to the console, you can get information on how to create the project from the support section. If you create the project successfully, you will see the KEY information to use SDK validation as below.

Project Key Information
The Application ID should be same with your mobile appication package name.

Above key information is the same as this sample project.

Using this key information, you can create an SDK interface instance, ARGHumanAR, as follows:

let config = ARGHumanARConfig()

config.cmsURL = URL(string: "https://apis.argear.io")!
config.apiKey = API_KEY
config.secretKey = SECRET_KEY
config.authKey = AUTH_KEY

humanAR = ARGHumanAR()
humanAR.setConfiguration(config)

2.2 Getting content categories

Initialize SDK component with content category.

humanAR.initialize(.face)

Content categories are defined as below.

none             : Nothing
face             : Face AR
beautification   : Beautification
bgSegmentation   : Background Segmentation
faceSegmentation : Face segmentation ( to be added ) 
footFitting      : Foot pose fitting ( to be added ) 
glassFitting     : Glass fitting ( to be added ) 
all              : All categories

You can get information about currently available categories by using getContentCategory(_:) .

// UUIDs of each categories
let categories = humanAR.getContentCategory(key)

2.3 Getting list of contents

To augment various contents on the human face in the screen, you need to get the content information from the ARGear cloud. The contents information includes UUID, thumbnail URI, content URI, and so on. You can get the content list by using getContentList(_:offset:count:) API.

// Array of `ARGContentInfo`
let contents = humanAR.getContentList(categoryUUID, offset: offset, count: count)

This API provides the content list under certain category. The offset is value of the starting position from the begining and the count is reqeust number of contents.

And then use getContent(_:) to download content.

let content = contents[0]
humanAR.getContent(content)

2.4 Getting camera video frames and passing to SDK for image processing

You can get the camera video frame data from AVCaptureVideoDataOutputSampleBufferDelegate .

extension SampleViewController: AVCaptureVideoDataOutputSampleBufferDelegate {
  func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
    guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { return }

    let cameraFrameData = ARGCameraFrameData(cameraConfig: cameraConfig, buffer: pixelBuffer)

    // Processed data is set to HumanAR
    let resultFrameData = humanAR.process(cameraFrame: cameraFrameData)

    DispatchQueue.main.sync {
      // Simple preview. Implement Metal render if needed.
      previewView.layer.contents = pixelBuffer
    }
  }
}

2.5 Applying & Clearing Content

To apply (or clear) specific content on the screen, you can use following APIs.

// Apply specific content
humanAR.applyContent(uuid: contentUUID)

// Clear specific content
humanAR.cancelContent(uuid: contentUUID)

The content selected by the user is applied after clearing the previous content.

You might also like...
Basispay IOS SDK Version 2

BasisPay-IOS-KIT BasisPay IOS Payment Gateway kit for developers INTRODUCTION This document describes the steps for integrating Basispay online paymen

Release repo for Gini Bank SDK for iOS
Release repo for Gini Bank SDK for iOS

Gini Bank SDK for iOS The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips. By integra

Da Xue Zhang Platform Lvb iOS SDK

Cloud_Lvb_SDK iOS API Reference Dxz Meeting iOS SDK是为 iOS 平台用户音视频服务的开源 SDK。通过大学长开放平台自研RTC,RTM系统,为客户提供质量可靠的音视频服务。 类 类名 描述 CLS_PlatformManager SDK的音视频主要

PayPal iOS SDK

PayPal iOS SDK Welcome to PayPal's iOS SDK. This library will help you accept card, PayPal, Venmo, and alternative payment methods in your iOS app. Su

Unofficial Notion API SDK for iOS & macOS
Unofficial Notion API SDK for iOS & macOS

NotionSwift Unofficial Notion SDK for iOS & macOS. This is still work in progress version, the module interface might change. API Documentation This l

150,000+ stickers API & SDK for iOS Apps.
150,000+ stickers API & SDK for iOS Apps.

English | 한국어 Stipop UI SDK for iOS Stipop SDK provides over 150,000 .png and .gif stickers that can be easily integrated into mobile app chats, comme

Spotify SDK for iOS
Spotify SDK for iOS

Spotify iOS SDK Overview The Spotify iOS framework allows your application to interact with the Spotify app running in the background on a user's devi

Headless iOS/Mac SDK for saving stuff to Pocket.
Headless iOS/Mac SDK for saving stuff to Pocket.

This SDK is deprecated Howdy all! 👋 Thanks for checking out this repo. Your 👀 mean a lot to us. 💗 Unfortunately, this project is deprecated, and th

Evernote Cloud SDK for iOS
Evernote Cloud SDK for iOS

Evernote Cloud SDK 3.0 for iOS This is the official Evernote SDK for iOS. To get started, follow the instructions bellow. Additional information can b

Owner
ARGear
ARGear is the easiest way to integrate AR functionalities into any app.
ARGear
Sample project with local swift package linked NDI SDK.

NDISwiftPackage Sample project with local swift package linked NDI SDK. Preparation Install NDA SDK on your mac. Software Developer Kit Make package c

Naruki Chigira 4 Dec 20, 2022
Px-mobile-sdk-demo-app - PerimeterX Mobile SDK - Demo App

About PerimeterX PerimeterX is the leading provider of application security solu

PerimeterX 1 Nov 20, 2022
Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter 45 Nov 29, 2022
Sample iOS AR app using AR Quick Look API

ARQLSanta This is a minimal AR iOS app that uses the AR Quick Look API, displayi

Yasuhito Nagatomo 9 Aug 23, 2022
Native iOS implementation of RadarCOVID tracing client using DP3T iOS SDK

RadarCOVID iOS App Introduction Native iOS implementation of RadarCOVID tracing client using DP3T iOS SDK Prerequisites These are the tools used to bu

Radar COVID 146 Nov 24, 2022
SingleEntry in SwiftUI using the Capture SDK

SingleEntrySwiftUI for iOS Simple iOS app with SwiftUI for showing the use of Capture SDK. IMPORTANT When using/installing CocoaPods in a new project,

Taif Al Musabe 2 Jun 4, 2022
This is swift project example to connect VNPTSmartCA SDK using Swift Language.

Example source code to integrate with VNPTSmartCA iOS SDK To run the example project, clone repository, and run pod install Requirements Installation

null 1 Feb 14, 2022
iOS_UHF_Sample is a sample App to demonstrate how to use UHFSDK library.

iOS_UHF_Sample is a sample App to demonstrate how to use UHFSDK library.

GIGA-TMS 0 Dec 6, 2021
TelegramStickersImport — Telegram stickers importing SDK for iOS

TelegramStickersImport — Telegram stickers importing SDK for iOS TelegramStickersImport helps your users import third-party programaticaly created sti

null 35 Oct 26, 2022
Muxer used on top of Feed iOS SDK for airplay

FeedAirplayMuxer Muxer used on top of Feed iOS SDK for airplay purposes. Demo Project --> https://github.com/feedfm/AirplayDemo Feed Airplay Muxer is

Feed Media 0 May 6, 2022