weatherKit and macOS 12

I work on an open source Mac app that uses multiple weather sources. I've added weatherKit to replace Dark Sky.

I got past my signing issues (https://developer.apple.com/forums/thread/722378) but when I try to run on macOS 10.15 (I know weatherKit won't work) but it won't even launch.

The actual Swift code for weatherKit is wrapped with

if #available(macOS 13.0, *)

I don't expect the weatherKit code to work before 13 but I would like the same code to run by selecting another weather source.

The deployment target in Build Settings is set to macOS 10.15 along with the Minimum Deployment. Of course the app is signed for weatherKit.

Is there another setting I need to get the code to run (without weatherKit support) on older OS's or are multiple versions now going to be required.

Thanks.

Ed

Hello, could you specify if you are getting an error from the compiler?

Thank you!

So, the next step is for you to do some basic debugging of the behavior:

  1. Is this actually crashing, or does the system not attempt to launch the app?

  2. If it crashes, what does the crash log say about the error?

  3. If it doesn't crash, what are the relevant log messages?

You have to give us some information to work with here. 🙂

When I try to launch on 10.15, this is what I see in system.log:

Jan 20 06:53:59 edwardd20 com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x10000002.Meteorologist[6679]): removing service since it exited with consistent failure - OS_REASON_CODESIGNING | When validating /Applications/Meteorologist.app/Contents/MacOS/Meteorologist:

	  Code has restricted entitlements, but the validation of its code signature failed.

	Unsatisfied Entitlements: 

Jan 20 06:53:59 edwardd20 com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x10000002.Meteorologist[6679]): Binary is improperly signed.
weatherKit and macOS 12
 
 
Q