-
-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building to iOS and embedding unity into swift app #1258
Comments
For whoever is curious about integrating unity as a library with the MediaPipeUnityPlugin, I have found the solution to the above problem. At least for iOS that is. You will need to add the MediaPipeUnity.framework to the main xCode project's frameworks folder along with your unity project as you would normally. A window will pop-up and check "Copy items if needed". You will also need to add the MediaPipeUnity framework to the main xCode project's Frameworks, Libraries, and Embedded Content and set it to Embed & Sign. |
What specific actions would you like this project to take? |
If you could make a note somewhere that the MediaPipeUnityPlugin for iOS needs to be in the root xCode project that would be helpful. |
Could you attach an XCode screenshot that shows the settings? |
Hi @jacobwelchvirtusense, could you also mention next steps how to use library in swift script? Or what to look for? |
To use unity in a swift app follow these tutorials https://medium.com/@salaheddine.ly/part-i-integrating-unity-games-to-react-native-apps-for-beginners-for-android-4c48031e2829 That's what I followed at least, hope it helps! |
Plugin Version or Commit ID
v0.15.0
Unity Version
2021.3.16f1
Your Host OS
Windows
Target Platform
iOS
Target Device
iPad
[Windows Only] Visual Studio C++ and Windows SDK Version
No response
[Linux Only] GCC/G++ and GLIBC Version
No response
[Android Only] Android Build Tools and NDK Version
No response
[iOS Only] XCode Version
15.3
Build Command
python build.py build --desktop cpu --opencv cmake -vv
Bug Description
I am getting the same issue as this ticket here: #1042
When running from editor and in standalone iOS builds everything works as intended, but when trying to integrate the unity project as a library into an iOS swift app it is unable to fine the necessary MediaPipeUnity files.
Steps to Reproduce the Bug
The resulting error will be that the project has "(no such file)" when referring to MediaPipeUnity.
Log
dyld[8336]: Library not loaded: @rpath/MediaPipeUnity.framework/MediaPipeUnity
Referenced from: <798BC7D6-7C50-34E0-A8EC-0C3B80819760> /private/var/containers/Bundle/Application/8692E076-E0A5-4C50-B96E-3D44378A5C9D/ProactiveStrides.app/Frameworks/UnityFramework.framework/UnityFramework
Reason: tried: '/private/var/containers/Bundle/Application/8692E076-E0A5-4C50-B96E-3D44378A5C9D/ProactiveStrides.app/Frameworks/MediaPipeUnity.framework/MediaPipeUnity' (no such file), '/usr/lib/swift/MediaPipeUnity.framework/MediaPipeUnity' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MediaPipeUnity.framework/MediaPipeUnity' (no such file), '/Users/hitheshr/Library/Developer/Xcode/DerivedData/ProactiveStrides-emhctmkgrkdgphbfbtywaeuhhhir/Build/Products/Debug-iphoneos/PackageFrameworks/MediaPipeUnity.framework/MediaPipeUnity' (no such file), '/private/preboot/Cryptexes/OS/Users/hitheshr/Library/Developer/Xcode/DerivedData/ProactiveStrides-emhctmkgrkdgphbfbtywaeuhhhir/Build/Products/Debug-iphoneos/PackageFrameworks/MediaPipeUnity.framework/MediaPipeUnity' (no such file), '/private/var/containers/Bundle/Application/8692E076-E0A5-4C50-B96E-3D44378A5C9D/ProactiveStrides.app/Frameworks/MediaPipeUnity.framework/MediaPipeUnity' (no such file), '/usr/lib/swift/MediaPipeUnity.framework/MediaPipeUnity' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MediaPipeUnity.framework/MediaPipeUnity' (no such file), '/Users/hitheshr/Library/Developer/Xcode/DerivedData/ProactiveStrides-emhctmkgrkdgphbfbtywaeuhhhir/Build/Products/Debug-iphoneos/PackageFrameworks/MediaPipeUnity.framework/MediaPipeUnity' (no such file), '/private/preboot/Cryptexes/OS/Users/hitheshr/Library/Developer/Xcode/DerivedData/ProactiveStrides-emhctmkgrkdgphbfbtywaeuhhhir/Build/Products/Debug-iphoneos/PackageFrameworks/MediaPipeUnity.framework/MediaPipeUnity' (no such file), '/private/var/containers/Bundle/Application/8692E076-E0A5-4C50-B96E-3D44378A5C9D/ProactiveStrides.app/Frameworks/MediaPipeUnity.framework/MediaPipeUnity' (no such file)
Screenshot/Video
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: