Page 1 of 1

libTVVLCKit.a file size

Posted: 10 Oct 2015 09:48
by matrog
Hi All, is there a way to reduce libTVVLCKit.a file size?

Now is about 330MB

Code: Select all

drwxr-xr-x+ 12 matteo staff 408 10 Ott 08:23 TVVLCKit -rw-r--r--+ 1 matteo staff 333530640 10 Ott 09:42 libTVVLCKit.a
and max tvOS app size is 200MB.

Thanks,

Re: libTVVLCKit.a file size

Posted: 10 Oct 2015 14:06
by fkuehne
Link it against your binary and it will magically slim down to 20-30MB. Static libraries include debug symbols! :)

Re: libTVVLCKit.a file size

Posted: 10 Oct 2015 15:59
by matrog
Thanks! 20 megs now

Re: libTVVLCKit.a file size

Posted: 27 Mar 2016 14:33
by shaybc
what is the process of linking a lib as a binary to your binary (is it embed binary in Xcode build settings?)

is there a place where I can simply download TVVLCKit.framework or libTVVLCKit.a already compiled? (every try i have done to compile it never succeed, always stating 'MobileVLCKit/MobileVLCKit.h' file not found")

Re: libTVVLCKit.a file size

Posted: 29 Mar 2016 15:56
by ssbmaccom
I was able to build a libTVVLCKit.a till about one week ago, due to compilation issues when building the gsm contrib part. I hope this gets fixed soon. Reason is, that while building code.c in the contrib gsm a missing prototype of memcpy causes the build to fail (because of -Werror option). Just copy a prototype of memcpy manually, then it builds.
After cloning VLCKit to your local machine, use a GUI-based git utility and create a local branch based on the last commit end of december. My TestFlight reports has given this as the most reliable version of libTVVLCKit.a (best performance even sometimes crashing). This "backport" uses an older version of libVLC sources, which require some small changes (live555 contrib has to be updated and one change in VLCKit). You can find the required changes when browsing through the commits using the git GUI utility.
After building libTVVLCKit.a with Archive option (to keep bitcode), the lib shrinks down to about 240 kB after stripping non-external symbols.
This is the version my App (vuplusTV) is built with for the AppStore release. The App has a download size of less than 18 kB, as the linker removes "dead" code, that is not used/referenced.

I could share the special backport version I prepared of libTVVLKKit.a, but my upload speed is very poor, so it takes several hours to upload the file. Maybe someone can provide a public server for downloading the lib once uploaded (or someone at videolan is pushing the version to the nigthly servers). But anyway this version comes with a big disclaimer - it is not proven except for the things I use it for.

Re: libTVVLCKit.a file size

Posted: 30 Mar 2016 20:36
by shaybc
if the build is only 240K, why not putting it on some new dropbox account on the public folder and share the link?

Re: libTVVLCKit.a file size

Posted: 02 Apr 2016 00:46
by shaybc
no matter what i do at archive TVVLCKit with my project (linking with my project the .o file or the .framework file) the result is still 206 MB archive size (before TVVLCKit it was 44 MB)

Image

any suggestions?

Re: libTVVLCKit.a file size

Posted: 09 Apr 2016 11:20
by shaybc
doesn't any one here knows the answer?

Re: libTVVLCKit.a file size

Posted: 10 Apr 2016 23:24
by ssbmaccom
I do not have a problem sharing the build via Dropbox, but it requires patience until the file is availble.

The archive size is quite huge, because it contains a very long symbol table, which will also cause a warning when uploading the archive for review.
Do not look at the archive size but at the size of the resulting App.

Re: libTVVLCKit.a file size

Posted: 18 Apr 2016 21:13
by shaybc
i managed eventually to lower the size by removing the .Framework file and adding only the "libTVVLCKit.a" for the apple tv (and not the one for the simulator, that reduced it little (143 M), if i will find another way to reduce it even further - i will update this post,

thanks for the reply

Re: libTVVLCKit.a file size

Posted: 19 Apr 2016 18:58
by fkuehne
Well, you need to link against that static library, not distribute it. VLC for Apple TV uses it as well and is less than 20 MB...

Re: libTVVLCKit.a file size

Posted: 19 Apr 2016 22:16
by shaybc
the distribution part is understood, but isn't including the .a file as a dependant library enough? (in the target's Linked Framework and Libraries on the General tab)
if it is then 20M is definitely not what i got :-)