Posts

Post not yet marked as solved
0 Replies
597 Views
How could I turn a stream of HID reports I have on stdout into a HID (that would eg appear to hidutil)?
Posted
by willwhite.
Last updated
.
Post not yet marked as solved
0 Replies
337 Views
I'm making a Safari App Extension and I want to store some user data with UserDefaults. Using the defaults command line utility, I've set up a com.willwhite.AppName-Extension domain with an underlying plist file with some test values.In my SafariExtensionHandler code, I have this line: let userDefaults = UserDefaults(suiteName: "com.willwhite.AppName-Extension")What I get as the value of userDefaults is, I believe, the standard defaults object (it's the same object as what I get when I pass nil as the suiteName). I'm expecting it to be the defaults that I've set up for my extension using the defaults command line utility. Please could you tell me what is going wrong?
Posted
by willwhite.
Last updated
.
Post not yet marked as solved
0 Replies
385 Views
I've seen a couple of answers for how to persist settings/preferences, but I want to persist larger amounts of data, data that the user will input as they're using my extension. I can't see a recommended approach to this in the Safari App Extension documentation. Before I go looking through the wider macOS development documentation, I'd like to know if there's an idiomatic way to store data for Safari App Extensions.The data is used in the injected script. Currently, I have hardcoded data into the script so that I can use the extension. I've thought about putting this data in a JSON file and including that in the extension's resources, but I can't access the file from the script. My next thought is to pass the data to and from the extension's Swift code, and get the Swift code to store it somehow. Failing that, I would try to pass the data to and from the containing app, and get that to store it.Any guidance would be appreciated.
Posted
by willwhite.
Last updated
.
Post not yet marked as solved
0 Replies
335 Views
I've tried changing the project, app and extension deployment target to 10.14, but no luck. The error reported by my user is along the lines of "This file cannot be opened" (they're trying to open the .app file that contains the extension). I'm expecting opening the file to open the containing app, and from there they can add the extension to Safari (I can do this on my machine). I have Xcode 11.4.1 and macOS 10.15 only (so I'm unable to test in 10.14 myself).
Posted
by willwhite.
Last updated
.
Post not yet marked as solved
7 Replies
1.6k Views
I'm sorry if this isn't in the right place in the forums.How could my macOS application expose an API for other macOS applications to use? I want other applications to be able to send data to my application, and my application will take care of storing that data. During development, I also want to be able to manually interact with my application via its API, eg by typing in commands.
Posted
by willwhite.
Last updated
.
Post not yet marked as solved
1 Replies
858 Views
Extensions Preferences is saying "Extension does not have permission to read, modify or transmit content from any webpages." but I've set SFSafariWebsiteAccess Level to All as per https://developer.apple.com/documentation/safariservices/safari_app_extensions/safari_app_extension_info_property_list_keys/adjusting_website_access_permissions. Any ideas about what might be wrong?
Posted
by willwhite.
Last updated
.
Post not yet marked as solved
1 Replies
1.3k Views
I've followed Creating a Content Blocker, and my content blocker runs but doesn't work (i.e. pages load in Safari), even if trigger url-filter is ".*" and action type is "block". There's "No Active Content Blockers" in Preferences, where I'd expect to see mine. Is there a common solution to this problem?Also, I had to set this post's "place/space" as Safari Extensions because there was no Content Blocker option.
Posted
by willwhite.
Last updated
.
Post not yet marked as solved
1 Replies
1.2k Views
My extension has a problem (state gets out of sync) each time I get the following message in the system console:Process: loginwindowMessage: -[PersistentAppsSupport applicationQuit:] | for app: <app name> Extension (Safari), _appTrackingState = 2I get this message when I leave Safari alone for a minute, or when my extension opens a new tab.Do you know what is causing this problem?My extension is unsigned.macOS 10.14.5Safari 12.1.1Xcode 10.2.1
Posted
by willwhite.
Last updated
.