Search Unity

Known issue when developing with Vuforia 7, Xcode 9.3 and iOS 11.3 beta (ARKit 1.5)

Discussion in 'Vuforia' started by Vuforia-Strasza, Feb 6, 2018.

  1. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Hello all,

    There is a known issue when using:
    • Vuforia 7
    • Xcode 9.3
    • Devices running iOS 11.3 beta && support ARKit (version 1.5, bundled with iOS 11.3 beta)
    When developing with these versions, you may observe a camera preview that renders a black screen.

    This is being addressed in an upcoming release of Vuforia. In the meantime, it is recommended to use Xcode 9.2 (or earlier) to ensure development continuity.

    We will provide an update once the issue has been resolved.

    Thanks for your continued interest in Vuforia,

    Vuforia Support
     
    fabiotgarcia and Snkhell like this.
  2. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    This happens to be my exact setup. Any idea when an update will be available? FYI iOS 11.3 beta 2 only works with Xcode 9.3, rolling back to an earlier version won't let you build to the device.
     
    daville likes this.
  3. skdev3

    skdev3

    Joined:
    Jul 15, 2015
    Posts:
    64
    Fixed this problem:
    Code (csharp):
    1.  
    2. void Awake()
    3.     {
    4.         try
    5.         {
    6.             EventInfo evSceneLoaded = typeof(SceneManager).GetEvent("sceneLoaded");
    7.             Type tDelegate = evSceneLoaded.EventHandlerType;
    8.  
    9.             MethodInfo attachHandler = typeof(VuforiaRuntime).GetMethod("AttachVuforiaToMainCamera", BindingFlags.NonPublic | BindingFlags.Static);
    10.  
    11.             Delegate d = Delegate.CreateDelegate(tDelegate, attachHandler);
    12.             SceneManager.sceneLoaded -= d as UnityEngine.Events.UnityAction<Scene, LoadSceneMode>;
    13.         }
    14.         catch (Exception e)
    15.         {
    16.             Debug.LogWarning("Cant remove the AttachVuforiaToMainCamera action: " + e.ToString());
    17.         }
    18.     }
    19.  
    You need init camera on the transition from the menu to the camera...
     
    Last edited: Feb 27, 2018
    Blarp likes this.
  4. CharlesBarros

    CharlesBarros

    Joined:
    Nov 17, 2011
    Posts:
    61
    I dunno how our fix solved this issue. It only avoid vuforia to auto initialize after a scene load event.
    Can you elaborate about how you achieve workarround this issue with the xcode 9.3 beta?
     
  5. brunoricardo3d

    brunoricardo3d

    Joined:
    Mar 23, 2018
    Posts:
    3
    Any updates on this? Any workaround? Tried the code above with no success. The latest Vuforia release notes claims the bug is not fixed: "XCode 9.3 Beta is currently not supported and may result in camera previews rendering a black screen"

    How to build with an early xcode version to iOS 11.3?
     
  6. sam598

    sam598

    Joined:
    Sep 21, 2014
    Posts:
    60
    For iOS 11.3 you have to build and archive the project in Xcode 9.2. Export the application “Ad Hoc”, connect your iOS devices, open iTunes, and drag the export “.ipa” file to your device.

    This work around has a major impact on development time. Both iOS 11.3 and Xcode 9.3 have been officially released, and the black video issue still exists. Vuforia 7.1 was just released last week, and no fix was added.
     
  7. brunoricardo3d

    brunoricardo3d

    Joined:
    Mar 23, 2018
    Posts:
    3

    Thanks, sam598. I appreciate your solution. Will try that.

    Agree, right now the process will be very cumbersome.
     
  8. pedrohba

    pedrohba

    Joined:
    Aug 27, 2013
    Posts:
    13
    Bruno,

    there is an easy way. Install XCode 9.3, build your project with it to create your iOS image file in Xcode. Then use this command:


    sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.3\ \(15A5278f\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.3\ \(15A5278f\)


    on your terminal. You'll have to adjust the version and version code to reflect yours. Restart Xcode 9.2 and you now you can use Xcode 9.2 to build to iOS 11.3

    Best regards,
     
  9. wxxhrt

    wxxhrt

    Joined:
    Mar 18, 2014
    Posts:
    163
    Hi @sam598, thanks for this solution. Do you know if following this solution messes up sharing the app through TestFlight? Xcode won't validate my app, it will upload to iTunes Connect but then gives a general error when I try and share with beta testers. I've removed the Ad-Hoc certificate and set Xcode to manage signing but that hasn't worked...
     
  10. theolagendijk

    theolagendijk

    Joined:
    Nov 12, 2014
    Posts:
    117
    Thanks @pedrohba this works like a charm!

    Last weekend I upgraded Xcode to the Xcode 9.3 release, but the Xcode 9.2 download from developer.apple.com allowed me to install the older Xcode next to it. After executing ;


    sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.3\ \(15E217\)/ /Applications/Xcode\ 9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.3\ \(15E217\)


    I can now use Xcode 9.2 to compile my project (Unity with Vuforia 7) for iOS 11.3 without losing the camera image.
    Of course I still hope to see the issue fixed, but this is a live saver. Thanks!
     
  11. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    theolagendijk and super77gg like this.
  12. ZikW

    ZikW

    Joined:
    Aug 18, 2014
    Posts:
    18
    Thanks pedrohba, it worked!
     
    pedrohba likes this.
  13. marvinzapf

    marvinzapf

    Joined:
    Apr 9, 2018
    Posts:
    1
    I am to stupid!
    Ok well... I have the Unity (Beta) 2018.1.0b13 Personal with Vuforia 7.1.31 and it is not fixed!

    I also dont get how the Terminal Trick works.
    First I build my App with Unity.
    After that I go to Xcode and press play with my iPhone X (11.3) connected.
    App is installed and not working. (Black Screen)
    Than I go to Terminal and paste @pedrohba ´s code into it and enter my password.
    But It is not showing up and apparently incorrect!?

    What should happen afterwards? Which message should I get from the Terminal to see if it worked?
    And than I just need to restart Xcode to open tin 9.2?!

    Please help me out! I have to finish this project better sooner than later: ´D
     
    davejones1 likes this.
  14. theolagendijk

    theolagendijk

    Joined:
    Nov 12, 2014
    Posts:
    117
    Hi marvinzapf,

    I think I can help you out.
    When you take @pedrohba 's terminal command and it doesn't work that's probably because your system has different paths for where XCode 9.3 and XCode 9.2 or the 11.3 device support files are stored.

    Open up a terminal. Start by typing "sudo ln -s /Applications/Xc" and then use [TAB] to browse through autocomplete for your folder structure. First navigate for the path that contains Xcode 9.3 and contains the 11.3 device support files. Than enter a space " " followed by "/Applications/Xc" and now [TAB] your way into the folder structure of XCode 9.2 and when you've reached the DeviceSupport folder add the new "11.3" link. [ENTER]. Provide your super user password to execute as super user. Voila, Xcode 9.2 can now build for iOS 11.3.
    Be advised, Unity's "Build & Run" will probably open up your project in Xcode 9.3 by default. Close it and open the exported Xcode project in Xcode 9.2.

    Hope that helps.
     
    Vuforia-Strasza likes this.
  15. fabiotgarcia

    fabiotgarcia

    Joined:
    Apr 28, 2017
    Posts:
    35
     
  16. fabiotgarcia

    fabiotgarcia

    Joined:
    Apr 28, 2017
    Posts:
    35
    When will Vuforia correct this terrible error?
     
  17. KacperKoziel

    KacperKoziel

    Joined:
    Feb 20, 2018
    Posts:
    10
    For those who are not so familiar with terminal command, you can just copy those exact folder from Xcode 9.3 to Xcode 9.2.
    Navigate to DeviceSupport in Xcode 9.3 and copy 11.3 folder, then nagivate to DeviceSupport in Xcode 9.2 and paste. It should work.
     
    ZikW and theolagendijk like this.
  18. glreese

    glreese

    Joined:
    Mar 25, 2017
    Posts:
    13
    So I upgraded to Xcode 9.3 - which I believe removed Xocde 9.2. And have the same issue. So just to be clear - you need reinstall Xcode 9.2 for this workaround to work? Thanks
     
  19. theolagendijk

    theolagendijk

    Joined:
    Nov 12, 2014
    Posts:
    117
    Yes, but keep both versions next to each other. So for example I placed Xcode 9.2 in my "Applications" folder under the name "Xcode 9.2" next to "Xcode" ( which is my most up-to-date stable Xcode currently version 9.3 ).
     
  20. plyrek

    plyrek

    Joined:
    Mar 2, 2015
    Posts:
    15
    Since this is an active thread I figure I will ask. I am getting the black camera screen problem but only on specific devices. In my case the iPad Pro 12.9 inch. It seems strange that an bug that has to do with such a fundamental thing as Xcode versions would show up in just one device. I don't want to mess around with the fixes here and end up breaking it for the other devices it is working on but hate to tell my client they have to buy a different device.
     
  21. theolagendijk

    theolagendijk

    Joined:
    Nov 12, 2014
    Posts:
    117
    Hi plyrek,
    the issue is specific to iOS devices that support AR Kit. So yes, a lot of ( slightly older ) iOS devices will not have the black camera image issue.
    Cheers!
     
  22. Aidan-Wolf

    Aidan-Wolf

    Joined:
    Jan 6, 2014
    Posts:
    59
    What is the ETA for the fix?
     
  23. glreese

    glreese

    Joined:
    Mar 25, 2017
    Posts:
    13
    Thank you @theolagendijk That got it working. Timeline disaster averted.

    @vuforia - you are doing a great job. please fix soonest :) Thank you all!
     
    theolagendijk likes this.
  24. tomicz

    tomicz

    Joined:
    Mar 16, 2015
    Posts:
    152
    Is this gonna be fixed any soon, it's ruining my business, I can't run camera on iOS.
     
    Blarp likes this.
  25. bsebag

    bsebag

    Joined:
    Apr 5, 2017
    Posts:
    10
    Hello,
    I am also experiencing the exact same issue. I can only test my mobile app when the front camera is selected.
    Are there any estimated dates for Vuforia to provide the patch for this issue?
    Thanks in advance.
     
  26. theolagendijk

    theolagendijk

    Joined:
    Nov 12, 2014
    Posts:
    117
    I agree with you that this has to be fixed. But in the meantime you might be able to keep your business running with the workaround ( using Xcode 9.2 )?
     
  27. dorukeker

    dorukeker

    Joined:
    Dec 6, 2016
    Posts:
    37
    Hello All,

    Also had the same problem. Using Xcode 9.2 solved.

    There is one catch:
    Xcode will complain that 9.2 cannot build to iOS11.3 because it does not have the support files.

    Here is a solution:
    - Make sure you have both Xcode 9.3 and 9.2 installed
    - Go to device support folder for Xcode 9.3 and copy the folder for iOS 11.3 (for me /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.3 (......)
    - Then go to the same folder for Xcode 9.2 and paste that folder there (for me it is /Applications/Xcode_9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ )

    This would allow you to build your App for iOS 11.3 using Xcode 9.2

    Hope this is useful.
    Cheers,
    Doruk
     
    jipsen and tomicz like this.
  28. Aidan-Wolf

    Aidan-Wolf

    Joined:
    Jan 6, 2014
    Posts:
    59
    To confirm, building in Xcode 9.2 fixes the "black screen/no camera feed" issue in Vuforia? Thanks
     
  29. theolagendijk

    theolagendijk

    Joined:
    Nov 12, 2014
    Posts:
    117
    Absolutely, see @pedrohba 's comment above or mine or @dorukeker 's, the three of us our actually using this approach. Works like a charm.
     
    Aidan-Wolf likes this.
  30. porto

    porto

    Joined:
    May 21, 2014
    Posts:
    2


    I have tried brunoricardo3d´s method (from the terminal I copied 11.3 folder from xcode 9.3 to xcode 9.2) but I still cannot build on iOS 11.3. Any idea what causes this?

     
    Last edited: Apr 17, 2018
  31. theolagendijk

    theolagendijk

    Joined:
    Nov 12, 2014
    Posts:
    117
    Hi @porto,
    what do you mean when you say you can not build? What happens when you try to build? In your screenshot it appears that you have no iOS device USB connected to your system?.You should see your connected iOS devices in that Xcode 9.2 popup in your screenshot.
     

    Attached Files:

  32. porto

    porto

    Joined:
    May 21, 2014
    Posts:
    2
    Hi @theolagendijk ! thanks for your help, as you can see I haven´t enough skills with my english :p When I said can not build, I meant export my project from xCode to iPhone.

    My device appears as connected in Window/Devices and Simulator but it doesn't appears connected in that popup.

     
    Last edited: Apr 17, 2018
  33. Aidan-Wolf

    Aidan-Wolf

    Joined:
    Jan 6, 2014
    Posts:
    59
    I'm running into the same issue, though I assume it's because I have 11.4 installed on my phone.

    Last nail in the coffin for this fix.
     
  34. tomicz

    tomicz

    Joined:
    Mar 16, 2015
    Posts:
    152
    How do I download xcode 9.2?
     
  35. KacperKoziel

    KacperKoziel

    Joined:
    Feb 20, 2018
    Posts:
    10
    tomicz likes this.
  36. Bird_LYKKE

    Bird_LYKKE

    Joined:
    Jul 26, 2017
    Posts:
    15
    I copy 11.3 from device support folder from 9.3 to 9.2 but xcode 9.2 deployment target still not show on dropdown list.
    Did I miss something?
     

    Attached Files:

  37. tomicz

    tomicz

    Joined:
    Mar 16, 2015
    Posts:
    152
    Guys it works, thank you all!
     
  38. KacperKoziel

    KacperKoziel

    Joined:
    Feb 20, 2018
    Posts:
    10
    theolagendijk and Bird_LYKKE like this.
  39. Bird_LYKKE

    Bird_LYKKE

    Joined:
    Jul 26, 2017
    Posts:
    15
    Of fix the black screen but got an error
    ERROR/AR(1342)
    CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized.

    And ARkit seem to be not working because I use Xcode 9.2?



     
  40. areavisuale

    areavisuale

    Joined:
    Jul 23, 2015
    Posts:
    60
    Using xCode 9.2 I can see the Vuforia Camera on iOS 11.3 devices (I don't see the black screen anymore), but now there's another problem! The camera view has two black lines on top and bottom that appear randomly with different heights. They're difficult to see, it's easier on iPhoneX. I tested it with basic scenes.
    In the image that I have uploaded I created a canvas with red boxes at the borders. See the black lines??
     

    Attached Files:

  41. win_nuding

    win_nuding

    Joined:
    Apr 19, 2018
    Posts:
    3
    Hi @porto,
    did you close and restart Xcode 9.2?
     
  42. win_nuding

    win_nuding

    Joined:
    Apr 19, 2018
    Posts:
    3
    The above mentioned trick helps to build for iOS 11.3 using Xcode 9.2. Unfortunately it does not help for producing .ipa files for the most recent iPad Pro. I tried to do something similar with the iPhoneSimulator.platform, but it did not work so far. does someone know how to do it?
     
  43. bsebag

    bsebag

    Joined:
    Apr 5, 2017
    Posts:
    10
    When is Vuforia going to fix this?
     
  44. bsebag

    bsebag

    Joined:
    Apr 5, 2017
    Posts:
    10
    Has anyone tested the last release 7.1.34? it was released on April 19th.
     
  45. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    7.1.34 has the fix for this issue. This version will be available within Unity 2018.1.0f1 and later. Our understanding is that Unity will be releasing this version soon.
     
    skdev3 likes this.
  46. skdev3

    skdev3

    Joined:
    Jul 15, 2015
    Posts:
    64
    How can update Vuforia without upgrading Unity? I have many animations compiled in bundles, and I can not update new version Unity.

    PLS. Add the "Update Vuforia" button in the "Edit" menu, so done in many plugins on Unity.
     
    Last edited: Apr 23, 2018
  47. Aidan-Wolf

    Aidan-Wolf

    Joined:
    Jan 6, 2014
    Posts:
    59
    @skdev3 there's an update link in the the Vuforia Behaviour UI on the ARCamera object.

    Although the update didn't work for me (failed to install), it may work for you!
     

    Attached Files:

  48. Aidan-Wolf

    Aidan-Wolf

    Joined:
    Jan 6, 2014
    Posts:
    59
    @Vuforia-Strasza Is the Vuforia 7.1.34 update installer incompatible with the newer Unity beta 2018.2.0b1?

    Edit: tried with 2018.1.0b13 as well. Installer fails at "Validating Packages" phase.
     
    Last edited: Apr 23, 2018
  49. Aidan-Wolf

    Aidan-Wolf

    Joined:
    Jan 6, 2014
    Posts:
    59
    This issue was Unity Hub related. To successfully install the Vuforia update, drag the contents of Unity Hub > Editor > build# into the Unity folder, run the installer, and place back. The installer is based on the old folder structure.
     
  50. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    All package updates done through Unity on Mac need to have the Unity installation in the "Unity" directory. The updates won't find the installation otherwise.