Post

Replies

Boosts

Views

Activity

Reply to Modal UINavigationController shown programmatically has no navigation buttons
[quote='809291022, Frameworks Engineer, /thread/766374?answerId=809291022#809291022'] When you set the primary action, we take the title & image from that action for the bar button item [/quote] Thanks! I see now that the documentation for primaryAction says this as well. Though in other places in my project I use let button = UIBarButtonItem(title: "button", primaryAction: UIAction(handler: { action in ... })) which works fine and I assumed was the same as let button = UIBarButtonItem(title: "button") button.primaryAction = UIAction(handler: { action in ... })
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’24
Reply to Xcode UI test cannot tap menu button in form
[quote='800821022, Developer Tools Engineer, /thread/760070?answerId=800821022#800821022'] You can see what type it is by printing app.debugDescription and searching for "menu2" [/quote] Sorry for my late reply, once again I wasn't notified of a new post even though I'm subscribed to this topic. Here's the output I get when running app.debugDescription. Both menu1 and menu2 seem to be buttons.
Oct ’24
Reply to Take correctly sized screenshots with ScreenCaptureKit
[quote='807305022, DTS Engineer, /thread/765360?answerId=807305022#807305022'] There's no supported way for you to calculate the window shadow's frame with the APIs currently available. If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. [/quote] Thanks, I filed FB15370384.
Topic: Media Technologies SubTopic: General Tags:
Oct ’24
Reply to NSAttributedString.enumerateAttribute(_:in) crashes with custom attribute in macOS Sequoia
[quote='806209022, Claude31, /thread/764898?answerId=806209022#806209022, /profile/Claude31'] What would you expect from [/quote] I use this to correlate a text range with a custom object that I need when the user modifies that range. The documentation says right in the first paragraph: Attributed strings support many different kinds of attributes, including Custom attributes you define for your app
Topic: UI Frameworks SubTopic: General Tags:
Sep ’24
Reply to Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
[quote='806001022, Macho Man Randy Savage, /thread/764435?answerId=806001022#806001022, /profile/Macho+Man+Randy+Savage'] Just to throw some spaghetti at the wall, is it possible this could be related to not balancing -startAccessingSecurityScopedResource calls with -stopAccessingSecurityScopedResource when you are done with the file? [/quote] I don't think so. This happened both with my App Store published app and with a sample app I had just created to reproduce the issue. Even after restarting both apps they had the same issue. It only disappeared the day after.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’24
Reply to SKTexture initialized with system UIImage has slightly wrong aspect ratio and ignores system symbol color
[quote='803865022, endecotp, /thread/763479?answerId=803865022#803865022, /profile/endecotp'] In principle you could render the UIImage into a graphics context and then create your SKTexture from that. [/quote] That's a great idea. I changed the iOS code to this and it seems to work for both aspect ratio and color: var image = UIImage(systemName: systemImage)!.applyingSymbolConfiguration(.init(pointSize: width))!.applyingSymbolConfiguration(.init(hierarchicalColor: .white))! image = UIGraphicsImageRenderer(size: image.size).image { context in image.draw(at: .zero) }
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Sep ’24
Reply to SKTexture initialized with system UIImage has slightly wrong aspect ratio and ignores system symbol color
[quote='803792022, endecotp, /thread/763479?answerId=803792022#803792022, /profile/endecotp'] UIImage and CGImage have different aspect ratios for SF Symbols, due to padding. [/quote] I tried using SKTexture(image: image) and SKTexture(cgImage: image.cgImage!) and they both produce the same result. Do you think this is expected or do you have a suggestion for how one could do it differently?
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Sep ’24
Reply to SKAction.removeFromParent() causes crash when run in SCNView.overlaySKScene on iOS
I filed FB15498049.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Modal UINavigationController shown programmatically has no navigation buttons
[quote='809291022, Frameworks Engineer, /thread/766374?answerId=809291022#809291022'] When you set the primary action, we take the title & image from that action for the bar button item [/quote] Thanks! I see now that the documentation for primaryAction says this as well. Though in other places in my project I use let button = UIBarButtonItem(title: "button", primaryAction: UIAction(handler: { action in ... })) which works fine and I assumed was the same as let button = UIBarButtonItem(title: "button") button.primaryAction = UIAction(handler: { action in ... })
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to NSAttributedString.enumerateAttribute(_:in) crashes with custom attribute in macOS Sequoia
I just wanted to add that the problem is caused by classes that don't inherit from NSObject. Initially, I interpreted this as "don't use Swift types at all". But I just noticed that my other project uses a Swift enum and it works fine.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Xcode UI test cannot tap menu button in form
[quote='800821022, Developer Tools Engineer, /thread/760070?answerId=800821022#800821022'] You can see what type it is by printing app.debugDescription and searching for "menu2" [/quote] Sorry for my late reply, once again I wasn't notified of a new post even though I'm subscribed to this topic. Here's the output I get when running app.debugDescription. Both menu1 and menu2 seem to be buttons.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Take correctly sized screenshots with ScreenCaptureKit
[quote='807305022, DTS Engineer, /thread/765360?answerId=807305022#807305022'] There's no supported way for you to calculate the window shadow's frame with the APIs currently available. If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. [/quote] Thanks, I filed FB15370384.
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to NSAttributedString.enumerateAttribute(_:in) crashes with custom attribute in macOS Sequoia
[quote='806566022, DTS Engineer, /thread/764898?answerId=806566022#806566022'] The issue here is that your custom attribute value is a Swift class. If you change it to a subclass of NSObject, the code runs as expected: [/quote] Works perfectly, thank you! I opened FB15296006.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to NSAttributedString.enumerateAttribute(_:in) crashes with custom attribute in macOS Sequoia
[quote='806209022, Claude31, /thread/764898?answerId=806209022#806209022, /profile/Claude31'] What would you expect from [/quote] I use this to correlate a text range with a custom object that I need when the user modifies that range. The documentation says right in the first paragraph: Attributed strings support many different kinds of attributes, including Custom attributes you define for your app
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
[quote='806097022, DTS Engineer, /thread/764435?answerId=806097022#806097022'] That bug is fixed as of macOS 15.1 beta 4. [/quote] Thank you for the feedback. I'm looking forward to the fix.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
[quote='806015022, DTS Engineer, /thread/764435?answerId=806015022#806015022'] If you've filed bugs, please post the bug numbers here. [/quote] Yesterday I filed FB15258541.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
[quote='806001022, Macho Man Randy Savage, /thread/764435?answerId=806001022#806001022, /profile/Macho+Man+Randy+Savage'] Just to throw some spaghetti at the wall, is it possible this could be related to not balancing -startAccessingSecurityScopedResource calls with -stopAccessingSecurityScopedResource when you are done with the file? [/quote] I don't think so. This happened both with my App Store published app and with a sample app I had just created to reproduce the issue. Even after restarting both apps they had the same issue. It only disappeared the day after.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
Today, mysteriously, the sample code works again. How could this possibly happen? Yesterday all my App Store apps weren't able to resolve and create file bookmarks, and today they work again.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to SKTexture initialized with system UIImage has slightly wrong aspect ratio and ignores system symbol color
[quote='803865022, endecotp, /thread/763479?answerId=803865022#803865022, /profile/endecotp'] In principle you could render the UIImage into a graphics context and then create your SKTexture from that. [/quote] That's a great idea. I changed the iOS code to this and it seems to work for both aspect ratio and color: var image = UIImage(systemName: systemImage)!.applyingSymbolConfiguration(.init(pointSize: width))!.applyingSymbolConfiguration(.init(hierarchicalColor: .white))! image = UIGraphicsImageRenderer(size: image.size).image { context in image.draw(at: .zero) }
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Xcode downloaded client crash report at libsecinit_appsandbox.c
Given that there’s just one instance of this, I suspect it’s something to do with that specific user’s Mac. Thanks, that's what I suspected. It's not always easy to find information about crashes that apparently have nothing to do with your own code.
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
Sep ’24
Reply to SKTexture initialized with system UIImage has slightly wrong aspect ratio and ignores system symbol color
[quote='803792022, endecotp, /thread/763479?answerId=803792022#803792022, /profile/endecotp'] UIImage and CGImage have different aspect ratios for SF Symbols, due to padding. [/quote] I tried using SKTexture(image: image) and SKTexture(cgImage: image.cgImage!) and they both produce the same result. Do you think this is expected or do you have a suggestion for how one could do it differently?
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to SKTexture initialized with system UIImage has slightly wrong aspect ratio and ignores system symbol color
[quote='803472022, DTS Engineer, /thread/763479?answerId=803472022#803472022'] Have you filed a bug report? If so please reply with the Feedback ID. [/quote] I filed FB15095279 shortly before I created this post.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Sep ’24