Adding Eye Control To Your iOS App
Tags: tutorial, ios, eye, control
Published: 2023-09-07 23:08:32


![Athena iOS SDK & Demo Apps](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3hl1puabu0ueubu5xmx.png)

![Athena eye control demo apps](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4r259yq7hh7shklr9gz1.png)



Have you ever imagined that you could interact with your phone just by glancing at the screen or swiping the app display with your eyes, handsfree? Today, I am going to show you how you can use Athena’s Eye Gesture Framework in your iOS app to make the magic happen.

## Step 1 Download Free Athena SDK
You will need to download the SDK from:
https://athenasaas.io/download
The SDK is free for personal use. Once your have registered, the download link will be available. Download the zip file that contains all you need to explore Athena Eye Gesture SDK. There are four sample apps that is readily available for you to build with Xcode.

## Step 2 Examine SDK Contents
Let’s take a look at the contents of the SDK file first. The following shows the unzipped folder of the SDK:

![Athena Eye Control SDK](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3umui5w6ccnmu7zesg28.png)

As one can see, the SDK has two Xcode framworks: AthenaML and AthenaSDK. The SDK is developed based on AI and machine learning technology. There are 4 samples as of the time of writing. They are:

![Athena joystick demo] (https://miro.medium.com/v2/resize:fit:160/format:webp/1*UqJFyTAsPkZPOKDIdr8pPQ.jpeg)

- JoyStick Demo: Using eyes as a joystick control

![Volume Control Demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9li189utwodlh90bdmb.png)


- Volume Control Demo: Using eye gestures to control a UI that looks like a volume control used on iPhone


![Photo Slider](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5yw5qeoc66j2l6w8onpq.png)

- Photo Slider: Navigating a sample photo album using eyes swipes


![Reader with auto text scrolling](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/esnopsjiwlza8kly2d4x.png)

- Reader Demo: Demonstrating text automatic scrolling when user is reading an article or browsing web contents

The Reader Demo shows the amazing capability of the SDK inferring user activity (reading) and scrolling text automatically with no touch required. It makes reading or browsing web sites effortless, more accessible, and allows the user to be more focused and engaged with the content.

## Step 3 Build A Sample App
Let’s try to build one of the sample apps included in the SDK. Let’s take a look at the contents of the Photo Slider App:


![Photo Slider Sample App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8gump1rpzl3c2xzbce7.png)

Double click on PhotoSlider.xcodeproj, once Xcode opens, change the team name to your name and the bundle id to an id you would like to use. Connect an iPhone running iOS 14.4 or later to your computer, click on the Run Icon in Xcode. In no time, it builds and runs on the device. Here is a sample app screen:


![Athena Eye Gesture SDK — Eye Swiping Photo Album](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eiuai99tcrl7bgds5bpu.png)

The app works like this: stare or focus your gaze on a point on the image, an eye icon shows up, then move your eye gaze to the left or right to show the next or previous picture. The following video demos the process:

<iframe width="680" height="382" src="https://www.youtube.com/embed/k594sFEmTec" title="Athena Eye Gesture SDK - Photo Album With Eye Swiping" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

##Conclusion
The SDK is very easy to use and the eye gestures work like magic in the demo app. Athena Eye Control provides a powerful new way for your users to engage and interact with your apps. Find out more here:
Https://athenasaas.io

*Keywords*: Eye Gesture Eye Control Eye Swipe iOS SDK