Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved AR Foundation - undeclared identifier kCLErrorDomain

Discussion in 'AR' started by VOrlovsky, Feb 23, 2022.

  1. VOrlovsky

    VOrlovsky

    Joined:
    Jan 6, 2019
    Posts:
    2
    Hi!

    I'm trying to figure out why does building a basic AR app for iOS fails for me.
    I've tried both to create a project from AR Core template and to add XR plugins to a basic 3D project, but no luck - XCode build fails with the following error:

    Libraries/com.unity.xr.arkit/Runtime/iOS/UnityARKit.m(91,28): error: use of undeclared identifier 'kCLErrorDomain'; did you mean 'SCNErrorDomain'?
    return (__bridge void*)kCLErrorDomain;
    ^~~~~~~~~~~~~~
    SCNErrorDomain


    I'm using Unity 2020.3.18f1,
    AR Foundation and ARKit XR plugin versions are both 4.1.9 (also tried 4.1.7),
    iOS SDK 13.7 (also tried 12.5),
    XCode 11.7 (also tried iOS Builder for Windows 3.45).

    Looks like a builder can't find a definition from CoreLocation framework (and IMO it should not be related with my actual iOS SDK as according to Apple docs kCLErrorDomain property appeared years ago, in iOS 2.0). There is actually no CoreLocation.framework linked to XCode project I get, but adding it does nothing positive too.

    NB: the same test project runs OK on Android using ARCore XR plugin.

    Does anyone know how to fix this issue?
     
    Last edited: Feb 24, 2022
  2. Autinhorse

    Autinhorse

    Joined:
    Jan 7, 2016
    Posts:
    5
    I met same problem today when I used Xcode 11. It worked well after I changed to XCode 13.2.1.
     
    VOrlovsky likes this.
  3. VOrlovsky

    VOrlovsky

    Joined:
    Jan 6, 2019
    Posts:
    2
    Great to hear that it is not due to my fault.:)

    Thanks, you are totally right - iOS SDK 15.2 (got from XCode 13.2.1) did the trick together with iOS Builder for Windows 3.45.
     
    Last edited: Mar 7, 2022
  4. Naiyra

    Naiyra

    Joined:
    Mar 11, 2022
    Posts:
    2
    Does downloading Xcode 13.2.1 require finding Command Line Tools for it ? Because there isn't any for Xcode 13.2.1 but there is one for 13.2 would it work?