Sharing standalone apps

29 views
Skip to first unread message

Jerzy Dydak

unread,
Jul 19, 2024, 12:15:27 PM7/19/24
to SuperCard Discussion
I want to share my apps with my students and I searched how to do that but it is all cryptic. I tried to put them on DropBox but they do not work when downloaded. Does anyone have a good advice/link on how to accomplish sharing apps? My semester starts in a month and I want to get ready.
Thanks,
Jerzy

MARK LUCAS

unread,
Jul 19, 2024, 2:09:51 PM7/19/24
to 'MARK LUCAS' via SuperCard Discussion
Provided your student has a Mac that can still actually run SuperCard (and which is configured to allow launching apps obtained outside the app store), its failure to launch is likely due to GateKeeper (part of Apple's efforts to harden the macOS against malware).

Based on my recent experience trying to send out dev builds here, there are some workarounds.

The first (and simplest for you but also ugliest) is for the receiver of the file to use the xattr command-line tool to strip off the 'poison pill' attribute that downloading attached to the app (as outlined in the related thread). Once this is removed, they should be able to launch the app by right-clicking on it and selecting Open from the Finder popup menu, then clicking through the warning dialog that's presented.

To avoid that nastiness nowadays your app has to be codesigned, and for that you need an Apple Developer Account (see developer.apple.com). AFAIK the basic account is still free, but to obtain a distribution certificate (required to codesign) IIRC you need to sign up for the paid part. At the moment I believe that costs $99/yr for individuals, and requires an Apple ID with 2FA enabled.

An organization can also sign up, and for accredited educational institutions that's supposed to be free (though of course there are hoops to jump through), so yours might already be enrolled (in which case they just need to add you as a team member so you can get in and download stuff like distribution certificates for the account).

Alas actually generating and downloading developer certs on Apple's developer site has historically been (and AFAIK continues to be) a truly godawful clusterfuck (mainly because the terse documentation for the process is wretched, and typically either useless, misleading, or completely wrong). Much like many Unix man pages, it only makes any sense if you already know what it means! But at least you only need to do it once, so just try not to break anything while you're jumping up and down and screaming at the screen... ;-)

Once you have a certificate you install it on your Mac through Keychain Access (just double-click the unzipped cert file in the Finder), and then you're ready to start codesigning things. Normally you either do that by letting Xcode automatically codesign apps you build with it, or via the codesign command-line tool.

I wrote a little SuperCard project for Scott that (once you've entered your certificate ID) should let you codesign files just by dropping them into its main window from the Finder, which I can send you if you like.

There's still a few gotchas to look out for:

- If you open the app bundle manually in the Finder this adds an attribute to it which will block codesigning, and you'll have to run xattr -cr to strip it out.

- If you modify the contents of the bundle after signing it, that will usually invalidate its signature. Thus for SuperCard standalones you plan to distribute to others, you might want to consider choosing the 'Copy Main On Launch' build option (which copies the standalone's SuperCard project to a temp folder on launch, and then runs the copy instead of the original). This prevents the standalone from being self-modifying (which in turn can help keep it from running afoul of GateKeeper, but also means runtime changes aren't persistent). That way you shouldn't need to re-sign the app every time you run it before you can distribute it again (in case that matters for your use case).

- If you don't distribute your app in a codesigned .DMG file (i.e., you just zip it up or whatever) then even if it's codesigned GateKeeper will still attach a 'quarantine' attribute to it, which scrambles all the file paths it receives to keep it from doing much damage if it's actual malware. Normally the end user has to manually drag the quarantined app into /Applications to strip this off, but SuperCard (and IIRC an SC standalone) should automatically detect when they're launched quarantined, and present the user with instructions on how to jailbreak it (either by entering an admin password, or moving it in the Finder) in a big (and apparently scary-looking! ;-) dialog.

- Long ago I wrote some other tools to help Scott with putting together the .DMG SuperCard distros, but I apparently didn't save a copy here and don't remember squat right now about what they did. Unfortunately I also still haven't been able to contact anyone who might be able to get me access to his computer. So for now you'll just have to read the docs and do it by hand if you want to avail yourself of this preferred distribution model.

Does that help any?

-Mark

--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supercard-talk/edd836d3-2fe7-4556-826d-aea97e4a349cn%40googlegroups.com.

Jerzy Dydak

unread,
Jul 19, 2024, 9:42:03 PM7/19/24
to superca...@googlegroups.com

Mark,

Thank you very much for your detailed response!! I will try to digest it slowly. My Plan B is to buy 10 USB drives, format them in exFAT and allow students to download apps to their laptops in class. That way I can get their reaction, improve apps and once they are useful in my classes I will try to distribute them via the internet. 10 USB drives per 35 students should be sufficient to distribute apps in 10 minutes, I think.

Thank you once again,

Jerzy





--
Jerzy Dydak

Bill Bowling

unread,
Jul 19, 2024, 11:46:55 PM7/19/24
to superca...@googlegroups.com
Is FTP still a thing.

Bill
Sent from my iPad

<^)))><·.¸¸·´¯'·.¸¸.·´¯'·.¸


On Jul 19, 2024, at 18:42, Jerzy Dydak <jdy...@gmail.com> wrote:



MARK LUCAS

unread,
Jul 20, 2024, 1:23:42 AM7/20/24
to 'MARK LUCAS' via SuperCard Discussion
Last I tried it in Mojave IIRC (unlike downloading) copying apps from removable drives didn’t quarantine them (nor for that matter did most popular BitTorrent clients), but you should definitely verify this works before you commit to it as a delivery strategy.

It’s probably worth mentioning for posterity that’s it’s also possible to simply disable GateKeeper entirely on a Mac if that works for you, in which case behavior should gracefully degrade to what we probably all fondly recall from The Good Old Days (i.e., making ‘Anywhere’ once again an option for ‘Allow applications downloaded from’ in Privacy & Security, and selecting it):

spctl --global-disable
spctl --master-disable

and to subsequently re-enable it:

spctl --global-enable
spctl --master-enable

Obviously Apple does not recommend doing this, but they’ve left the door open in case grown-ups want to anyway.

HTH,
-Mark
Reply all
Reply to author
Forward
0 new messages