Heads up! We're sunsetting this forum to streamline our community space.

join us on Discord for support, updates, and all things Snap AR! See you there!
Sign up for our live Camera Kit office hour on July 17 @ 9:30am (PT) / 4:30pm (GMT)

Camera Kit for Unity ERROR

YassAR
YassAR Posts: 6
edited November 2023 in General #1

Hi All I have some problem using unity camera Kit i followed the IOS instruction in this git project: https://github.com/Snapchat/camera-kit-unity-sample/

when I start building the project i get this error: DirectoryNotFoundException: Could not find a part of the path "/Users/yassinbenhaddou/Documents/Test projects/snap camera kit projects/test two/camera-kit-unity-sample/unity/app-ios/UnityWithCameraKit/Info.plist".
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <5fa84b4935964448a51c359531ad218d>:0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) (at <5fa84b4935964448a51c359531ad218d>:0)
(wrapper remoting-invoke-with-check)

I think the error is maybe from here (see image)

Answers

  • Edgar Neto
    Edgar Neto Posts: 11 👻

    Hello,

    Thanks for reaching out in the forum.
    We had a similar issue here: https://community.snap.com/snapar/discussion/3341/unity-sample-app-build-for-ios-stuck
    Is this the same problem you're having? Please check if this solves it for you. If not, please let me know here and we can discuss further.

  • Hi Edgar

    Thank you, Yess It's the same error instead of I am using a Mac mini I will try your solution and let you know if it work or not !

  • Edgar Neto
    Edgar Neto Posts: 11 👻

    Ok let me know if that works. That field should contain the relative path between your Unity output folder and the ios wrapper folder. If you made changes to the export folder, you'll need to change that field.

    Also I've heard problems in the past where spaces in the path would create problems. I can see you have some folders with spaces in them ("snap camera kit project", "test two"). Perhaps changing those to names without spaces could also solve the issue.

    If this turns out to be the case, please let me know here, and we can see what can be done to make this script more robust.

  • YassAR
    YassAR Posts: 6
    edited October 2023 #5

    Hi Edgar

    So About the issue: I tried different escape characters and it didn't work so I tried to do it manually and I got a Not found error: "zsh: command not found: pod" looks like pod wasn't installed correctly so i installed it and i tried it from the script it self (so not manualy) and i don't have the errror anymore now i have one other error:

    Cocoapods Error output:
    [!] The UnityWithCameraKitUITests [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-UnityWithCameraKit-UnityWithCameraKitUITests/Pods-UnityWithCameraKit-UnityWithCameraKitUITests.debug.xcconfig'. This can lead to problems with the CocoaPods installation

    [!] The UnityWithCameraKitUITests [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-UnityWithCameraKit-UnityWithCameraKitUITests/Pods-UnityWithCameraKit-UnityWithCameraKitUITests.release.xcconfig'. This can lead to problems with the CocoaPods installation

    UnityEngine.Debug:LogError (object)
    CameraKitSettingsWindow:iOSTask_RunCocoapods (string) (at Assets/Scripts/CameraKit/Editor/CameraKitSettingsWindow.cs:249)
    CameraKitSettingsWindow:OnPostProcessBuild (UnityEditor.BuildTarget,string) (at Assets/Scripts/CameraKit/Editor/CameraKitSettingsWindow.cs:217)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)

  • Edgar Neto
    Edgar Neto Posts: 11 👻

    Hi Yassine,

    It looks like the output that you're getting from cocoapods are just warnings and not errors. Thanks for flagging that they behave as errors when running from the Unity post-processing build, I'll work on making them look like warnings. But if these are the messages you are getting in the Unity console, feel free to ignore them as the success message should be printed right before that one.

Categories