Post

Replies

Boosts

Views

Activity

Reply to SFSafariApplication::dispatchMessage() in xcode 16
@Frameworks Engineer Well, I don't understand it. Here: https://developer.apple.com/documentation/safariservices/messaging-between-the-app-and-javascript-in-a-safari-web-extension it clearly says that that the native part should communicate to the javascript by dispatchMessage(). Or am I misunderstanding it? It worked in xcode 15.4. I can't respond immediatelly to incoming message from javascript, because there is some processing to be done in the native part, and it can take some time. For clarification, I am trying to communicate between javascript and swift part which are both in "Shared (Extension)" directory, and are part of "... Extension" target.
Sep ’24
Reply to SFSafariApplication::dispatchMessage() in xcode 16
The idea is: Javascript part of extension gathers urls from visited page, and sends them to native part The native part processes urls in the background (potentially longer running process) When url is processed, the native part of extension gives result back to javascript to show them. This is the place where I use dispatchMessage() Both javascript and the native handling is in "Shared (Extension)" folder, if it plays some role. According to this: https://developer.apple.com/documentation/safariservices/messaging-between-the-app-and-javascript-in-a-safari-web-extension , dispatchMessage is the way to use ... and it worked in xcode 15.4
Sep ’24
Reply to Mac Catalyst scene auto recreation
Thanks. Does it mean that if I create a new scene by myself through requestSceneSessionActivation(), I will never be able to open window on the position I want, no matter what I do? The only way is to first let window show at default location, and then acquire NSWindow and move it by appkit means? SIze restrictions work for size, I appreciate that, but position is also important for me.
Oct ’21