SYMPTOM
Strategy Mobile apps are AppConfig compliant as of Strategy Mobile iOS 10.5. Thus, Strategy Mobile apps can be deployed with any AppConfig compliant EMM, such as AirWatch. One feature of an AppConfig mobile app is the ability to launch apps using per app VPN. However, users may notice with Strategy Mobile iOS 10.5 and 10.6 with per app VPN enabled, the VPN connection does not get triggered automatically.
CAUSE
This is a known issue for Strategy Mobile iOS 10.5 and 10.6.
ACTION
This issue is addressed in Strategy Mobile iOS 10.7 and later. Upgrade to the latest release of Strategy Mobile to take advantage of this fix.
WORKAROUND
There is a workaround that can be implemented using our Strategy Mobile iOS 10.5 and 10.6 SDK. The following steps need to be taken to implement this workaround that will allow the Strategy Mobile app to trigger the VPN connection automatically (on-demand). The workaround is applied by creating a custom app delegate in the Xcode project using the steps outlined below:
Important: Please note that Strategy Mobile 10.5 iOS SDK is compiled with Xcode 7.3.x and Strategy Mobile 10.6 iOS SDK is compiled with Xcode 8.x.
// CustomAppDelegate.h // StrategyMobile // // Created by <user> on <current date>. // Copyright © 2017 MicroStratgy Inc. All rights reserved. #import <UIKit/UIKit.h> #import <StrategyMobileSDK/MSIAppDelegateImpl.h> @interface CustomAppDelegate : MSIAppDelegateImpl @end
// CustomAppDelegate.m
// StrategyMobile
//
// Created by <user> on <current date>
// Copyright © 2017 MicroStratgy Inc. All rights reserved.
#import "CustomAppDelegate.h"
@implementation CustomAppDelegate
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
BOOL res = [super application:application didFinishLaunchingWithOptions:launchOptions];
NSLog(@"This is hitting this method");
/* The "http://www.Strategy.com" below can be replaced with any URL.
The URL is only needed to initiate a network request for the VPN to be triggered*/
NSURL *URL = [NSURL URLWithString:@"http://www.Strategy.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:
^(NSData *data, NSURLResponse *response, NSError *error) {
// ...
}];
[task resume];
return res;
}
//The code below detects when the application comes to the foreground to trigger the VPN
-(void)applicationWillEnterForeground:(UIApplication *)application{
[super applicationWillEnterForeground:application];
NSURL *URL = [NSURL URLWithString:@"http://www.Strategy.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:
^(NSData *data, NSURLResponse *response, NSError *error) {
// ...
}];
[task resume];
}
@end