libTVVLCKit.a file size

iOS, iPad, iPhone, tvOS specific usage questions
matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

libTVVLCKit.a file size

Postby matrog » 10 Oct 2015 09:48

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,

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: libTVVLCKit.a file size

Postby fkuehne » 10 Oct 2015 14:06

Link it against your binary and it will magically slim down to 20-30MB. Static libraries include debug symbols! :)
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: libTVVLCKit.a file size

Postby matrog » 10 Oct 2015 15:59

Thanks! 20 megs now

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: libTVVLCKit.a file size

Postby shaybc » 27 Mar 2016 14:33

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")

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: libTVVLCKit.a file size

Postby ssbmaccom » 29 Mar 2016 15:56

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.

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: libTVVLCKit.a file size

Postby shaybc » 30 Mar 2016 20:36

if the build is only 240K, why not putting it on some new dropbox account on the public folder and share the link?

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: libTVVLCKit.a file size

Postby shaybc » 02 Apr 2016 00:46

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?

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: libTVVLCKit.a file size

Postby shaybc » 09 Apr 2016 11:20

doesn't any one here knows the answer?

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: libTVVLCKit.a file size

Postby ssbmaccom » 10 Apr 2016 23:24

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.

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: libTVVLCKit.a file size

Postby shaybc » 18 Apr 2016 21:13

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

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: libTVVLCKit.a file size

Postby fkuehne » 19 Apr 2016 18:58

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...
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: libTVVLCKit.a file size

Postby shaybc » 19 Apr 2016 22:16

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 :-)


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 17 guests