ARKit x CoreData : How to store and load ARReference Images from the internet.

Oscar de la Hera
AR Tips And Tricks
Published in
2 min readNov 26, 2018

Please note that this tutorial serves as a means to bridge the gap between ARKit and CoreData. Not to teach Core Data or ARKit. For the TLDR, jump straight to Solution.

Data.

For beginners of Core Data, here’s some links that may help:

For beginners to ARKit:

Problem

You want to work your AR app off a database on the internet but want to reduce costs. You attempt to store ARReferenceImages or ARReferenceObjects in Core Data but it breaks your app on load.

Most commonly, because the image needs to be bigger than 100 pixels.

This is because your AR Reference points to an object that no longer exists.

Solution

  1. Save the images as UIImages / Objects in your Core Data Database.
  2. Convert them to ARReferenceImages / ARReferenceObjects on runtime.

Please leave any comments or questions in the section below.

O

--

--

Oscar de la Hera
AR Tips And Tricks

Oscar is an award-winning Spanish Inventor whose work impacts lives through brands that include Nike, MoMA and Samsung.