Usage Note 60168: Re-signing SAS® Visual Analytics App for Apple iOS in preparation for use with mobile device management software
Overview
The first step in using SAS Visual Analytics App for iOS with mobile device management software is to re-sign SAS Visual Analytics App for iOS with your own Apple signing certificate and Apple provisioning profile. Once successful, you can install SAS Visual Analytics App for iOS directly on a device by using drag and drop from the oneFinder window to another window that is connected to the mobile device.
This note explains one way to re-sign the app's .ipa (application archive) file. You need to download a ZIP file from the SAS Technical Support download location. Included in the downloadable ZIP file are three files that need to be edited with your specific information. Those files are as follows:
- sas-sdk-servers.json, which specifies the default servers and reports to automatically subscribe to.
- entitlements.plist. which contains specific information that is needed for making the app your own when re-signing.
- resign.sh, which contains the script that is executed to resign the app. There are four fields at the top of the script that must be edited.
Requirements
To re-sign the app’s .ipa file, the following are required:
- Apple Macintosh
- For this sample, a Mac Mini was used. The operating system was macOS Sierra version 10.12.3.
- Xcode
- Use the latest version since SAS Visual Analytics App is typically compiled in the latest version.
- Apple signing certificate
- Apple provisioning profile
- Apple Enterprise Developer account
Re-signing the App
Complete the following steps to re-sign the app:
- On your Macintosh, open the Finder app and create a folder. Then, unzip the Visual_Analytics_IOS.zip files to the new folder. In this example, the provisioning profile is named SAS_Enterprise_iOS_Applications.mobileprovision. (Note that your profile will be named something else.)
- Verify that your Apple signing certificate is installed in the Apple keychain. Right-click the certificate in the keychain and select Get Info. Make note of the Common Name field and enter that name into the Code_Sign_Identity field in the resign.sh file.
- Open your mobile provision file in a text editor. Locate the application-identifier and TeamIdentifier keys. Make note of the values for both keys. The application identifier can contain a wildcard (*) so that you can reuse the ID. These values are needed for editing the entitlements.plist file in the next step.
- From the Finder app, navigate to the Mobile202304 folder. Double-click entitlements.plist to open the file in Xcode. For application-identifier and keychain-access-groups, enter the value from the application identifier in step three. Because there is a wildcard, you can use any name for the wildcard value.
In this example, the wildcard value is MyMobileBI.
For com.apple.developer.team-identifier, enter the TeamIdentifier key from step three. Click the red icon to save and close the entitlements.plist file.
- Open a Terminal window on your Macintosh. Change the directory to the Mobile202304 folder.
- On https://developer.apple.com/account/resources/identifiers/list, locate and make note of your Bundle Identifier. Each app should have its own Bundle Identifier.
- Edit the resign.sh file and edit the Bundle Identifier field at the top to match your Bundle Identifier.
- Edit the resign.sh file and enter values for Mobile_Provision_File and Entitlements_File. Both of these files should be in the root location where the ZIP file was unzipped.
Note: You should now have all four fields at the top of resign.sh filled in.
- (Default) Modify the sas-sdk-server.json file to automatically connect to your server and subscribe to your reports. (Note: If you do not want to add any default servers or reports, you will need to comment out this step in the resign.sh file.) An example sas-sdk-server.json file is provided in the ZIP file. Before editing the sas-sdk-server.json file, determine the report links to add. For SAS® Visual Analytics 7.x, use the Share option to capture a link with the report path. Then, use a URL decoder to get the correct path. (See Figure 1)
Figure 1. Decoding the URL
- For SAS® Viya®, use the SAS® Environment Manager to get the path from the report URI property (see Figure 2).
Figure 2. Getting the report path from SAS Environment Manager
- Edit the sas-sdk-servers.json file. In the following example, the default server and report subscriptions are assigned to serverHostName and reportPaths. One server can be replaced. Default subscriptions can be replaced with reports that correspond to the server host.
- Save the changes to sas-sdk-servers.json.
- Open a terminal window. Change the directory to the resign.sh location. Then, execute the resign.sh script. A temp folder and resigned.ipa file should be created.
- Test installing the app.
- Connect your iPad to the Macintosh ► open the Finder app ► navigate to your iPad.
- Open a second Finder app and navigate to the .ipa file.
- Click and drag the re-signed .ipa file to the Finder window that is displayed your iPad. If successful, the .ipa file should begin installing on the iPad.
- Remove the SAS Visual Analytics App from your iPad.
- Launch the app from the iPad. When you launch the app for the first time, the distribution certificate is authenticated. Behind the scenes, a call is made to https:\\ppq.apple.com:443. If your iPad is not connected to Wi-Fi, or if you do not have access to https:\\ppq.apple.com:443, the following message might occur:
Untrusted Enterprise Developer.
If this message occurs, you must navigate to your settings and manually trust the certificate.
- If you can access the default SAS Visual Analytics App screen on your iPad, then the re-signing was a success. You can now proceed with wrapping the SAS Visual Analytics App with mobile device management software. Note: If you set up initial reports to be automatically subscribed to, then the login screen to connect to the server should be displayed.
Download Site
As mentioned in the overview, you can download the ZIP file containing the SAS Visual Analytics App .ipa file and the entitlements.plist file from the Downloads/SAS Visual Analytics Apps site. In order to access the page, you must be logged on with your SAS profile.
Disclaimer
SAS Technical Support provides and supports the ZIP file that contains the SAS Visual Analytics App .ipa file. SAS Technical Support does not provide support for the re-signing steps in this sample because Apple controls the process.
Operating System and Release Information
SAS System | SAS Mobile BI | Apple Mobile Operating System | 8.12 | | 9.4 TS1M4 | |
SAS System | SAS Visual Analytics Apps | Apple Mobile Operating System | | | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Date Modified: | 2023-08-18 09:09:18 |
Date Created: | 2017-03-22 10:23:05 |