Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

openvpn ios client custom url scheme

My application have iOS OpenVPN Connect app dependency.

So I have to check if the app is already installed or not

if so I will just Open the app using OpenURL scheme else I will open its appstore link so that user will install it.

So my problem here is I couldn't find any open url associated with this app.

Any help is appreciated !

like image 656
karthik Avatar asked Nov 22 '25 04:11

karthik


1 Answers

it exports a doctype. so you could use a UIDocumentInteractionController to check if the filetype can be opened and thus the app is installed.

uti is net.openvpn.formats.ovpn

copy a file of that type (you can make such a file on OSX) to the bundle and attempt to present an interaction controller for it using presentOpenInMenuFromRect

set yourself as delegate and if it fires willShowMenu, then you no the app is there - and you dismiss the menu.

so to get you started something like this:

NSString *file = ... //path to file with UTI in question 
UIDocumentInteractionController *c = ... //init with file
c.delegate = self;
_hasAppInstalledForUTI = NO;
[c present...];

if(!_hasAppInstalledForUTI) {
    //act
}

...

- willPresentOpenInMenu {
    [c dismissAnimated:NO];
    _hasAppInstalledForUTI = YES;
}

BTW: I checked the app -- there is no url scheme.

like image 178
Daij-Djan Avatar answered Nov 23 '25 18:11

Daij-Djan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!