readyplayerme / rpm-unity-sdk-core

This Module contains all the core functionality required for using Ready Player Me avatars in Unity, including avatar loading and creation
MIT License
97 stars 33 forks source link

Undefined Symbols Error in iOS Build with Unity SDK #205

Closed amokto closed 10 months ago

amokto commented 10 months ago

Describe the bug When attempting to build an iOS project using the latest Unity SDK, an 'Undefined symbols' error occurs, specifically related to WebView components. This issue prevents successful iOS builds, hindering development and deployment on iOS devices.

Files No specific .glb files or avatar URLs are linked to this issue. The bug is reproducible in a new, empty Unity project with the latest SDK version. Example scenes from the SDK have been tested without resolving the issue.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Unity project.
  2. Add the latest Unity SDK from the provided Git URL.
  3. Add any sample using WebView (ie: AvatarCreatorSamples)
  4. Attempt to build the project for iOS. Encounter the 'Undefined symbols' error related to WebView.

Expected behavior The expected behavior is a successful build for iOS without encountering the 'Undefined symbols' error.

Screenshots

image

Desktop (please complete the following information):

additionally (if significant for the bug):

Additional context Error Log

ld: Undefined symbols: _OBJCCLASS$_WKProcessPool, referenced from: in WebView.o _OBJCCLASS$_WKUserContentController, referenced from: in WebView.o _OBJCCLASS$_WKUserScript, referenced from: in WebView.o _OBJCCLASS$_WKWebView, referenced from: in WebView.o _OBJC$_CATEGORYWKWebView$_WebViewProtocolConformed in WebView.o _OBJCCLASS$_WKWebViewConfiguration, referenced from: in WebView.o _OBJCCLASS$_WKWebsiteDataStore, referenced from: in WebView.o _WKWebsiteDataTypeDiskCache, referenced from: -[CWebViewPlugin clearCache:] in WebView.o _WKWebsiteDataTypeMemoryCache, referenced from: -[CWebViewPlugin clearCache:] in WebView.o clang: error: linker command failed with exit code 1 (use -v to see invocation)

HarrisonHough commented 10 months ago

Hey thanks for making the bug report.

Can you try updating WebView to the latest version 2.1.2 and see if that fixes the issue?

amokto commented 10 months ago

I did try the newest version (2.1.2) as well and that has the same missing symbol error.

soriac commented 10 months ago

Having the same issue, trying to build both on iPhone and iPad

redStriker commented 10 months ago

Team, same issue here as well. Please let us know if this issue can be quickly fixed. Thank you!!

redStriker commented 10 months ago

It is working for me now.

Make sure that you have the necessary frameworks linked in your Xcode project. In this case, it looks like you need to link the WebKit framework. To do this:

Open your Xcode project. In the Project Navigator, select your project. Go to the "General" tab. Scroll down to the "Frameworks, Libraries, and Embedded Content" section. Click the "+" button and add the WebKit framework.

HarrisonHough commented 10 months ago

Thanks for the update. We do have an automatic build process that is supposed to add the WebKit framework however it seems that it is not working as expected. Will investigate and work on a fix.

HarrisonHough commented 10 months ago

This should be fixed in latest release https://github.com/readyplayerme/rpm-unity-sdk-webview/releases/tag/v2.1.3

Please let us know if that is not the case.