I have recently added a SetFocusFilterIntent target extension to my app which is a system utility which goes into the menu bar(Application is agent = YES). I have followed the approach in the WWDC22 video introducing Focus Intent and I have created an App Groups to being able to make the Extension to communicate with my main app, however from when I did this sometimes when I run the app I do get this log line:
Couldn't read values in CFPrefsPlistSource<0x97cd34700> (Domain: group.xxx.xxx.MyApp, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd
Despite this the Focus mode integration is working correctly on my development Mac. However I used to Archive the app and then Copy the app to my MacBook but when I do that now my other Mac cannot open the app and it is giving me an error. If I revert this change then I can bring the app back to my other Mac as usual following the procedure: Product -> Archive.
Then from the archiver: Distribute App -> Copy App. After that I copy the app generated to the App folder of my other MacBook but it doesn't open anymore.
During the archival phase now I am even getting this warning:
MyAppFocus.appex is an ExtensionKit extension and must be embedded in the parent app bundle's Extensions directory, but is embedded in the parent app bundle's ../../../BuildProductsPath/Release/MyApp.app/Contents/Extensions directory.
How can I solve this issue?
If I rollback the commit related to this SetFocusFilterIntent new feature the app can be Copied and moved to the other Mac as before.
Is this related to the extension or to the fact that I had to use this new entitlement: com.apple.security.application-groups ?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am watching a few WWDC sessions on Foundation Model and its usage and it looks pretty cool.
I was wondering if it is possible to perform RAG on the user documents on the devices and entuallly on iCloud...
Let's say I have a lot of pages documents about me and I want the Foundation model to access those information on the documents to answer questions about me that can be retrieved from the documents.
How can this be done ?
Thanks
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
Hi,
let's say I have a struct like the following:
struct Item {
var text = ""
}
I want to access the field by string and then set its value to some other string.
I was able to access the property value through a Mirror:
let item = Item()
let mirroredObject = Mirror(reflecting: item)
for (_, var attr) in mirroredObject.children.enumerated() {
attr.value = "Hello World!"
}
The problem is that setting the value of the struct field with attr.value doesn't really change its value...
In python I was used to do something like:
setattr(item, "text", "Hello World!")
Is there any way to achieve the same result with Apple Swift?
Thanks.
Hi,
I would like to be able to create a playlist from my app or add songs to an existing selected playlist in the user music library, How can I do that ?
Is there an API in MusicKit to do that?
The Shazam app is doing something similar with the My Shazam Songs playlist...
Thanks