Page 1 of 1

Best way to use MobileVLCKit in Xamarin

Posted: 05 Jun 2015 09:42
by barts2108
I am working on an app using a universal binary of MobileVLCKit with a wrapper found here https://github.com/dalexsoto/MobileVLCK ... amarin.iOS

Due to long compile/linking times I have created a project that 'lipo's' the library into one for simulator and one for real devices, and then compiles them into "dll"s
Those dll's are referenced in the xamarin project for the app. The problem is that the size of the app is too large.

mobilevlckit dll sizes are 347 MB for devices and 257 MB for simulator. The result is that the app is too large for the 60MB (armv7) and 80MB (arm64) limits of the app store.

How can I use the MobileVLCKit UB in my project without running into problems with app store size limits and without long compiling/linking times

Re: Best way to use MobileVLCKit in Xamarin

Posted: 05 Jun 2015 10:04
by dfuhrmann
If you strip the binaries while linking, they should get noticably smaller. I think with VLC for iOS we have similar sizes for MobileVLCKit at first, but after linking the final binary is much smaller.

Re: Best way to use MobileVLCKit in Xamarin

Posted: 05 Jun 2015 11:42
by fkuehne
David is absolutely right. We reach similar files sizes for intermediate versions of MobileVLCKit. However, you really need to strip both dead code and symbols. The intermediate binary includes full text symbols, debug info and lots of unused code. After stripping, it will be down to ~20 MB per architecture.

Re: Best way to use MobileVLCKit in Xamarin

Posted: 05 Jun 2015 11:57
by barts2108
Going to try to achieve that.

Currently still using version 2.2.0-RC1 because that is compatible with the link that I posted before. If I download version 2.2.1 I get errors on SSL libraries. any hints where I should find those libraries?

Re: Best way to use MobileVLCKit in Xamarin

Posted: 05 Jun 2015 12:05
by fkuehne
Depends on the errors. Please post the log :)

Re: Best way to use MobileVLCKit in Xamarin

Posted: 05 Jun 2015 12:17
by barts2108
I changed linker behaviour in xamarin to Link all assemblies. This gave me a linker error "failed to resolve System.Boolean UIKit.UIFont::op_Inequality ..." which must have been caused by package updates in xamarin that are not compatible with the xamarin version. Now updated xamarin as well and for the ad-hoc build I see a 50% size decrease for __TEXT (which is the number used for the limit of 60/80 MB AFAIK).

I will get back here with the exact error messages about the SSL libraries (that might be next week)

Re: Best way to use MobileVLCKit in Xamarin

Posted: 08 Jun 2015 09:18
by barts2108
Managed to get the newer library (from http://downloads.videolan.org/cocoapods ) into my project. When I rebuild all I get errors like these

Code: Select all

MTOUCH: Error MT5210: Native linking failed, undefined symbol: _libssh2_sftp_seek. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210)
I get about 17 of those errors, all complaining about libssh2 functionality. I guess I need to have this library somehow in my project, but I would like to know where I can get the correct libssh2 library to use with this MobileVLCKit universal binary

Re: Best way to use MobileVLCKit in Xamarin

Posted: 08 Jun 2015 10:40
by fkuehne
You are using a newer version of libvlc in an older version of VLCKit. More precisely, you are lacking commit b684d0a1db.

Re: Best way to use MobileVLCKit in Xamarin

Posted: 08 Jun 2015 15:00
by barts2108
I am sorry but I don't get that. I am using the universal binary, where the version 2.2.0-RC1 runs fine and the version 2.2.0 does not. I do not have any libvlc inside my project. I guess that's part of the universal binary.

Or is it the APIDefinition.cs and/or the other .cs files that need to be updated ?