videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
107 stars 14 forks source link

Unity fails to add native library to build #154

Open marvpaul opened 2 weeks ago

marvpaul commented 2 weeks ago

After updating to version 0.0.22 I get the following error when building for Mac OS. I didn't got it before when using 0.0.19. Any idea how to fix?

/Users/marvinkruger/Fluids/71/Fluids/Plugins/Function.dylib /Users/marvinkruger/Fluids/71/Fluids/Plugins/Function.dylib: No such file or directory

Screenshot 2024-11-08 at 07 31 58
olokobayusuf commented 1 week ago

@marvpaul from what I can tell, this happens when you build from Unity and select "Intel + Apple Silicon" as the architecture. If you build with either "Intel" or "Apple Silicon", the Function library gets included in the build. I presume your app targets both?

On a somewhat related note, we're considering dropping support for Intel architecture on macOS, given Apple's own aggressive moves to do so. What do you think?

olokobayusuf commented 1 week ago

Also if you'd rather not wait for a release with a fix, there's a simple workaround:

  1. Download Function-macos.dylib which is the fat library (includes x86_64 and arm64 slices)
  2. Rename it to Function.dylib and drop it into the Plugins folder of your Xcode macOS project, beside VideoKit.dylib.

This should build and run properly.

EDIT: I just realized that Apple will likely quarantine the library if you download it from your browser. So instead, I recommend using a command line application like wget or curl to download the library.

marvpaul commented 1 week ago

Let me check when I’m at home.For me it would be mandatory to have the intel support. I have some customers using intel and this would exclude them from using my application, right? - best regards Marvin On 8. Nov 2024, at 15:57, Yusuf Olokoba @.***> wrote: @marvpaul from what I can tell, this happens when you build from Unity and select "Intel + Apple Silicon" as the architecture. If you build with either "Intel" or "Apple Silicon", the Function library gets included in the build. I presume your app targets both? On a somewhat related note, we're considering dropping support for Intel architecture on macOS, given Apple's own aggressive moves to do so. What do you think?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

olokobayusuf commented 1 week ago

Let me check when I’m at home.For me it would be mandatory to have the intel support. I have some customers using intel and this would exclude them from using my application, right?

Yes it would, and that's fine. Even if we decided to drop support for Intel, we wouldn't do it immediately. I'm literally typing this on an Intel MacBook Pro 😅

marvpaul commented 1 week ago

@olokobayusuf I just tested. The workaround you mentioned works for now. I was able to built and run on my Mac.

marvpaul commented 1 week ago

@olokobayusuf but I uploaded the binary and got the same error as before. So the initial problem is still not fixed I guess.

Hello, We noticed one or more issues with a recent delivery for the following app: • Fluids & Particle Simulation • Version 11.2.8 • Build 181 Please correct the following issues and upload a new binary to App Store Connect. ITMS-90288: Invalid Code Signing Entitlements - The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: 'NPA3XMW8F9.ai.fxn.fxn' for the key 'com.apple.application-identifier' in 'Fluids.app/Contents/PlugIns/Function.dylib' ITMS-90286: Invalid Code Signing Entitlements - Your application bundle's signature contains code signing entitlements that are not supported on macOS. Specifically, value 'NPA3XMW8F9.ai.fxn.fxn' for key 'com.apple.application-identifier' in 'Fluids.app/Contents/PlugIns/Function.dylib' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier .