How to prevent people from trying to use newer builds of my apps on ancient OS X?

So we have decided to drop support for any OS X older than 10.7. We still have a few customers using 10.6, and we want to make sure that they can’t even try to install newer builds of our apps on their older OS.

For our main app, we use an installer package which can correctly detect and refuse to install on older OS version.

But for several smaller apps, it is just distributed as the .app bundle on a disk image. When they mount the disk image, of course the app icon shows with a giant slash thing through it, but they copy it into their applications directory (and overwrite the prior version) anyway, then freak out when it won’t launch.

We like using .dmg to distribute apps, but there does not appear to be a way to mark a .dmg as only usable on certain versions of OS X. Short of putting nasty huge warnings on the background image of the .dmg file, is there some better way?

I don’t know if there is a way with DMG, I know this is supported with Installer Packages.

I know that installers are not very popular but they do solve several issues when distributing updates.

Wait, really? People see a big old NO symbol and try to launch it anyway?

@Tim Parnell - yes, no matter how idiot proof you make something, the world will go make a better idiot.

Why won’t it launch on 10.6? Is this due to plist settings?

How about this: Could the app actually launch on 10.6 but immediately die with a better warning message?

DMGs are just containers. can’t prevent an O/S from opening it up based on version.

installer packages (.pkgs) you can.

Easy answer is to put you software on the MAS.

First time I have seen the words “MAS” and “Easy” used in the same sentence.

Ha ha ha!

hahahahahahahahahaaa … OMG …now we need a geek stand up comic to use that line :slight_smile:

Change the app name.
Copying won’t blitz the old one.

But I’m curious: what is there about the 10.7 build that means you can’t compile for 10.6?
I haven’t found any killer thing about Xojo 2014/2015 which demands I use that to compile, so Im compiling in 2013 and still keep the 10.6 customers (of which there are still quite a few)

[quote=177795:@Jeff Tullin]Change the app name.
Copying won’t blitz the old one.[/quote]
What a fantastically simple solution! o.O

change the name of the app like “myapp ONLY FOR 10.7+ OS X” instead of “myapp”
so it will not replace the old 10.6 app in the application folder if they move the icon
and if they know how to read they may understand ?

We used to change the name of the app, back when we were using FileMaker. (We distributed our software as a folder, containing all the useful gumpf that FileMaker wants.) We ended up with users having an Applications folder with e.g. Light Blue 3-1, Light Blue 3-2, Light Blue 3-3 in, and so on. So, whilst it didn’t overwrite the existing one, it meant that there were lots of different versions in there, and sometimes people ran an old version, and then all hell broke loose (because it looked like data had been lost - which, of course, it hadn’t). So, that’s a way of doing things which I wouldn’t advise.

We now have one app which always has the same name. We’ve had the same issue recently - we moved to using Xojo, so we don’t support 10.6. We don’t do any checks, but we did lots and lots of announcements about it - including emailing all customers on 10.6 twice. We’ve had a few (but not many) email us back saying ‘aargh’, and we’ve prioritised their support requests. I do wish that we could’ve had a way of displaying a dialog box ('This version doesn’t work on 10.6; download the previous installer from ') but it’s not possible.

Sorry for not providing a definitive way of doing things; thought it might be useful to chip in with our experiences.

you can when you launch the new app, if it works on the system, delete all the previous apps automaticaly ?
so no more problem of many old versions in the app folder .

Yes, I suppose that would be one way of doing it. I’m always a bit nervous about programmatically changing the Applications folder. And back when we were using FileMaker we were also storing our data with the application (really bad idea, I know, but it’s how FileMaker works) so I wouldn’t have wanted to delete that!

yes I’m not sure if gatekeeper allows you to delete things in the application folder…

[quote=177777:@scott boss]DMGs are just containers. can’t prevent an O/S from opening it up based on version.

installer packages (.pkgs) you can.[/quote]

Apart from an installer, a “container” app seems possible.

This app would launch, verify the system version. If it is not supported, it displays a message to that effect, recommands the proper version if available and where to get it, then dies. If the system is supported, the app creates a folder structure containing the app to install and the familiar Applications folder alias in Temp, and opens it for the user.

Thanks for all the feedback, everyone - we really don’t have many users on 10.6-, but we do have a few. We’ve decided to just rip off the band-aid and provide our updates on a .DMG as usual. If the user is dumb enough to copy the new app to applications and overwrite the old one in spite of the slash through it in the finder, then so be it. They’ll call us, we’ll tell them to either upgrade their OS or downgrade the app. Downgrade is a very simple process, and given the small number of users we have that will run into this problem, that’s how we’ve elected to handle things.

Too many other bigger fish to fry to bother with building an elaborate workaround for users not paying attention.

maybe an installer with AppleScript ?

set ok to (display dialog "This will install 'myApp' to 'Applications'" buttons {"Cancel", "OK"})
if ok = {button returned:"OK"} then
	set v to do shell script "sw_vers -productVersion"
	set vnumber to (first item of v & second item of v & fourth item of v & fifth item of v)
	if vnumber begins with "1010" then
		-- Yosemite
		do shell script "cp -rf /Volumes/myDMG/myApp.app /Applications"
	else if vnumber begins with "109" then
		-- Mavericks
		do shell script "cp -rf /Volumes/myDMG/myApp.app /Applications"
	else if vnumber begins with "108" then
		-- Mountain Lion
		do shell script "cp -rf /Volumes/myDMG/myApp.app /Applications"
	else if vnumber begins with "107" then
		-- Lion
		do shell script "cp -rf /Volumes/myDMG/myApp.app /Applications"
	else if vnumber begins with "106" then
		display dialog "not supported in Snow Leopard" & return & ¬
			"please download the Version for OS X 10.6" & return & "www.mywebsite.com/snowapp.dmg"
	else
		display dialog "not supported in this OS X Version"
	end if
else
	display dialog "Canceled by User"
	tell me to quit
end if