Snack's 1967
HomeBlogAbout Me

Macos Mojave Vs Catalina



42 Astoundingly Useful Scripts and Automations for the Macintosh

2019 August 23/6:00 AM

Apple has introduced a security mechanism with macOS 10.14 (Mojave), which requires special access to be granted to remote control applications like TeamViewer. And macOS 10.15 (Catalina) has strengthened the security and privacy even further and requires additional permissions to be given to TeamViewer in order to control your Mac. With macOS Catalina just around the corner, take a moment to consider whether you should make the leap right away or wait a few days (or even weeks) to update your Mac. Is my Mac compatible? If you have the following model of Mac, you can download and install macOS Catalina: MacBook (Early 2015 or newer) MacBook Air (Mid 2012 or newer). Hard to get a complete side by side comparison when there is so much more Mojave can do than Catalina since it can run 32-bit apps. 32-bit apps run faster on the x86-64 architecture all Macs currently use (provided they don't need to address more. So, unless Mojave has some serious performance bug for your hardware (e.g. Driver issue), otherwise, Catalina shouldn't bring any noticeable performance improvement to your Mac. However, it is possible to have snappier experience even no measurable performance gain. The newer OS can have better coding for finder, or handling the OS UI, etc. If you’re running macOS Mojave or High Sierra, you may have seen a pop-up box like this appear recently: Apple On the newer macOS Catalina, you’ll see a similar pop-up box stating your app.

Work faster and more reliably. Add actions to the services menu and the menu bar, create drag-and-drop apps to make your Macintosh play music, roll dice, and talk. Create ASCII art from photos. There’s a script for that in 42 Astounding Scripts for the Macintosh. Motioncomposer 1 6 – create animated and interactive web content.

  • Amazon

As the author of a book filled with scripts for the Macintosh, I was worried about the differences between scripting for Mojave and scripting for Catalina. When testing the Catalina update of the book, it turned out there wasn’t much difference. For the most part, what worked in Mojave worked in Catalina.

The most obvious changes, of course, were those having to do with iTunes. Catalina broke the iTunes app into several apps. The new app for music is called Music. This means that AppleScript scripts need to change from:

  • tell application 'iTunes'

to

The application id has also changed, from “com.apple.iTunes” to “com.apple.Music”.

The application id is useful if, for example, you want to do some stuff if the Music app is running, but skip out if the Music app is not running. The normal means of talking to an application in AppleScript will start the application up, which means it can’t be used to check whether the application is running: it always will be, after using “tell” on it. The application id can check the status of the app without opening the app:

[toggle code]

  • property iTunes : 'com.apple.Music'
  • if application id iTunes is running then
    • display dialog 'Music is running'
  • end if

The other new iTunes successor apps—Podcasts and TV—don’t seem to be scriptable via AppleScript.

NSSound.currentTime

Within other scripting languages, there’ve been more interesting, if obscure, changes. In 42 Astounding Scripts I have a Swift script for playing alert sounds.

[toggle code]

  • //wait until the sound is done before going on
  • while sound.currentTime < sound.duration {
    • usleep(100000)
  • }

Waiting is necessary because if the script exits before the sound is finished, the sound will stop. The obvious method of checking if the sound is still playing—NSSound.isPlaying—doesn’t work for alert sounds as it does for audio files. It remains true until calling NSSound.stop(), which makes it useless for deciding when to call NSSound.stop().

But in Catalina, the currentTime property no longer counts up to the duration property and stays there. It counts up to the duration property and then drops to zero, which means that unless you’re very lucky and hit the top of the while loop exactly when the two properties are equal, that loop will never end.

The problem was compounded by the fact that the currentTime property is not immediately updated after starting the sound. When I changed the while condition to NSSound.currentTime > 0 the loop never executed. The first time through, currentTimewas zero.

This necessitated using one of my favorite constructs, but one that is, sadly, almost never necessary: a loop with its condition at the end.

[toggle code]

  • //wait until the sound is done before going on
  • repeat {
    • usleep(100000)
  • } while sound.currentTime > 0

The contents of the loop are executed, and only after the first execution is the condition checked.

This loop form is so rarely needed that some scripting languages don’t even include it. Python doesn’t have one.1 AppleScript doesn’t have one.

But Swift does, and this is the perfect time to use it. It ensures that the sleep is executed at least once before checking whether currentTime has dropped back to zero.

osascript and Contacts

More serious was that in a JavaScript osascript that calls the Contacts app, the data started coming back with strange characters around some field titles:

  • $ contacts wayne
  • full name: Bruce Wayne
  • birthday: 2/19/1982
  • _$!<Home>!$_ address: 1007 Mountain Drive, Gotham, NJ, 12345, USA
  • _$!<Work>!$_ address: 380 S. San Rafael Ave, Pasadena, CA, 91105, USA
  • _$!<Mobile>!$_ phone: 735-185-7301

As far as I can tell, _$!<LABEL>!$_ is the actual text returned by Contacts.2 I fixed it by creating a getLabel function that removes those characters if they appear.

and

How To Upgrade To Catalina

  • var addressLabel = address.label() + ' address'

become:

  • var labelText = getLabel(record) + ' ' + fieldName;

and

The function is:

[toggle code]

  • //remove extraneous text from labels
  • function getLabel(field) {
    • var label = field.label()
    • if (label.substring(0,4) '_$!<') {
      • label = label.substring(4, label.length-4)
    • }
    • return label
  • }

This is obviously not satisfactory, but it does the job for now.

zsh

Catalina changes the default shell for Terminal. It uses zsh instead of bash. The two shells are similar. I was able to alter most of my bash scripts simply by changing the shebang from bash to zsh.

The main difference is in using history and tab completion. I added case insensitive tab completion while writing 42 Astounding Scripts thinking it would be helpful. But the benefits have been minimal, and in fact it’s annoyed me more often than it’s been useful. Since making zsh case insensitive is more complicated than making bash case insensitive, I’ve removed that from the book.

If you want case insensitive tab completion and you want to use zsh, you can do a web search on zsh case insensitive. If you don’t particularly need zsh, you can switch to bash, where you can add bind 'set completion-ignore-case on” to your .bash_profile.

You can change your default shell (the one that you use when you open a new Terminal window) using:

or

  • chsh -s /bin/bash

The first switches your account to use zsh in Terminal (the default for Catalina or later) and the second switches to bash (the default for Mojave or earlier). Your default doesn’t change if you upgrade. So if you’ve been using Mojave you’ll still have bash as your shell in Catalina, unless you change it yourself.

As I wrote in the book, I don’t really care which shell I use, so I switched to zsh. I did this mainly because that’s the shell that new readers of 42 Astounding Scripts will have. If you’ve been using the Terminal since before Catalina and you’re happy with bash I don’t see any reason to change.

The main difference is that the default prompt ends in % rather than in $.

If you want to get rid of duplicates in your shell’s history, zsh uses setopt instead of export. If you want to combine your histories from multiple open Terminal windows, zsh uses setopt instead of shopt.

becomes:

  • setopt HIST_IGNORE_ALL_DUPS
  • setopt APPEND_HISTORY
Macos Mojave Vs Catalina

Perhaps most annoyingly, where in bash you typed “history” to get all previous commands, in zsh you must type “history 1” or you’ll get only the most recent commands. I grep ancient history far more often than I look at recent history.

cron and launchd

The deprecation of cron continues; while I recommend that you use a launchd app such as Lingon X instead of cron, it is advice I don’t take myself. Adding a script to cron remains much easier than adding it to launchd.

In Catalina, cron needs permission to run programs. The easiest way to do this is to give cron “Full Disk Access” in your Security & Privacy System Preferences.

  1. In the Terminal, type open /usr/sbin to open the folder that contains cron.
  2. Under the Apple Menu, open System Preferences and go into Security & Privacy.
  3. In the Privacy tab, look in the list on the left for Full Disk Access and choose it.
  4. Click the “+” button and drag cron from the /usr/sbin folder into the File Chooser.
  5. Click the Open button.

Cron will now be listed in the files with full disk access, with a checkmark next to it.

This is not something I particularly recommend. But if you’re using cron and don’t want to start using launchd, it appears to be necessary.

If you decide to use launchd, you’ll probably want to avoid calling scripts directly. That requires giving the scripting language—Perl, for example—full disk access. Instead, make an AppleScript or Automator app. The first time the app runs, it will ask for permission to access your disk. So set it to run in the next minute, give it permission, and then change it to run when you really want it to run.

iCalBuddy

The indispensable iCalBuddy doesn’t work in Catalina. But there’s an update by David Kaluta that does.

  1. Python would have trouble implementing conditional-at-the-end loops due to the format of Python blocks. They can’t have conditions at the end of a block because blocks are defined by indentation following a block start. But if the need was serious, they would have found a way.

  2. With LABEL replaced by the label name, of course. https://herezfil162.weebly.com/ivona-voices-2-crack.html.

42 Astounding Scripts, Catalina edition
I’ve updated 42 Astounding Scripts for Catalina, and added “one more thing”.
42 Astoundingly Useful Scripts and Automations for the Macintosh
MacOS uses Perl, Python, AppleScript, and Automator and you can write scripts in all of these. Build a talking alarm. Roll dice. Preflight your social media comments. Play music and create ASCII art. Get your retro on and bring your Macintosh into the world of tomorrow with 42 Astoundingly Useful Scripts and Automations for the Macintosh!
iCal for Catalina: David Kaluta
“Command-line utility for printing events and tasks from the macOS calendar database. (NOW 64-BIT!)”
Lingon: Peter Borg
“An easy to use yet powerful app to run things automatically.”

More Astounding Scripts updates

Catalina: iTunes Library XML
What does Catalina mean for 42 Astounding Scripts?
Random colors in your ASCII art
One of the great things about writing your own scripts is that when you need new functionality, you can add it. I needed random colors in a single-character ASCII art image. It was easy to add to the asciiArt script. Here’s how.
Avoiding lockFocus when drawing images in Swift on macOS
Apple’s recommendation is to avoid lockFocus if you’re not creating images directly for the screen. Here are some examples from my own Swift scripts. You can use this to draw text into an image, and to resize images.
42 Astounding Scripts, Catalina edition
I’ve updated 42 Astounding Scripts for Catalina, and added “one more thing”.

More iTunes

Catalina: iTunes Library XML
What does Catalina mean for 42 Astounding Scripts?
A present for Palm
Palm needs a little help understanding XML.
Getting the selected playlist in iTunes
It took a while to figure out how to get iTunes’s selected playlist as opposed to the current playlist in AppleScript.
Cleaning iTunes track information
Python and appscript make it easy to modify iTunes track information in batches—if you’re willing to get your hands dirty on the Mac OS X command line.
Play this song backwards in iTunes
Using AppleScript and Quicktime, you can play any song backwards. Find out what Fred Schneider was saying on “Detour Thru Your Mind”.
Five more pages with the topic iTunes, and other related pages

More JavaScript

Why I still use RSS
I still use RSS because connections regularly fail, especially to Twitter.
Converting HTML lists to text on the fly
Switching to using lists to display code was a compromise between readability and copyability. Now that I’m creating the lists on the fly, it is easy to add features that reduce the side effects of this compromise.
JavaScript for Beginners revised
I’ve completely revised my JavaScript for Beginners tutorials to be more in tune with modern JavaScript, and to provide more useful examples in general.
JavaScript for Beginners update
The JavaScript tutorial has been updated by introducing loops earlier, and in the first section.
Webmaster in a Nutshell
Without doubt the best reference work for webmasters that you’ll find. It contains the “reference” part of most of O’Reilly’s web-relevant nutshell books. You can find references for HTML 3.2, the CGI standard, JavaScript, Cascading Style Sheets, PHP, the HTTP 1.1 protocol, and configuration statements and server-side includes for the Apache/NCSA webservers.
One more page with the topic JavaScript, and other related pages

More macOS

Adding parenthetical asides to photograph titles on macOS
Use Applescript to append a parenthetical to the titles of all selected photographs in Photos on macOS.

More Swift

Avoiding lockFocus when drawing images in Swift on macOS
Apple’s recommendation is to avoid lockFocus if you’re not creating images directly for the screen. Here are some examples from my own Swift scripts. You can use this to draw text into an image, and to resize images.
Text to image filter for Smashwords conversions
Smashwords has very strange requirements for ebooks. This script is what I use to convert books to .doc format for Smashwords, including converting tables to images.
Apple goes to the Swift
The most exciting part of the WWDC keynote last Monday wasn‘t the new operating systems for the Macintosh and iDevices. It was the announcement of the new Swift programming language for MacOS and iOS. A new programming language is my equivalent of “one more thing…”

It’s been a year full of change for Mac users. Last fall, Apple released macOS X.15, better known as Catalina. Just a few short months later, they’re announcing an even bigger release.

Big Sur is the first version of macOS 11. This is the first overhaul macOS has had since OS X came out back in 2001. It’s likely to arrive in fall 2020, although there’s no firm date yet.

This leaves Mac users with a dilemma. Should you continue using Catalina, or is it time to upgrade to Big Sur? This guide will help you compare the two operating systems and make the right choice for you.

Catalina Introduced Big Changes

While Catalina builds on the familiar macOS X, it introduced some fairly big changes. One of the biggest was that it eliminates support for 32-bit programs. Mojave had introduced support for 64-bit programs but still run 32-bit apps.

This may mean that older versions of your favorite apps no longer work. Some programs have been discontinued altogether.

Catalina also introduced more functionality between iOS and macOS and devices. Sidecar, for example, lets Mac users add an iPad as a second screen for their Mac.

Other features included an automatic dark mode feature.

Big Sur is an Even Bigger Overhaul

Catalina retains most of the familiar features of macOS X. Over the years, the interface has become somewhat dated and a little bit cluttered.

Take, for example, the icons on the Dock. Catalina’s icons come in many shapes and sizes. Big Sur promises more uniformity on the Dock. It also redesigns app windows to put user content front and center.

Anyone who uses iOS, though, isn’t going to notice these differences as much. In fact, many of Big Sur’s design features bring it more in line with iOS design.

Under the hood, Big Sur also continues the “iPadification” of Macs. Catalyst allows iOS apps to be translated to macOS natively. That means with Big Sur, you’ll be able to run iOS apps on your Mac with no problems.

One of the reasons for this is Apple switching up hardware. The computer giant announced they were switching to their own ARM chips, leading to better integration between hardware and software.

Redesigning Software for Big Sur

Aside from getting iOS apps on the Mac, Big Sur also imports Widgets from iOS 14. This comes complete with a new Control Center and notification center.

Messages will also receive more of its iOS functionality. You’ll be able to pin conversations. An upgraded search function will make it easier to find messages.

Messages also comes with more customization now as well. Message effects and Memojis will be more personal than ever.

Another app that’s hopping on the trend of increased customization is Safari. With the new extensions available in the App Store, users will be able to customize their browsing experience more than ever. The homepage is also customizable.

Safari is also getting some cool new features. It will load your favorite websites faster than ever. Tabs are also being redesigned.

Translating pages will also be a breeze in the upgraded Safari.

Macos Mojave Vs Catalina Reddit

Another app getting a much-needed upgrade is Maps. Maps will enhance its functionality by including electric vehicle routes and 360-degree views. It will also have indoor maps of major airports and shopping centers, meaning you’ll be able to find your way around with ease.

Finally, the App Store will be getting an upgrade that allows for more transparency. Users will be able to check the privacy information of any app before they download it.

Big Sur vs Catalina

So, now you’re wondering which operating system you should be running. Big Sur is new and exciting, but it’s also promising big changes for many users.

There are a few reasons to consider getting onboard with macOS Big Sur sooner rather than later. The first is the upgraded privacy settings. Apple has been doing more work to keep users protected.

For anyone who has security concerns, Big Sur seems like a pretty good investment.

The other reason to upgrade to Big Sur is the increased compatibility between iOS and macOS. If you use an iPhone or an iPad, Big Sur is likely going to feel very familiar.

You’ll be able to get all your favorite apps. The design also feels much more like iOS, so chances are you’ll adapt in short order.

Some Changes Aren’t Exclusive to Big Sur

That said, there are a few reasons users may not want to upgrade to Big Sur just yet. One reason is that some changes aren’t going to be exclusive to Big Sur.

Changes coming to Safari, for example, will also be available in macOS Catalina and Mojave.

Another reason you may not want to go all in with Big Sur yet is that it is still in beta testing. While reports suggest the bugs in it are par for the course, it may make sense to wait for a few versions yet.

Think about how buggy Catalina was when it first rolled out in October 2019. Apple’s team has been busy releasing updates that resolve many of the issues.

This is common with OS updates, so it’s never a bad idea to wait. That way, you know you’re getting a more stable version.

What about Compatibility?

Finally, you might wonder if your machine is even going to be compatible with macOS 11. The answer is that if you can run Catalina, you’ll probably be able to run Big Sur too.

The mac OS Catalina requirements include 4GB of memory. Machines that are newer than 2012 can mostly upgrade to Catalina. MacBooks need to be newer than 2015.

Big Sur will be compatible with most machines newer than 2013. MacBooks need to be 2015 or newer.

Upgrade When the Time is Right

So, what’s the verdict on Big Sur vs Catalina? Upgrading to Big Sur seems like a safe bet for most users. Still, you might want to stick with Catalina for a bit longer yet, especially as Big Sur moves through beta testing and into its first releases.

Want to be the first to know when Big Sur arrives? Check in with us and stay up to date on all the latest happenings in the tech world! Ipulse 3 0 55.

Have any thoughts on this? Let us know down below in the comments or carry the discussion over to our Twitter or Facebook.

Macos mojave vs catalina

Editors’ Recommendations:





Macos Mojave Vs Catalina
Back to posts
This post has no comments - be the first one!

UNDER MAINTENANCE