Issue with Mac Build Post Process

Report bugs here
admin
Site Admin
Posts: 24
Joined: Thu Mar 19, 2020 8:52 pm

Re: Issue with Mac Build Post Process

Post by admin »

Hi Andrew,

Very sorry you are continuing to see issues with the MacOS build. Please see the responses to your questions inline.

> Actually I think the main issue we are having is that the plugin itself is not being loaded in the code as that is the error we get in builds.
Would you be able to paste the error for me to look at? It will be hard for me to troubleshoot this further without being able to see specifics. Please also let me know which version of the plugin you are on. The most up to date version can be found here: https://github.com/nullObjectPtr/hovelhouse-cloudkit

> Like does renaming the dylib to a bundle file a part of the process to make Unity recognize it?
Yes, although admittedly I did this based on a Unity-Forums post, and I doubt the validity of the advice. A think a dylib would work just as well.

> And is it okay if its in the Plugins folder and not the Frameworks folder in a build with the other dylib files.
Should be 100% ok. The MacOS builds I have working locally all have their bundle in the plugins folder.

> As a note, I don't believe we have the build to Xcode Project because our project is built in Unity 2018.4.24. Do you think it should still work in an older versions of Unity prior to Unity 2019?
It should. I have been testing the plugin with unity versions as far back as Unity 2018.4.7

If you feel comfortable with it, I would be happy to take a look at your project and debug it locally. It may be the quickest way to get to the bottom of whats going on. Just let me know.

welltold
Posts: 8
Joined: Tue Jul 14, 2020 10:35 pm

Re: Issue with Mac Build Post Process

Post by welltold »

Oh, okay. I believe I might have gotten it to load. I noticed that in the github Unity project there were two files in the bin/macos folder:: HHCloudKistMacOS.bundle and libHHCloudKitMacOS.dylb. I noticed that the dylib was like three times the size of the bundle so I copied that to our project, renamed it to .bundle and signed it after the build and now we aren't getting the DllNotFoundException in the build.

Does this seem like this should be fine? Since I am not quite sure what the difference was between these two files.

Thanks again,
Andrew

admin
Site Admin
Posts: 24
Joined: Thu Mar 19, 2020 8:52 pm

Re: Issue with Mac Build Post Process

Post by admin »

Hey! Glad you were able to get it working. :D

If you don't mind I'd still like to try to get to the bottom of what went wrong.

The most recent commits for the git-hub project just have the .bundle. Did you perhaps build the library from the Xcode project? There is a script that copies the dylib from the products directory into correct folder in the Unity project. That would explain how they both ended up there.

Since you say that the dylib is about 2X the size of the bundle - I am wondering if the dylib contains additional architectures in it. Would you mind letting me know the output of the following command?

Open a terminal and type "file /path/to/the/library/HHCloudKitMacOS.dylib" without the quotes and let me know the output from that? It will list the archetectures that are present in the library.

The bundle/dylib in the github project is build only for a x86_64 architecture. My assumption here is that no one would be building a universal binary anymore since apple started rejecting 32bit iOS submissions at somepoint in 2018. But I also understand that Universal Binary is a project default in older versions of unity. Would you happen to be running a 32bit mac?

Post Reply