Eric Crooks - Profile Photo

Eric Crooks

Software Engineer (Apex, NC)
Back to all journal entries

Seeing Through New Lenses: My First Steps Developing with Ray-Ban Meta AI Glasses

Diving into the Ray-Ban Meta AI stack to kick off development for my stealth project

Summary

Friendly heads-up: this video contains a small amount of mild profanity.

This first day was focused on getting my glasses connected to my iPhone. I had a couple things to update: Xcode and myself on using Xcode. I haven't used Xcode in a while, so there was a learning curve while trying to get things connected. Luckily for me, I'm a quick learner, love reading documentation, and Claude exists to help me get through some boilerplate code. It took me about 3 hours to get my iPhone connected to my glasses from scratch. I recorded most of my development session—trimmed down to the ~5 minute YouTube vid above.

Sorry for the lowish quality. I forgot to update my video output settings while recording. Future videos will be sharper though!

Objectives

  • Download all development tools required
  • Read Wearables Device Access Toolkit documentation
  • Get up to date on Xcode
  • Download app build to iPhone
  • Connect to glasses from app build

Issues Encountered

Apple Account

I used to have an Apple Developer Account when I published apps in the past. I didn't renew the membership on this account, so I lost access to some of the developer features. One feature I needed was the device list. I maxed out my device registrations and ran into the following error while trying to set up signing.

Communication with Apple failed
 
Your development team has reached the maximum number of registered iPhone devices.

Searching Apple forums and using AI to figure out a solution, I found that I had to reset my device list on said Apple Developer Account. However, accessing the device list meant renewing my membership ($99). This is the loophole I mentioned in my video:

  • I need a free account for signing and capabilities
  • I have a free account, so I use it
  • I have to reset the device list on this free account before I can use my current iPhone
  • I have to pay $99 to access the device list and reset it (it's no longer a free account)
  • Repeat

To get around this, I created a different account. Now I have two accounts to manage (ugh). I guess this will be my stealth dev account and my main account will be where I publish apps.

Documentation and Claude

The Meta Wearables Device Access Toolkit documentation for iOS is a bit ambiguous in my opinion, so navigating the nuances of connecting my iPhone to my glasses took some time. I had Claude help me debug issues, but it also provided wrong solutions. For example, it provided boilerplate code with incorrect imports:

// ❌ Before (doesn't exist)
import MetaWearablesDAT
 
// ✅ After (real module names)
import MWDATCore    // registration, devices, permissions
import MWDATCamera  // streaming, photo capture

It provided deprecated APIs:

// ❌ Before — deprecated in iOS 17
AVAudioSession.sharedInstance().requestRecordPermission { granted in ... }
 
// ✅ After — new iOS 17+ API
AVAudioApplication.requestRecordPermission { granted in ... }
 
// ❌ Before — AppDelegate with deprecated OpenURLOptionsKey
func application(_ app: UIApplication, open url: URL,
    options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { ... }
 
// ✅ After — SwiftUI scene lifecycle, no deprecation warnings
.onOpenURL { url in
    GlassesManager.shared.handleCallback(url: url)
}

It provided incorrect types:

// ❌ Before
frameRate: Int = 24
 
// ✅ After
frameRate: UInt = 24
 
// ❌ Before
var availableDevices: [WearableDevice] = []
 
// ✅ After — AnyObject lets Swift infer the real type at runtime
var availableDevices: [AnyObject] = []
 
// ❌ Before — type doesn't exist publicly
private var stateToken: ListenerToken? = nil
 
// ✅ After — store as Any?, SDK handles the rest
private var stateToken: Any? = nil

As an experienced software engineer, I know to review code AI provides, so I carefully reviewed and fixed Claude's code, using Meta's documentation and example app as references. With guardrails in place, I was able to produce a successful build.

metaaimeta airay-banwearables

Looking to connect?