Search Unity

Error when building SampleScene from ARFoundation to iPhone 6s

Discussion in 'Handheld AR' started by MaxXR, Aug 15, 2018.

  1. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    51
    Hi

    ARKit Plugin default scenes build fine. Thought I'd try AR Foundation: https://github.com/Unity-Technologies/arfoundation-samples

    Tried to build sample scene to iPhone 6S but am getting this error.

    Code (CSharp):
    1. Undefined symbols for architecture arm64:
    2.   "_OBJC_METACLASS_$_ARAnchor", referenced from:
    3.       _OBJC_METACLASS_$_ARPlaneAttachmentAnchor in UnityARKit.a(ARKitXRReferencePointProvider.o)
    4.   "_OBJC_CLASS_$_ARAnchor", referenced from:
    5.       _OBJC_CLASS_$_ARPlaneAttachmentAnchor in UnityARKit.a(ARKitXRReferencePointProvider.o)
    6.       objc-class-ref in UnityARKit.a(ARKitXRReferencePointProvider.o)
    7.   "_OBJC_CLASS_$_ARPlaneAnchor", referenced from:
    8.       objc-class-ref in UnityARKit.a(ARKitXRReferencePointProvider.o)
    9.       objc-class-ref in UnityARKit.a(ARKitXRPlaneProvider.o)
    10.   "_OBJC_CLASS_$_ARSession", referenced from:
    11.       objc-class-ref in UnityARKit.a(ARKitXRSessionProvider.o)
    12.   "_OBJC_CLASS_$_ARWorldTrackingConfiguration", referenced from:
    13.       objc-class-ref in UnityARKit.a(ARKitXRSessionProvider.o)
    14. ld: symbol(s) not found for architecture arm64
    15. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    16.  
    upload_2018-8-15_12-48-1.png
    Searched but couldn't find solution. Maybe the Xcode package isn't importing the right architecture? Any ideas?
     
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    480
    Looks like you're missing the ARKit framework. There's a post build step that is supposed to do that for you, but you can also add it manually in Xcode. What version of Unity did you use?
     
  3. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    51
    Ok thanks, will wait until bugs are ironed out I suppose
    Was using Unity 2018.2.2f1
     
  4. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    480
    I'd like to understand what's going on here. The error suggests you just need to add the ARKit framework to your Xcode project. Did you make any changes at all to the samples repo, or did you just build a fresh clone? What version of Xcode? Any other errors or warnings in either Xcode or Unity?
     
  5. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    51
    Sorry for delay Tim.
    Ok so I tried again with fresh project and it worked. Here were my steps:
    1. download https://github.com/Unity-Technologies/arfoundation-samples and extract to desktop
    2. launch Unity unity 2018.2.2f1 and open extracted project
    3. Build settings > change to iOS, and build SampleScene
    4. load built project in XCode 9.4.1
    5. Change Display Name, Bundle Identifier, Team, and set Deployment Target to 11
    Et voila. Feathered Planes works too :)

    So I started playing around. Can you please share the scaling rig scene you demo'd 32mins into this vid
    because am having trouble with my current demo?

    see here https://www.dropbox.com/s/yeiiisc1549ibzo/ScaleOpHouse.mov?dl=0 (can't embed dropbox vid files for some reason). There should be mini people as it starts at world scale, but when i scale it down (using LeanTouch's LeanScale script), they go away. Interested to see if it fixes the sea shader too.
    Thanks!
     
  6. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    480
    The scaling rig was no different than what you get in the default setup. There's a branch of the ARFoundation Samples repo that allows you to play with this in the Editor, see https://forum.unity.com/threads/mock-ar-device-for-in-editor-simulation.546703/. There's a blue cube that acts like the complex village in the GDC video.
     
  7. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    51
    Sweet
    Thank you sir
     
  8. kouroshg

    kouroshg

    Joined:
    Jul 5, 2012
    Posts:
    7
    I tried the sample project:
    https://github.com/Unity-Technologies/arfoundation-samples

    using
    Unity 2019.1.5f1
    XCode 10.2.1

    And still, get the following errors upon build:

    Code (CSharp):
    1. Undefined symbols for architecture arm64:
    2.   "_OBJC_CLASS_$_ARCollaborationData", referenced from:
    3.       objc-class-ref in UnityARKit.a(ARKitXRSessionProvider.o)
    4.   "_OBJC_CLASS_$_ARSkeletonDefinition", referenced from:
    5.       objc-class-ref in UnityARKit.a(ARKitXRHumanBodyProvider.o)
    6.   "_OBJC_CLASS_$_ARBodyAnchor", referenced from:
    7.       objc-class-ref in UnityARKit.a(ARKitXRHumanBodyProvider.o)
    8.   "_OBJC_CLASS_$_ARBodyTrackingConfiguration", referenced from:
    9.       objc-class-ref in UnityARKit.a(ARKitXRHumanBodyProvider.o)
    10.   "_OBJC_CLASS_$_ARMatteGenerator", referenced from:
    11.       objc-class-ref in UnityARKit.a(ARKitXRHumanBodyProvider.o)
    12.   "___isPlatformVersionAtLeast", referenced from:
    13.       _UnityARKit_Camera_AcquireConfigurations in UnityARKit.a(ARKitXRCameraProvider.o)
    14.       _UnityARKit_Camera_TryGetCurrentConfiguration in UnityARKit.a(ARKitXRCameraProvider.o)
    15.       _UnityARKit_Camera_TrySetCurrentConfiguration in UnityARKit.a(ARKitXRCameraProvider.o)
    16.       (anonymous namespace)::ARKitXRCameraProvider::ResetLocalConfigurationState() in UnityARKit.a(ARKitXRCameraProvider.o)
    17.       (anonymous namespace)::ARKitXRCameraProvider::HandleARKitEvent(UnityARKitEvent, void*, int) in UnityARKit.a(ARKitXRCameraProvider.o)
    18.       _UnityARKit_EnvironmentProbeProvider_Construct in UnityARKit.a(ARKitXREnvironmentProbeWrapper.o)
    19.       _UnityARKit_EnvironmentProbeProvider_Destruct in UnityARKit.a(ARKitXREnvironmentProbeWrapper.o)
    20.       ...
    21. ld: symbol(s) not found for architecture arm64
    22. clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I checked the searched paths in Xcode and all looks ok, I'm not sure why this is happening..
     
  9. unity_FTNIJdQbby_PUg

    unity_FTNIJdQbby_PUg

    Joined:
    May 28, 2019
    Posts:
    2
    I am having the same issue, tried runinstalling and installing whole stack of tools to see if I am doing something wrong, but I keep getting this error. Tried anything that I could find online and nothing worked... Hell please :)
     
  10. Blarp

    Blarp

    Joined:
    May 13, 2014
    Posts:
    158
  11. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    480
    Normally, you should be able to use the latest ARFoundation with any version of Xcode and iOS (depending on which features you want to use). However, we've identified an issue with Xcode 11 beta which prevents this. ARKit XR Plugin 2.2.0-preview.1 will only work with Xcode 11 and iOS 13. You cannot build an app using Xcode 9 or 10 and your app will crash on devices running anything less than iOS 13. You should only use ARKit XR Plugin 2.2.0-preview.1 if you want to experiment with the latest features in iOS 13. Otherwise, please use ARKit XR Plugin 2.1. We will release an updated version of the ARKit XR Plugin package when this issue is resolved in Xcode 11.
     
  12. kouroshg

    kouroshg

    Joined:
    Jul 5, 2012
    Posts:
    7
    Thank you tdmowrer!

    How should I downgrade, the package manager shows only version 2.2. It seems the Bitbucket repo also is deprecated. Does it mean I have to downgrade my Unity version?
     
  13. kouroshg

    kouroshg

    Joined:
    Jul 5, 2012
    Posts:
    7
    Thanks downgraded to version 2.1 and worked just fine! :rolleyes:
     
  14. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    480
    Looks like you've figured it out. For future readers of this thread, you can view and install any previous version of the ARKit XR Plugin from Window > Package Manager:
    Screen Shot 2019-06-10 at 8.58.43 AM.png
     
    leosurf111, gxyfred and kouroshg like this.
  15. Gerrickg

    Gerrickg

    Joined:
    Sep 20, 2013
    Posts:
    3
    Thanks so much for the info on downgrading. Unfortunately, my scene goes black when I use LWRP. Seems like the skybox shows up for a split second and then goes dark. Any ideas?
     
  16. santosh13

    santosh13

    Joined:
    Jun 12, 2019
    Posts:
    6
    Hi ,
    Am getting following error while building sample AR app for ios using AR Foundation and LWRP. I tried to make fresh project several times , but i get same error again and again.

    Am using :
    Unity 2019.1.6
    xCode 10.2.1
    AR Foundation 2.2.0 preview 2

    Thanks in Advance !
     

    Attached Files:

    leosurf111 likes this.
  17. leosurf111

    leosurf111

    Joined:
    Apr 8, 2015
    Posts:
    1
    Hi,
    I'm experiencing this build errors in XCode when building a basic application using AR Foundation + AR Kit XR Plugin :

    Undefined symbol: _OBJC_CLASS_$_ARCollaborationData
    Undefined symbol: _OBJC_CLASS_$_ARSkeletonDefinition
    Undefined symbol: _OBJC_CLASS_$_ARBodyAnchor
    Undefined symbol: _OBJC_CLASS_$_ARBodyTrackingConfiguration
    Undefined symbol: _OBJC_CLASS_$_ARMatteGenerator
    Undefined symbol: ___isPlatformVersionAtLeast

    My development environment is:

    Unity 3d v. 2019.1.2f1
    AR Foundation preview.1 - 2.2.0
    ARKit XR Plugin preview.1 - 2.2.0
    (ARCore XR Plugin preview.1 - 2.2.0)

    XCode v.10.2.1

    I notice that if I downgrade the ARKit XR Plugin to the older version:
    ARKit XR Plugin preview.5 - 2.1.0
    I have no errors during Xcode compilation.
    What would can be?

    Thank you
     

    Attached Files:

  18. santosh13

    santosh13

    Joined:
    Jun 12, 2019
    Posts:
    6

    Hi ,
    Downgrading gives me error in unity. I seem like problem is in xcode build.
     
  19. underkitten

    underkitten

    Joined:
    Nov 1, 2018
    Posts:
    22
    For
    AR Foundation preview.1 - 2.2.0
    ARKit XR Plugin preview.1 - 2.2.0

    You also must have Xcode 11 beta and iOS 13 on your device.
    Downgrading XR plugin helps. But I am not sure if 2d-3d tracking and occlusion will be supported.
    I run my system on the latest versions and everything works just fine.

    Can you send a snippet of this error?
     
  20. BobbyVR

    BobbyVR

    Joined:
    Aug 12, 2017
    Posts:
    3
    I also cannot build using the following:

    macOS 10.14.2
    Xcode 9.4
    Ar foundation plugin 2.2.0
    ARKit XR plugin preview.5 - 2.1.0
    IPhone 6S Plus with iOS 12.3.1

    I would like to build a stable version that works on released version of iphone 6s plus, not beta ios 13. I downgraded ARKit XR plugin preview.5 - 2.1.0, but it still has the same errors. Can you please direct me to the most stable and build-able version please? Or a fix for this?
     

    Attached Files:

    Last edited: Jun 13, 2019
  21. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    480
    AmshuMang and Gerrickg like this.
  22. santosh13

    santosh13

    Joined:
    Jun 12, 2019
    Posts:
    6
    Hi ,
    Sorry for late reply.
    Below is the attachment of the error that i mention above.
    I am using AR Foundation 2.1.0 preview 3 and ARkit XR Plugin 2.1.0 preview 3.
     

    Attached Files:

  23. santosh13

    santosh13

    Joined:
    Jun 12, 2019
    Posts:
    6
  24. santosh13

    santosh13

    Joined:
    Jun 12, 2019
    Posts:
    6

    Hi ,
    Even i tried by downgrading ARkit XR Plugin and AR Foundation Plugin , but same error occurs. Is their any way to solve it ?

    Thanks !
     
  25. BobbyVR

    BobbyVR

    Joined:
    Aug 12, 2017
    Posts:
    3
    I have tried again to compile after updating macIOS and Xcode to the below versions. I now have a new error "IsPlatformVersionAtLeast", reference from libUnityARKitFaceTracking" The entire log is attached below. tdmowrer I have infact both attempts used supported versions https://github.com/Unity-Technologies/arfoundation-samples#warning-arkit-3-support. Please let me know if any version I am using is not supported.

    macOS 10.14.3
    Xcode 10.2.1
    Ar foundation plugin 2.2.0
    ARKit XR plugin preview.5 - 2.1.0
    IPhone 6S Plus with iOS 12.3.1
    iOS Deployment Target is 12.2 (found in Xcode/Unity-iPhone/project settings/Info/Deployment Target)
     

    Attached Files:

  26. santosh13

    santosh13

    Joined:
    Jun 12, 2019
    Posts:
    6
    Hello ,
    As per link https://github.com/Unity-Technologies/arfoundation-samples#warning-arkit-3-support suggested by @tdmowrer i found https://github.com/Unity-Technologies/arfoundation-samples/tree/2.1 sample project which work fine for me. I started with fresh project by building "SimpleAR" Scene from given repo.
    I am using following version of :
    - Unity 2019.1.6
    - xCode 10.2.1
    - ios 11.0
    - ARFoundation preview 3 ( 2.1.0 )
    - ARKit XR Plugin preview 5 ( 2.1.0 )
    - ARcore XR Plugin preview 5 ( 2.1.0 )
    - ARkit face tracking preview 6 ( 1.0.0 )

    Am not sure , but what i think is error occured due to missing package or library from ARFoundation. Please let me know if someone found exactly solution for this.

    Thanks !
     
    BobbyVR and underkitten like this.
  27. underkitten

    underkitten

    Joined:
    Nov 1, 2018
    Posts:
    22
    I had the same error once. I have xcode 10.2 and xcode 11 beta. In project settings I had xcode set to the latest version (which is 11) but I tried to deploy the project with my old xcode 10.2. Hope that helps.
     
  28. BobbyVR

    BobbyVR

    Joined:
    Aug 12, 2017
    Posts:
    3
    /arfoundation-samples/tree/2.1 worked for me. Thank you santosh13!!!
     
  29. BingjieX

    BingjieX

    Joined:
    Jan 7, 2019
    Posts:
    1
    Hi ,

    I'm getting the same error while building the sample scene for ios using LWRP support 2019.1 with 2.1 branch. I tried to downgrading the ARFoundation/AR kit packages for 2.1 but then getting unity errors. Please let me know if someone found solution for this.

    Thanks !
     
    sathya likes this.
  30. AmshuMang

    AmshuMang

    Joined:
    Jun 25, 2018
    Posts:
    3
    Had the same issue, but following the table in this link I was able to fix it. My unity version was 2019.1.5f1 and I downgraded my ARKit plugin to version 2.1.0 and then switch my XCode version on cloud build to 10.2

    I guess you may need to play around with these settings by referring to the documentation above.
     
  31. waldgeist

    waldgeist

    Joined:
    May 6, 2017
    Posts:
    32
    I think there should be at least a warning in the Unity package manager that 2.2.0 is not compatible with Xcode 10. Took me a while to get here...