EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB322530: MicroStrategy Mobile iOS 10.5 and 10.6 Do Not Trigger VPN On-Demand


Community Admin

• Strategy


MicroStrategy Mobile apps are AppConfig compliant as of MicroStrategy Mobile iOS 10.5. Thus, MicroStrategy 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 MicroStrategy Mobile iOS 10.5 and 10.6 with per app VPN enabled, the VPN connection does not get triggered automatically.

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.
 

  1. Set up the environment to use the StrategyMobile project
  2. Right-click the StrategyMobile project and select New File.
  3. Select Cocoa Touch under iOS, Click Next.
  4. Enter the name of the custom app delegate (ex: CustomAppDelegate) and make sure MSIAppDelegateImpl is selected for the Subclass and Objective-C for Language.
  5. Make sure that both StrategyMobileIPhone and StrategyMobileIPad are selected as Targets
  6. Two files ‘CustomAppDelegate.h’ and a ‘CustomAppDelegate.m’ extensions will be created.
  7. Open CustomAppDelegate.h, modify it as below and save the file.

 


// 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

 
 
8. Open the CustomAppDelegate.m file, modify it as below and save the file.
 

 


//  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

 
 
9. In the project navigator, under StrategyMobile, click on the .xib file that corresponds to the device type. (MainWindow-iPad.xib for iPad  and MainWindow.xib for iPhone)
 
10. Click on the MSTRMobileAppDelegate under Objects as shown below
 
 
11. Under the Identity Inspector tab > Custom Class, put the name of the custom app delegate class you created in step 4
 
 
 
 
 
 
12. Save the project, compile the app and upload the .ipa file to EMM console, such as AirWatch for deployment.
 
 
 
The example provided in this document is provided “as-is” and user has read the following customization warning:
ADDITIONAL INFORMATION:
The Strategy SDK allows you to customize several Strategy products and extend and integrate the Strategy business intelligence functionality into other applications. However, before changing the way Strategy products look or behave, it is helpful to understand how the application is built. For more information regarding the Strategy products or the process of customizing Strategy products, please refer to Strategy Developer Zone (https://developer.microstrategy.com).
To access the Strategy Developer Zone, you must have access to the Strategy Knowledge Base, you must have purchased the Strategy SDK, and you must be current on your Strategy maintenance agreement. If you are a US-based business and believe that you satisfy all three of these conditions but you do not have access to the Strategy Developer Zone, please contact Strategy Technical Support at support@microstrategy.com or at (703) 848-8700. If you are an international business, please contact Strategy Technical Support at the appropriate email address or phone number found at https://www.microstrategy.com/us/services/support/contact.
CUSTOMIZATION WARNING:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.
 
 
KB322530


Comment

0 comments

Details

Knowledge Article

Published:

March 31, 2017

Last Updated:

December 31, 2018