With the Sequoia update, macOS now relies on the UUID of applications for various privacy and security controls, such as network access. This new feature of macOS could cause issues on the end-user side, such as having to often re-authorize the built 4D applications. To address this, starting from 4D 20 R9, each 4D application built for macOS now has its own application UUID. This change ensures better-tuned access controls. Let’s delve into the details.
macOS Sequoia and application UUIDs
With the introduction of the Sequoia version, macOS now bases some privacy and security settings on application UUIDs instead of their names. Then, if multiple applications share the same UUID, it can cause issues in system controls. This is particularly relevant for Local Network access, as explained in this technical note. The involved settings are located in the System Settings dialog, under the Local Network panel of the Privacy & Security item:
Unique Application UUIDs
Prior to 4D 20 R9, built 4D applications shared the same UUID as the 4D Volume Desktop or 4D Server application used as the source.
Now, when building an application, its UUID is automatically set using a combination of the source 4D application and your application identifier. This ensures that your application is considered unique on macOS systems and maintains the same UUID for your application as long as you use the same version of the 4D source application.
Of course, this new behavior is also applied to the Build4D component!
Good news, nothing you need to do, nothing needs to be changed in your build chain, all goes fully automatic. Usually you can stop reading here, but if you need, we provide full control of the UUID! This is explained in the following paragraph.
Updated Functions
To support this new feature, we’ve updated the File.getAppInfo() function to return the application UUID when applied to the application executable. Here’s a sample code snippet:
var $app:=File("/Applications/myApp.app/Contents/MacOS/myApp")
var $info:=$app.getAppInfo()
And here is a sample result:
{
"archs": [
{
"type": 16777223,
"name": "x86_64",
"uuid": "9C286FBFFAAA242FEBF462654C950ECF"
},
{
"type": 16777228,
"name": "arm64",
"uuid": "8D8AA28824AACC558AB3D287A43EC53A"
}
]
}
Additionally, the File.setAppInfo() function has been enhanced to allow you to define your own UUID if desired. Here’s how you can do it:
var $app:=File("/Applications/myApp.app/Contents/MacOS/myApp")
var $info:=$app.getAppInfo()
// regenerate uuids for all architectures
For each ($arch; $info.archs)
$arch.uuid:=Generate UUID
End for each
// update the app with the new uuids
$app.setAppInfo($info)
We hope this feature will enhance the user experience with your deployed applications, ensuring they are unique and better-integrated within macOS environments.
Happy coding!