Swift Swift - 2 months ago 10
iOS Question

ios hide alert from 3rd party framework/library

I am using a 3rd party library in my ios application. I have a compiled file i.e.,

".a"
file and the header files
".h"
given to me..

The solution here In Xcode, how to suppress all warnings in specific source files? talks about clicking the Compiler Flags of the source files and setting
-w
. This doesn't have anything to do with alerts I believe.
Also, I don't have source files with me..

So my question is, how do I remove/hide/disable UIAlertView or UIAlertController from a 3rd party library?

Is there a way to do set some value in
info.plist
or
AppDelegate.m
or anywhere in
Xcode
?

Answer

For anyone out there who is using libMobileVLCKit as their 3rd party framework, use this:

 _mediaplayer = [[VLCMediaPlayer alloc] initWithOptions:@[[NSString stringWithFormat:@"--%@=%@",@"extraintf",@""]]];

instead of:

 _mediaplayer = [[VLCMediaPlayer alloc] init];

It won't display your VLC alert which includes:

"Your input can't be opened:
VLC is unable to open the MRL 'file:///somefile.mp4'. Check the log for details."