Post

Replies

Boosts

Views

Activity

Keep getting exceededContextWindowSize with Foundation Models
I'm a bit new to the LLM stuff and with Foundation Models. My understanding is that there is a token limit of around 4K. I want to process the contents of files which may be quite large. I first tried going the Tool route but that didn't work out so I then tried manually chunking the text to keep things under the limit. It mostly works except that every now and then it'll exceed the limit. This happens even when the chunks are less than 100 characters. Instructions themselves are about 500 characters but still overall, well below 1000 characters per prompt, all told, which, in my limited understanding, should not result in 4K tokens being parsed. Any ideas on what is going on here?
2
0
256
3w
Finder Sync Extension turning sidebar icons into generic document icons
Not able to replicate this myself but have had a couple of users report this. I have a Finder Sync Extension. It does not, at least intentionally, change any sidebar icons. The hosting app mostly uses asset catalogs and the icon file it specifies in its info.plist is a icns file, not an iconset. Any idea what may be causing this? Seems odd to me that there isn't some explicit setting to enable this instead of requiring some set of configurations lining up.
9
0
638
Nov ’24
How do you get group/user info from file ACLs?
Documentation is sparse on this and it doesn't help that Apple's version differs from POSIX. I know to specify ACL_TYPE_EXTENDED for acl_get_file() and know how to cycle through entries. From what I can tell, the tag is either ALLOW or DENY and you can check the permset for which actions the tag applies to. I can't figure out how get the group or user the entry applies to. The only way I've been able to get this info is by using acl_to_text and scraping that output. Anyone know how to do this using the acl APIs?
5
0
415
Oct ’24
LoginItem not launching on Ventura
Older thread on this topic: https://developer.apple.com/forums/thread/133038 On Ventura, I'm getting the exit code 78 again. Using SMLoginItemEnabled set to false does not fix it nor removing it using launchctl. I've also had reports of this from users out in the field so it's not a dev machine issue. It isn't always consistent as some users have reported that the helper does launch but there are XPC issues later. It does feel as if something really broke in this subsystem. Console is not showing anything interesting though I can post an excerpt if you really want to see it.
0
0
807
Sep ’22
Problems with keychain sharing on Mac
Since the older ACL APIs are deprecated, I'm switching to using keychain sharing. I've seen this post: https://developer.apple.com/forums/thread/123824 My app has an embedded login item helper app as well as a commandline program. I need the main app and commandline program to share keychain items. My app is not sandboxed/MAS; it is Developer ID. I first tried setting up an app group. I created an app group on the dev portal, tied to the app IDs, and tied those to provisioning profiles. When the main app stores a keychain password (via SecItemAdd), it fails citing lack of entitlements. Note that I fetch the app group dynamically from the bundle's entitlements and setting the kSecUseDataProtectionKeychain flag in the query. If I switch to keychain groups, it works. Problem is that the commandline program crashes on launch. If I provide a separate entitlement file for the commandline program omitting the keychain group entry, it launches but fails to find the keychain item. Is there a way to get this all working? I'm seriously tempted to go back to the ACL code and suppress the deprecation warnings.
0
0
389
Aug ’22
Sending file parameters to a Shortcut on Monterey programmatically?
I'm trying to run Shortcuts programmatically on Monterey. My understanding is that the official API for this is via AppleScript to the Shortcuts Events process. I created a Shortcut that does Quicklook on the passed in file parameter. It works as a Finder action but I can't figure out how to get it to work when running it via AppleScript or Scripting Bridge. If I send a file, alias or POSIX file, I get a generic Shortcuts error 4. If I send a path as a string, it just does a preview of the string passed in, and not the contents of the file the path references. Anyone have any insight on how to get this working?
0
0
903
Sep ’21
Is stapling a notarization ticket to a DMG sufficient or do I need to staple to the app within as well?
I'm receiving conflicting info on this. My impression from the docs was that only the DMG would need to be stapled. In a DTS interaction concerning other issues with notarization, the DTS engineer pointed out that my app wasn't stapled and that I should staple that as well. Problem is that when I staple the app, I need to re-create the DMG package. After doing that, when trying to staple the DMG as well it fails with error 65. My guess is that it fails because the signature changed by stapling the app which leads to a bit of a catch-22 situation. Do I really need to staple the app contents and if so, what is the correct procedure for re-packaging and stapling the outer DMG?
5
0
1.2k
Jan ’21
NSWindowRestoration?
I've been playing with NSWindowRestoration. I have it set on my app's main window and it seems to be restoring (the methods are called). The problem is that the only thing it's restoring is the window's frame. It was my impression that views would also save/restore state, like NSSplitView and NSOutlineView. I know both of those classes have their own autosave mechanism but I thought those were superceded by NSWindowRestoration. If I need to implement encoding state for standard Appkit classses, it seems like I might as well go back to the old mechanisms and where I set autosavenames. Not seeing much of a point of using NSWindowRestoration. What am I missing here?
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
501
Sep ’20