Skip to content

Assembly 'Assets/Firebase/Editor/Firebase.Editor.dll' will not be loaded due to errors: Unable to resolve reference 'UnityEditor.iOS.Extensions.Xcode'. Is the assembly missing or #218

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

Closed
Sacristan opened this issue Apr 6, 2022 · 4 comments
Assignees
Labels
api: crashlytics type: bug unity-editor Issues related to Firebase usage in Unity editor

Comments

@Sacristan
Copy link

Sacristan commented Apr 6, 2022

Please allow us to support only one platform. For example, Meta Quest usecase where Unity projects needs to have just Android support

Therefore, Editor scripts should check whether build module exists (Android, iOS)

@DanForstinger
Copy link

DanForstinger commented Apr 6, 2022

We are seeing this issue as well. We run CI builds for android and IOS, but only have references to a single platform at a time and no way to import the ios module when building android. Any word on a fix? It's as simple as ifdefing the reference to those extensions

@wanglailai
Copy link

Same issue here. Some people just run project in Editor, and they do not want to install iOS or Android Module.

The solution is modify editor/crashlytics/src/iOSPostBuild.cs file and build the sdk yourself.

-    private static void SetupGUIDForSymbolUploads(UnityEditor.iOS.Xcode.PBXProject pbxProject,
+    private static void SetupGUIDForSymbolUploads(object projectObj,
                                                   string completeRunScriptBody,
 string targetGuid) {
+      var pbxProject = (UnityEditor.iOS.Xcode.PBXProject)projectObj;
       try {
....
-    private static string GetUnityFrameworkTargetGuid(UnityEditor.iOS.Xcode.PBX
Project project) {
-      // var project = (UnityEditor.iOS.Xcode.PBXProject)projectObj;
+    private static string GetUnityFrameworkTargetGuid(object projectObj) {
+      var project = (UnityEditor.iOS.Xcode.PBXProject)projectObj;

@chkuang-g chkuang-g added needs-attention Need Googler's attention type: question unity-editor Issues related to Firebase usage in Unity editor labels Jul 15, 2022
@DellaBitta DellaBitta added type: feature request and removed needs-attention Need Googler's attention labels Jul 19, 2022
@chkuang-g
Copy link
Contributor

chkuang-g commented Aug 27, 2022

https://github.com/firebase/firebase-unity-sdk/blob/main/editor/crashlytics/src/iOSPostBuild.cs#L155

Ah, thanks for reporting this issue. I think it is from Unity 2019 that Unity became very restricted about the missing symbol in a method parameter, even though that part of the code is never used. And UnityEditor.iOS.Xcode.PBXProject is missing usually because the user did not install Unity iOS support.

The workaround indeed is to change the parameter type to object and cast it in the method.

This is definitely an oversight from our side. And thanks for the suggested workaround.

Let me bring Crashlytics team in to resolve this issue.

@samedson Could you help to update the Crashlytics Editor tool?

@chkuang-g chkuang-g assigned chkuang-g and unassigned samedson Sep 6, 2022
chkuang-g added a commit that referenced this issue Sep 8, 2022
Crashlytics editor tool will not load if the user only adds Android
build support to the Unity editor.  This is because Unity has
more restricted validation to function signature when loading dlls.

This fix avoids passing `UnityEditor.iOS.Extensions.Xcode.PBXProject`
directly but passing an `object` instead.

Also fixes the integration test script just in case we want to run
the test againt only one build target.
chkuang-g added a commit that referenced this issue Sep 8, 2022
Crashlytics editor tool will not load if the user only adds Android
build support to the Unity editor.  This is because Unity has
more restricted validation to function signature when loading dlls.

This fix avoids passing `UnityEditor.iOS.Extensions.Xcode.PBXProject`
directly but passing an `object` instead.

Also fixes the integration test script just in case we want to run
the test againt only one build target.
@chkuang-g
Copy link
Contributor

This should be included in the next release 9.5.0. If the issue persists, I recommend to open a new issue and reference this one for better visibility.

@firebase firebase locked and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: crashlytics type: bug unity-editor Issues related to Firebase usage in Unity editor
Projects
None yet
Development

No branches or pull requests

6 participants