unity-jar-resolver icon indicating copy to clipboard operation
unity-jar-resolver copied to clipboard

[Bug] IOSResolver.dll tries to load on Windows/Linux - causes error

Open CJxD opened this issue 2 years ago • 8 comments

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2021.3.16f1
  • External Dependency Manager version: 1.2.176 (longstanding issue with all previous versions)
  • Source you installed EDM4U: .unitypackage (.unitypackage or Unity Package Manager)
  • Features in External Dependency Manager in use: Android Resolver (Android Resolver, iOS Resolver, VersionHandler, etc.)
  • Plugins SDK in use: none (Firebase, Admob, Facebook, etc.)
  • Platform you are using the Unity editor on: Linux (Mac, Windows, or Linux)

[REQUIRED] Please describe the issue here:

  1. Import the .unitypackage into any project and run on Linux (or Windows)
  2. Note the following error in the console:
Assembly 'Assets/ExternalDependencyManager/Editor/1.2.176/Google.IOSResolver.dll' will not be loaded due to errors:
Unable to resolve reference 'UnityEditor.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?

Please answer the following, if applicable:

What's the issue repro rate? (eg 100%, 1/5 etc)

100%

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

This is because this DLL can only be loaded on a Mac. I've fixed this manually for some time by changing the Platform Settings for that file from Any OS to macOS, which updates the meta and prevents issues.

I've put up with this for a while, but now one of my customers asked how to fix the error after importing External Dependency Manager. I think it should be like this by default to prevent confusion.

CJxD avatar May 31 '23 17:05 CJxD

Hi @CJxD,

Thanks for bringing this to our attention. This issue could be solved by making sure you have the iOS build support in your Unity version.

In terms of the change you're proposing, I can relay this to the team so we can see what they think. This sounds promising since it would prevent the error message from happening. You may refer to this thread for updates about your requested feature.

paulinon avatar Jun 02 '23 12:06 paulinon

I think what @CJxD suggested is a valid fix and should be quick enough to resolve by modifying the export configuration to something like the following

        {
        "importer": "PluginImporter",
        "platforms": [],
        "labels": ["gvhp_targets-editor"],
        "paths": [
            "ExternalDependencyManager/Editor/*/Google.IOSResolver.*"
        ],
        "override_metadata": {
          "PluginImporter": {
            "platformData": [ {
                "first" : {
                  "Editor": "Editor"
                },
                "second": {
                  "settings": {
                    "OS": "OSX"
                  }
                }
              }
            ]
          }
        },
        "override_metadata_upm": {
            "PluginImporter": {
            "platformData": [ {
                "first" : {
                    "Editor": "Editor"
                },
                "second": {
                    "enabled": 1,
                    "settings": {
                        "OS": "OSX"
                    }
                }
              }
            ]
            }
          }
        },

Let me see if this will have any impact to other functionality.

chkuang-g avatar Jun 13 '23 19:06 chkuang-g

Still running into this problem

StephenHodgson avatar Mar 31 '24 23:03 StephenHodgson

This is duplicate of #412

The correct solution (by developers, not users) is to ensure the plugins are setup correctly for their intended platforms any OS -> mac

Weibye avatar Apr 26 '24 10:04 Weibye

When I install the External Dependency Manager via the Package Manager I am not able to change the platform settings to Mac instead of Any OS to fix this problem. I'm guessing since it's not a file in my project but a file in the packages folder. Can this be fixed in the package instead of having everyone fix this manually?

orbitalnine avatar Dec 02 '24 19:12 orbitalnine

When I install the External Dependency Manager via the Package Manager I am not able to change the platform settings to Mac instead of Any OS to fix this problem. I'm guessing since it's not a file in my project but a file in the packages folder. Can this be fixed in the package instead of having everyone fix this manually?

Yup I have a PR open to address it:

  • #714

StephenHodgson avatar Dec 02 '24 20:12 StephenHodgson

The issue is still relevant for version 1.2.185

Habetdin avatar Mar 26 '25 19:03 Habetdin

@a-maurice still a problem for 1.2.186

Tried with Unity 6000.0.49f1 with only Android and Windows IL2CPP modules installed.

Assembly 'Packages/com.google.firebase.app/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 incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.

StephenHodgson avatar May 19 '25 21:05 StephenHodgson

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2021.3.16f1
  • External Dependency Manager version: 1.2.176 (longstanding issue with all previous versions)
  • Source you installed EDM4U: .unitypackage (.unitypackage or Unity Package Manager)
  • Features in External Dependency Manager in use: Android Resolver (Android Resolver, iOS Resolver, VersionHandler, etc.)
  • Plugins SDK in use: none (Firebase, Admob, Facebook, etc.)
  • Platform you are using the Unity editor on: Linux (Mac, Windows, or Linux)

[REQUIRED] Please describe the issue here:

  1. Import the .unitypackage into any project and run on Linux (or Windows)
  2. Note the following error in the console:
Assembly 'Assets/ExternalDependencyManager/Editor/1.2.176/Google.IOSResolver.dll' will not be loaded due to errors:
Unable to resolve reference 'UnityEditor.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?

Please answer the following, if applicable:

What's the issue repro rate? (eg 100%, 1/5 etc)

100%

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

This is because this DLL can only be loaded on a Mac. I've fixed this manually for some time by changing the Platform Settings for that file from Any OS to macOS, which updates the meta and prevents issues.

I've put up with this for a while, but now one of my customers asked how to fix the error after importing External Dependency Manager. I think it should be like this by default to prevent confusion.

Besho777 avatar Aug 11 '25 16:08 Besho777