How to launch SureFox from other apps on iPads and iPhones?

Applies to:
Product SureFox
Platform iOS

With SureFox App Scheme, it is possible to launch SureFox from another app, and by providing a URL after the scheme, SureFox will launch and open the URL. The URL will load if it’s in the list of allowed website, else an error page will be shown.

SureFox can be launched by three ways:

1.  By using Safari or an app that can open URL’s

2.  By using UIApplication class’s openURL method at the required location in your app

3.  By passing URL’s with scheme as surefox:// for SureFox and surefoxlite:// for SureFox Lite

 

1. Using Safari to launch SureFox:

In the iOS device’s Safari address bar enter : surefox:// for SureFox or surefoxlite:// for SureFox Lite.

To launch SureFox and open a specific website enter URL as: surefox://www.yourwebsite.com for SureFox and surefoxlite://www.yourwebsite.com for SureFox Lite.

Some more examples:

•  If “Allow Sub-Domain” option is switched ON in SureFox settings for “www.yourwebsite.com” then using url like below will also work:

  • surefox://yourwebsite.com
  • surefoxlite://yourwebsite.com

_______________or

  • surefox://mail.yourwebsite.com
  • surefoxlite://mail.yourwebsite.com

•  If “Allow Sub-Domain” is OFF then sub-domain has to be mentioned:

  • surefox://www.yourwebsite.com
  • surefoxlite://www.yourwebsite.com

•  If “Allow only this URL” is ON for “http://www.yourwebsite.com/abc” then the URL in Safari has to be:

  • surefox://http://www.yourwebsite.com/abc
  • surefoxlite://http://www.yourwebsite.com/abc

•  If you wish to give the scheme of the url as well then it can be done as below(following convention above):

  • surefox://http://www.yourwebsite.com
  • surefoxlite://http://www.yourwebsite.com

 

2. Using “openURL” method in your app:

To launch SureFox from another app, it is necessary to use UIApplication class’s openURL method at required location as shown below:

Calling this method simply launches SureFox/SureFox Lite

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://“]];

or

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”surefoxlite://”]];

 

In case of Website http://www.yourwebsite.com added in SureFox Allowed Websites:

Call the method in these formats when “Allow Sub-Domain is ON:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://www.yourwebsite.com”]];

or

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://mail.yourwebsite.com“]];

or

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://yourwebsite.com”]];

or

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://http://yourwebsite.com”]];

or

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://http://www.yourwebsite.com”]];

or

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://http://mail.yourwebsite.com”]];

 

Call the method in these formats when “Allow Sub-Domain is OFF:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://www.yourwebsite.com”]];

or

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“surefox://http://www.yourwebsite.com”]];

 

3. By Passing the URL in links with prefix as surefox:// or surefoxlite:// :

If it requires that a link be opened in SureFox, the URL must be edited to include prefix as surefox:// or surefoxlite://

Example:
Link:http://www.yourwebsite.com

To open it in SureFox edit it to:
Edited link: surefox://http://www.yourwebsite.com

 

For any more details contact us on techsupport@42gears.com

For free trail, click here

Leave a Comment