Launch App bundle from RAMDisk

I have a unique requirement where I wish to launch an App from a RAM disk.


The following command works successfully:

$ diskutil quiet erasevolume HFS+ TestDisk `hdiutil attach -nomount ram://2097152`
$ tar -c TestApp.app | tar -xC /Volumes/TestDisk/
$ cd /Volumes/TestDisk
$ open -a TestApp.app


However, if I launch the application from Finder, I get the following error:

You can’t open the application “TestApp” because it may be damaged or incomplete.


I can copy the App to a FAT32 memory stick and it will launch successfully from Finder.


TestApp.app is a bare Cocoa application created in Xcode signed by a Developer ID.


I cannot find any logs in Console as to what the so-called damage is or what is incomplete.


How can I turn logs on to capture this information?

However, if I launch the application from Finder, I get the following error:

Yeah, that’s weird. I tried this myself and saw exactly the same problem. It’s clear that Gatekeeper is grumpy about the app, but it’s not clear why. Notably both

codesign
and
spctl
give the app a clean bill of health.

You should definitely file a bug about this; please post your bug number, just for the record. If no one else offers any suggestions here on DevForums and you’d like someone in DTS to see if there’s a workaround for this, open a DTS tech support incident.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

WWDC runs Mon, 13 Jun through to Fri, 17 Jun. During that time all of DTS will be at the conference, helping folks out face-to-face. http://developer.apple.com/wwdc/

Bug number 26573700 registered.

Please note that I made one wrong statement in my original post.


The command open -a TestApp.app did not work as expected. The open command found a copy of the App on my hard disk and executed that App.


After removing all instances of this App from my hard disk:

$ ls -l
total 0
drwxr-xr-x  3 francoisjoubert  staff  102 May 31 17:14 TestApp.app
$ open -a TestApp.app
Unable to find application named 'TestApp.app'

The command open -a TestApp.app did not work as expected. The open command found a copy of the App on my hard disk and executed that App.

OK. But when I was testing this I used the Finder to navigate to the app on the disk image, double clicked it, and still got the weird Gatekeeper problem.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

WWDC runs Mon, 13 Jun through to Fri, 17 Jun. During that time all of DTS will be at the conference, helping folks out face-to-face. http://developer.apple.com/wwdc/

Launch App bundle from RAMDisk
 
 
Q