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

[FR] Please create seperate macOS architechture files

Open snorrsi opened this issue 1 year ago • 8 comments

Feature proposal

  • Firebase Component: Core (Auth, Core, Database, Firestore, Messaging, Storage, etc)

Describe your use case and/or feature request here.

I am trying to build Firebase UPM packages from your tgz files to distribute over Github since you still don’t do it (Google Play Plugins does fyi) In Firebase 9.1.0 the .bundle size is 130 mb which is too big for Github (unless using LFS). I look at the file and your build scripts and noticed you are using lipo to merge the arm64 and x86_64 archs together to make that bundle file. If I use lipo to extract each architecture the files are 70 mb each.

Can you please consider stop doing that as there is no need for it, just specify the arch for each file in Unity .meta file

snorrsi avatar Jul 12 '22 15:07 snorrsi

👍

FmManos avatar Jul 13 '22 12:07 FmManos

Hi @snorrsi

Thanks for calling this out, we will see if we can get them to split and still import correctly. One of the potential problems that we will need to investigate with this is whether older Unity versions will import correctly, as we currently support back to Unity 2018.

a-maurice avatar Jul 13 '22 19:07 a-maurice

could we remove X86_64 folder if we only build for Android and iOS?

xinatcg avatar Jul 14 '22 08:07 xinatcg

The files under the x86_64 folder are needed when running the Unity Editor. Which one you need depends upon which platform you are running on. Windows: dll MacOS: bundle Linux: so

You could delete the ones that you don't need without concern.

a-maurice avatar Jul 14 '22 17:07 a-maurice

In our case, we use MacOS and of course we want to avoid using LFS. In the end we manually splitted the bundle to its two respected architectures and we have two 65mb files instead of one 130 mb one. But this is something we need to keep doing for every update in the future so please try to deal with that properly.

FmManos avatar Jul 15 '22 06:07 FmManos

You can also update the upload size on your registry server if it's self hosted.

Verdaccio .config file example:

max_body_size: 1000mb

StephenHodgson avatar Jul 15 '22 14:07 StephenHodgson

The files under the x86_64 folder are needed when running the Unity Editor. Which one you need depends upon which platform you are running on. Windows: dll MacOS: bundle Linux: so

You could delete the ones that you don't need without concern.

@a-maurice

but may I ask what we need in Unity Editor for Firebase SDK? i think the Firebase SDK is only used for the real devices right? for example, crashlytic can only send the crash log on the device and analytic can only track events on the device. Has the Firebase Unity SDK has any ability on the Unity Editor?

xinatcg avatar Jul 15 '22 14:07 xinatcg

Yes, while the Firebase Unity SDK is intended to be used on device, we do have a basic level of functionality within the Unity Editor, to prevent problems when hitting the play button. Some of the products, like crashlytics and analytics, do not have any functionality in the Editor, but others like Firestore do. This is documented here: https://firebase.google.com/docs/unity/setup#available-libraries-desktop

a-maurice avatar Jul 18 '22 17:07 a-maurice