Best way to use MobileVLCKit in Xamarin

iOS, iPad, iPhone, tvOS specific usage questions
barts2108
New Cone
New Cone
Posts: 6
Joined: 28 Jul 2008 10:08

Best way to use MobileVLCKit in Xamarin

Postby barts2108 » 05 Jun 2015 09:42

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

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: Best way to use MobileVLCKit in Xamarin

Postby dfuhrmann » 05 Jun 2015 10:04

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.

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

Re: Best way to use MobileVLCKit in Xamarin

Postby fkuehne » 05 Jun 2015 11:42

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

barts2108
New Cone
New Cone
Posts: 6
Joined: 28 Jul 2008 10:08

Re: Best way to use MobileVLCKit in Xamarin

Postby barts2108 » 05 Jun 2015 11:57

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?

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

Re: Best way to use MobileVLCKit in Xamarin

Postby fkuehne » 05 Jun 2015 12:05

Depends on the errors. Please post the log :)
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

barts2108
New Cone
New Cone
Posts: 6
Joined: 28 Jul 2008 10:08

Re: Best way to use MobileVLCKit in Xamarin

Postby barts2108 » 05 Jun 2015 12:17

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)

barts2108
New Cone
New Cone
Posts: 6
Joined: 28 Jul 2008 10:08

Re: Best way to use MobileVLCKit in Xamarin

Postby barts2108 » 08 Jun 2015 09:18

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

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

Re: Best way to use MobileVLCKit in Xamarin

Postby fkuehne » 08 Jun 2015 10:40

You are using a newer version of libvlc in an older version of VLCKit. More precisely, you are lacking commit b684d0a1db.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

barts2108
New Cone
New Cone
Posts: 6
Joined: 28 Jul 2008 10:08

Re: Best way to use MobileVLCKit in Xamarin

Postby barts2108 » 08 Jun 2015 15:00

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 ?


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

Who is online

Users browsing this forum: No registered users and 26 guests