LaunchAgent (Mac) as peripheral doesn't show a pairing request.

The same code built in a regular Mac app (with UI) does get paired.

The characteristic properties are [.read, .write, .notify, .notifyEncryptionRequired] The characteristic permissions are [.readEncryptionRequired, .writeEncryptionRequired] My service is primary.

In the iOS app (central) I try to read the characteristic, but an error is reported: Error code: 5, Description: Authentication is insufficient.

What context is the agent running in? That is, what do you have set for LimitLoadToSessionType?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I don't set LimitLoadToSessionType. My launch agent is not a GUI app. I'm thinking that may be an issue.

I don't set LimitLoadToSessionType.

OK.

That’s actually good news, because it means that you’re at least running in the right session (the default is Aqua, that is, your agent runs in GUI login sessions).

My launch agent is not a GUI app.

Does it have a GUI app associated with it? If so, try setting the AssociatedBundleIdentifiers property in your launchd property list.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

LaunchAgent (Mac) as peripheral doesn't show a pairing request.
 
 
Q