iOS Xcode fails build from Unity generated proj
Summary
When building an iOS project in XCode that was generated from Unity 2021.3 LTS with the VLCiOS plugin, an error occurs and the build fails: Undefined symbols:
_VLCUnity_UnityPluginLoad, referenced from:
-[MyAppController shouldAttachRenderDelegate] in LoadPlugin.o
_VLCUnity_UnityPluginUnload, referenced from:
-[MyAppController shouldAttachRenderDelegate] in LoadPlugin.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Minimal project and steps to reproduce
- Create a new 3D Unity project in Unity Hub with Unity version 2021.3 (LTS)
- Load the project and import VLC ios unity package: vlc-unity-ios-0.1.9
- In Unity build settings, switch platform to iOS.
- In Unity build settings, build project.
- Go to generated XCode project and launch XCode.
- Assign build settings in XCode: Version number, display name, signing.
- Go to Project > Build
- Error occurs near end of build process and build fails
What is the current bug behavior?
Error is generated at XCode build process and build fails.
What is the expected correct behavior?
Successful build
Does it work on other plaforms? Does it work with the official VLC apps?
Relevant logs and/or screenshots
_VLCUnity_UnityPluginLoad, referenced from:
-[MyAppController shouldAttachRenderDelegate] in LoadPlugin.o
_VLCUnity_UnityPluginUnload, referenced from:
-[MyAppController shouldAttachRenderDelegate] in LoadPlugin.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Environment
- OS: MacOS Ventura 13.5, building for iOS
- Version 13.5 building for iOS
- Device: Mac
- LibVLC version and architecture
- LibVLCSharp version
- VLC Unity plugin version vlc-unity-ios-0.1.9
- Scripting backend used IL2CPP