From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mac LV standalone APP & OSX Gateway 'quarantine'

Solved!
Go to solution

Hello all,

I noticed something interesting* in creating a LV2017 standalone app. The app will work locally but not when sent to other macbooks that have the LV2017 RTE. This is even true when I email the app back to MYSELF. I have replicated the problem in a minimum size LV project to share with you fine people, see attached project. 

 

My goal is to confirm that this is happening because of Mac OSX app gateways, and if so to find a solution.

 

On the local copy of the app, Path tools like 'Application Directory' and file IO tools like 'Open Config file' work properly. But when the App is zipped and moved between computers (or emailed to myself) it goes haywire. See attached:

Screen Shot 2017-07-08 at 1.50.10 PM.png

 

 

I am now fairly sure that this has to do with MacOSX gateways as is being discussed here (https://github.com/potionfactory/LetsMove/issues/56) meaning that I am currently trying to make a xcode wrapper for my LV app.

 

Have you experienced this before? do you disagree with the assessment that this is caused by app gateways? have you been able to solve this yourself? just want to gripe? please do so below.

 

*interesting as defined as a noticeable increase in hair-loss

________/~~~~~~~~*********~~~~~~~~\________
Certified delinquent LabVIEW developer. Recertifying at next NI Days
0 Kudos
Message 1 of 6
(3,646 Views)

Hey szewczak,

 

Thanks for posting this! I'm going to work on reproducing this issue. Perhaps this issue will lead to a Corrective Action Request for R&D. Thanks for attaching the files too!

 

Steven A

Applications Engineering

National Instruments

0 Kudos
Message 2 of 6
(3,543 Views)
Checking in on this, were you able to replicate the issue?
________/~~~~~~~~*********~~~~~~~~\________
Certified delinquent LabVIEW developer. Recertifying at next NI Days
0 Kudos
Message 3 of 6
(3,525 Views)

I unfortunately have not had a chance to replicate the issue. I will update you once I have had a chance to

0 Kudos
Message 4 of 6
(3,507 Views)

duplicate of .app zip on private FTP to compare the results.

________/~~~~~~~~*********~~~~~~~~\________
Certified delinquent LabVIEW developer. Recertifying at next NI Days
0 Kudos
Message 5 of 6
(3,418 Views)
Solution
Accepted by topic author szewczak

Posting Solution for posterity.

The Problem:

The problem with moving LV standalone Apps from one Mac to another in the OSX Sierra and onward era is App Translocation, also called App Gateway management. See articles bellow for more detail but basically an app that was not placed on a Mac by an authorized method is treated as malware, and only launched from a temporary folder with limited permissions.

 

LapCatSoftware Article:

Key Quote: "Starting in OS X v10.12, you can no longer provide external code or data alongside your code-signed app in a zip archive or unsigned disk image. An app distributed outside the Mac App Store runs from a randomized path when it is launched and so cannot access such external resources."

Rogueamoeba Blog Post:

Key Quote: "The problem with Gatekeeper Path Randomization is that copying applications to a read-only disk image will break functionality in many, if not most, existing applications."

Any app launched from this location will not be able to read or write files, and any code relying on the relative location of the app to a file will most likely crash. I have not tested this but what I read says network access is also curtailed.

A Solution:

A .pkg file produced from the stand alone App directory can circumvent this issue, and be distrusted easily over network or via USB. This is the same method NI uses to create an installer for the Mac RTE. Additionally these .pkg files can be signed if you want to identify the providence of your installer. The simplest solution is to use the terminal Command 'pkgbuild'

su pkgbuild --install-location /Applications --component /Volumes/Debug\ test/debug ./Desktop/pkgtest/ debug.pkg

Here are two excellent blog posts on the terminal process from Enrico Maria Crisostomo and Adam at Grivet tools But if you are looking for a GUI option I'd recommend Packages, It can produce pkgs and distributions of pkg files and supporting files. Attached is a .pkg made with packages of the app I first posted above.

________/~~~~~~~~*********~~~~~~~~\________
Certified delinquent LabVIEW developer. Recertifying at next NI Days
Message 6 of 6
(3,392 Views)