-
-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NSAppDelegate endpoint required by Sonoma. #2182
Conversation
Hi Russell, I've tried to replicate the fault and the fix. But I was not able to replicate the fault. I'm on Sonama 14.0, with a MacBook Air M2. I've used python 3.11. When I run toga-demo after
For reference, here's the python packages installed at that time:
|
Thanks for that testing @go8ose - I guess there's something deeper going on here. |
@freakboy3742 Since I only saw one test here, I just replicated @go8ose's results; same behavior exactly. |
@glyph Can I ask you to try running a Briefcase test? In a clean venv:
If that generates the error, update the pyproject.toml that has been generated to replace the
and then run |
Hmm. The full output of
|
Hrm - ok - thanks; definitely looks like there's something else going on. I'll have to wait until the original reporter comes back online to see what else they're doing that could be the cause. |
Tested with python 3.10, 3.11, 3.12 from python.org and 3.11 from homebrew just for good measure. Same behavior on all of them. How strange! |
I get the warning about "Secure coding is not enabled" with toga 0.4.0, python3.12 from python.org, Sonoma 14.1 on a M2 Mac Studio. The briefcase 0.3.16 helloworld app ran with no warnings
toga-demo runs without the Secure warning with toga-0.3.2.dev1473+g7e489b01 toga-cocoa-0.3.2.dev1473+g7e489b01 toga-core-0.3.2.dev1473+g7e489b01
|
@glyph Can I ask you run the Briefcase test again - I'm wondering if the issue might be with a change that has been introduced to Toga since the release of 0.3.1. Now that we have released 0.4.0, Briefcase should use that version by default, which might make the problem manifest (maybe?). |
@selasley Thanks for that testing. Now we just need to work out why you're able to reproduce this, but nobody else can (including, apparently, the original reporter...) |
@freakboy3742 Re-ran the test. Same output (i.e.: nothing), sorry! |
I rebooted the Mac, created a new venv, pip installed toga and tog-demo 0.4.0. Running toga-demo now only displays the "Can't find" warnings
I tried the same steps on a UTM virtual Sonoma. This was the first time a toga app was run in the VM. Only the "Can't find" warnings appeared. I don't know what was different when running toga-demo displayed the "Secure config" warning |
Set up a python3.12 venv remotely on a M1 Mac with toga and toga-demo 0.4.0. The "Secure config" warning only appeared the first time toga-demo was run
|
Just a hunch here, but LaunchServices learns stuff about apps via the bundle id; does varying the bundle ID to make a "new" app each time reproduce it with any reliability? |
I've finally got access to a Sonoma test machine, and I can confirm this fixes the problem for me; so let's merge it! |
Reported by Casimir1965 on Discord.
When running under macOS Sonoma, Toga apps generate the following message:
This PR adds the suggested method.
Fixes #2188.
To test this: if you install the branch from this PR:
The warning should not be raised any more.
PR Checklist: