firebase-unity-sdk icon indicating copy to clipboard operation
firebase-unity-sdk copied to clipboard

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

Open Sacristan opened this issue 2 years ago • 3 comments

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)

Sacristan avatar Apr 06 '22 15:04 Sacristan

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

DanForstinger avatar Apr 06 '22 19:04 DanForstinger

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;

wanglailai avatar May 27 '22 10:05 wanglailai

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 avatar Aug 27 '22 03:08 chkuang-g

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.

chkuang-g avatar Sep 09 '22 02:09 chkuang-g