Post

Replies

Boosts

Views

Activity

Reply to Access .icon files in Swift or Objective-C
I'm not sure if it will work with icon assets specifically, but "Supporting Dark Mode in your interface" and "Providing images for different appearances" cover all of these issues. Note that while both of those articles are in the UIKit section, they also cover AppKit. Thanks, but unfortunately this does not work with the new icon styles. Best regards, Marc
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’25
Reply to Access .icon files in Swift or Objective-C
Enabling Include all app icon assets did the trick and I was able to access the icon by its name. Unfortunately, the icon is always rendered in its default appearance and does not adopt the current appearance, such as dark or tinted. Any chance to make this work? Is there a supported way to get the current appearance request the image in a specific appearance receive a notification if the appearance changes? The last point would also be necessary if I were using a regular asset set with PNG representations of the .icon file. Thanks, Marc
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’25
Reply to Access .icon files in Swift or Objective-C
Hi @DTS Engineer! Yes, the asset catalog is inside the plugin bundle and I can access other assets (png) without problems. To make things easier I created a simple app and added some .icon files to it. First I tried to access them using imageNamed: which doesn't work. Then I copied the icon files to the app's Resources folder, got the actual image path using [[NSBundle mainBundle] pathForResource:@"MyIcon" ofType:@"icon"] (which worked) and then to get an image using [[NSImage alloc] initWithContentsOfFile:iconPath] which returned null. So the issue is not about the Dock Tile plug in but a more general issue.
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’25
Reply to WKWebView requires authentication
It turned out that the website uses Microsoft Enterprise SSO for authentication and my app's bundle identifier must be added to the AppAllowList in our Entra ID configuration. Microsoft describes this in the Enable SSO for specific apps section of their KB article Microsoft Enterprise SSO plug-in for Apple devices. After adding the app to that list, everything worked as expected.
Topic: Safari & Web SubTopic: General Tags:
Jul ’25
Reply to Local Authentication & localized reason string
At least for macOS I can say that it still needs that substring. If you look at the APP_ASKING_AUTH keys in /System/Library/Frameworks/LocalAuthentication.framework/Support/coreautha.bundle/Contents/Resources/UIAgent.loctable you'll see exactly this and all my tests with the Local Authentication framework have also confirmed this. Best regards, Marc
Topic: Privacy & Security SubTopic: General Tags:
Feb ’25
Reply to Local Authentication & localized reason string
Local Authorization's evaluatePolicy:localizedReason:reply: requires a partly localized reason, which is not ideal from a localization perspective. This is what the docs say: Application reason for authentication. This string must be provided in correct localization and should be short and clear. It will be eventually displayed in the authentication dialog as a part of the following string: "" is trying to . For example, if the app name is "TestApp" and localizedReason is passed "access the hidden records", then the authentication prompt will read: "TestApp" is trying to access the hidden records. What I found out now is, that the complete strings look as follows: Where the first placeholder contains the app name and the second placeholder contains the localized string the user provided. So I think I should be able to build the string I need. Best regards, Marc
Topic: Privacy & Security SubTopic: General Tags:
Feb ’25
Reply to LAContext and smart cards
During my testing it turned out that even if using Authorization Services, the Mac asks me for Touch ID. I always had in mind that this would only work using Local Authentication. So it seems that I don't have to use either one or the other but can build everything completely using Authorization Services. It asks me for Touch ID or PIN if a PIV token is connected, otherwise it asks me for Touch ID or Password.
Topic: Privacy & Security SubTopic: General Tags:
Jan ’25