Post

Replies

Boosts

Views

Activity

Reply to iPad Pro 13" screenshots for the App Store
The App Store Connect API documentation still doesn't list the new iPads: https://developer.apple.com/documentation/appstoreconnectapi/screenshotdisplaytype When adding screenshots to 13" iPads on the website, they still seem to use the display type APP_IPAD_PRO_3GEN_129 when listed by the API, and uploading to that same type uploads them to the 13" display type instead, and then there is the requirement that one still has to upload screenshots for 12.9" display type, without an apparent way of doing so. I would expect to have an option to upload to 13" display type that is also used for 12.9" display type as well.
May ’24
Reply to URL.checkResourceIsReachable() throws error if file is on FTP server and name contains special characters
FTP is fundamentally broken at the protocol level. You won’t be able to make non-ASCII file names work with FTP in the general case. Thanks for your comments. Regarding your link "On FTP", I was wondering about this: FTPS is FTP over TLS (aka SSL). While FTPS adds security to the protocol, which is very important, it still inherits many of FTP’s other problems. Personally I try to avoid this protocol. in particular the part "it still inherits many of FTP’s other problems". What are these other problems? At the beginning of the post you only mentioned privacy and security, but these are already fixed with FTPS according to you. Also do you have any clue why open(source.path, O_RDONLY) returns a valid file descriptor if source is a directory and if it's a regular file it returns -1 (see my previous post)?
Topic: App & System Services SubTopic: General Tags:
Apr ’24
Reply to How to link multiple text views to a single text storage in TextKit 2
Thanks! I have another question now: how can I link multiple NSTextContentStorage to the same NSTextStorage? The documentation for NSTextContentStorage reads: By default, the framework initializes the NSTextContentStorage with NSTextStorage as the backing store. But I don't see any way of accessing or setting the NSTextStorage. If I'm not supposed to do so, then how can I programmatically change the text?
Topic: App & System Services SubTopic: General Tags:
Apr ’24
Reply to NSMenu.popUp(positioning:at:in:) doesn't enable menu items when opened inside modal window
If you implement the method -(BOOL)worksWhenModal to return YES on the target object for your menu item, AppKit will allow the menu item to be validated, and enabled if the target implements the item's action. Still doesn't seem to work for the sample code I provided. I had to leave the menu item's target to nil to make it work, but then using a normal window was enough, without the need to implement worksWhenModal. This is in fact the workaround I just found. If I leave the menu item's target to nil and make sure that the view of the view controller or a subview is first responder, e.g. with override func viewDidAppear() { view.window?.makeFirstResponder(view) } then the menu item is enabled. In my case it doesn't work though, since the view controller is a child of another view controller and it's not guaranteed that the view of the view controller showing the menu (and implementing the menu item actions) is first responder (as the parent can have other views that can be first responders). As soon as I set the menu item's target to self, the menu items are disabled again.
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’24
Reply to NSMenu.popUp(positioning:at:in:) doesn't enable menu items when opened inside modal window
However, if the app is in a modal state, AppKit skips over item validation and always disables the item. Thanks for your feedback. Indeed, it seems that all menu items targeting a window or view controller are automatically disabled, while menu items targeting the app delegate can still be enabled, as well as the standard copy, paste, etc. I think the correct behaviour should be to still enable menu items targeting the modal window itself. I think you may have reported this issue with Bug Reporter as FB9190141? Yes, I opened FB9190141 2.5 years ago but got no response, which is why I decided to ask here. It would be great if you could investigate it. Also to everyone else who might be tempted to use NSMenu.popUpContextMenu(_:with:for:): provide a made-up NSEvent and don't rely on NSApp.currentEvent being non-nil. When using VoiceOver for instance, it's nil.
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’24
Reply to Get Application Scripts directory for app group
But NSUserScriptTask won’t find them there Then it's more like a limitation of how application scripts are designed to work, but I don't get it when you say that it doesn't make sense to have application scripts in an app group. App groups are meant to share data between apps, so why not application scripts as well? The fact that the Application Scripts directory is created automatically even for app groups adds to the confusion.
Topic: App & System Services SubTopic: General Tags:
Feb ’24
Reply to iPad Pro 13" screenshots for the App Store
The App Store Connect API documentation still doesn't list the new iPads: https://developer.apple.com/documentation/appstoreconnectapi/screenshotdisplaytype When adding screenshots to 13" iPads on the website, they still seem to use the display type APP_IPAD_PRO_3GEN_129 when listed by the API, and uploading to that same type uploads them to the 13" display type instead, and then there is the requirement that one still has to upload screenshots for 12.9" display type, without an apparent way of doing so. I would expect to have an option to upload to 13" display type that is also used for 12.9" display type as well.
Replies
Boosts
Views
Activity
May ’24
Reply to URL.checkResourceIsReachable() throws error if file is on FTP server and name contains special characters
FTP is fundamentally broken at the protocol level. You won’t be able to make non-ASCII file names work with FTP in the general case. Thanks for your comments. Regarding your link "On FTP", I was wondering about this: FTPS is FTP over TLS (aka SSL). While FTPS adds security to the protocol, which is very important, it still inherits many of FTP’s other problems. Personally I try to avoid this protocol. in particular the part "it still inherits many of FTP’s other problems". What are these other problems? At the beginning of the post you only mentioned privacy and security, but these are already fixed with FTPS according to you. Also do you have any clue why open(source.path, O_RDONLY) returns a valid file descriptor if source is a directory and if it's a regular file it returns -1 (see my previous post)?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to How to link multiple text views to a single text storage in TextKit 2
Thanks! I have another question now: how can I link multiple NSTextContentStorage to the same NSTextStorage? The documentation for NSTextContentStorage reads: By default, the framework initializes the NSTextContentStorage with NSTextStorage as the backing store. But I don't see any way of accessing or setting the NSTextStorage. If I'm not supposed to do so, then how can I programmatically change the text?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to URL.checkResourceIsReachable() throws error if file is on FTP server and name contains special characters
After a few more tests, I noticed that, while try source.checkResourceIsReachable() throws an error and FileManager.default.fileExists(atPath: source.path) returns false, calling open(source.path, O_RDONLY) returns a valid file descriptor if source is a directory; if it's a regular file, it returns -1.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to NSMenu.popUp(positioning:at:in:) doesn't enable menu items when opened inside modal window
If you implement the method -(BOOL)worksWhenModal to return YES on the target object for your menu item, AppKit will allow the menu item to be validated, and enabled if the target implements the item's action. Still doesn't seem to work for the sample code I provided. I had to leave the menu item's target to nil to make it work, but then using a normal window was enough, without the need to implement worksWhenModal. This is in fact the workaround I just found. If I leave the menu item's target to nil and make sure that the view of the view controller or a subview is first responder, e.g. with override func viewDidAppear() { view.window?.makeFirstResponder(view) } then the menu item is enabled. In my case it doesn't work though, since the view controller is a child of another view controller and it's not guaranteed that the view of the view controller showing the menu (and implementing the menu item actions) is first responder (as the parent can have other views that can be first responders). As soon as I set the menu item's target to self, the menu items are disabled again.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to NSMenu.popUp(positioning:at:in:) doesn't enable menu items when opened inside modal window
However, if the app is in a modal state, AppKit skips over item validation and always disables the item. Thanks for your feedback. Indeed, it seems that all menu items targeting a window or view controller are automatically disabled, while menu items targeting the app delegate can still be enabled, as well as the standard copy, paste, etc. I think the correct behaviour should be to still enable menu items targeting the modal window itself. I think you may have reported this issue with Bug Reporter as FB9190141? Yes, I opened FB9190141 2.5 years ago but got no response, which is why I decided to ask here. It would be great if you could investigate it. Also to everyone else who might be tempted to use NSMenu.popUpContextMenu(_:with:for:): provide a made-up NSEvent and don't rely on NSApp.currentEvent being non-nil. When using VoiceOver for instance, it's nil.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Get Application Scripts directory for app group
But NSUserScriptTask won’t find them there Then it's more like a limitation of how application scripts are designed to work, but I don't get it when you say that it doesn't make sense to have application scripts in an app group. App groups are meant to share data between apps, so why not application scripts as well? The fact that the Application Scripts directory is created automatically even for app groups adds to the confusion.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’24