SrejonKhan / AsyncImageLibrary

Load Image(Texture) in Unity without blocking the main thread, with the full advantage of SkiaSharp.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to load DLL 'libSkiaSharp' on iOS

BigGiantHead opened this issue · comments

Hello,

When I build for iOS using this package I get the following error:

DllNotFoundException: Unable to load DLL 'libSkiaSharp'. Tried the load the following dynamic libraries: Unable to load dynamic library '/libSkiaSharp' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(/libSkiaSharp, 0x0005): tried: '/libSkiaSharp' (errno=2), '/private/preboot/Cryptexes/OS/libSkiaSharp' (errno=2), '/libSkiaSharp' (errno=2)

Please help.

commented

any luck with this? I get it too

Could you please add __IOS__and __UNIFIED__ to the Scripting Define Symbols and try to build again? Let me know the update.

I will update SkiaSharp's version to the latest one (2.88.3), it's been a long time since we are using an older version (2.80.3).

commented

Could you please add __IOS__and __UNIFIED__ to the Scripting Define Symbols and try to build again? Let me know the update.

I will update SkiaSharp's version to the latest one (2.88.3), it's been a long time since we are using an older version (2.80.3).

I actually tried that already, didn't work.

Alright, thanks for the update.

Hello @LeshM, could you please try this 0.2.0-preview.1 version? Unfortunately, I don't have access to any Mac device right now, so couldn't build the XCode project.

Right now, you can grab it from OpenUPM .

Or, merge these in your manifest.json -

"scopedRegistries": [
  {
    "name": "package.openupm.com",
    "url": "https://package.openupm.com",
    "scopes": [
      "com.srejonkhan"
    ]
  }
]

"dependencies": {
    "com.srejonkhan.asyncimagelibrary": "0.2.0-preview.1"
}

Alternatively, you can try cloning this sandbox project and change the branch of the submodule to develop branch (instructions added) - https://github.com/SrejonKhan/AsyncImageLibrary-Sandbox

The build process would be exactly the same as you've tried earlier with Scripting Define Symbols. In case it fails, you may try tweaking the setting of /AsyncImageLibrary/Dependencies/SkiaSharp/ios/native/libSkiaSharp.framework if any mistakes were made from my side. Any changes/pull request is always appreciated.

commented

Hello @LeshM, could you please try this 0.2.0-preview.1 version? Unfortunately, I don't have access to any Mac device right now, so couldn't build the XCode project.

Right now, you can grab it from OpenUPM .

Or, merge these in your manifest.json -

"scopedRegistries": [
  {
    "name": "package.openupm.com",
    "url": "https://package.openupm.com",
    "scopes": [
      "com.srejonkhan"
    ]
  }
]

"dependencies": {
    "com.srejonkhan.asyncimagelibrary": "0.2.0-preview.1"
}

Alternatively, you can try cloning this sandbox project and change the branch of the submodule to develop branch (instructions added) - https://github.com/SrejonKhan/AsyncImageLibrary-Sandbox

The build process would be exactly the same as you've tried earlier with Scripting Define Symbols. In case it fails, you may try tweaking the setting of /AsyncImageLibrary/Dependencies/SkiaSharp/ios/native/libSkiaSharp.framework if any mistakes were made from my side. Any changes/pull request is always appreciated.

I'm sorry but I'm afraid I can't, I'll need to reintegrate your package and then build for both Android & iOS using UCB (which takes about an hour each) just to find out if this works. I'm on a tight deadline and can't spare the time.

I do appreciate your work though, so thank you! 🙏

BTW I ended up using some Unity coroutine hack as a solution.

@LeshM No problem. Thank you too!