Re: Xcode 14 minimum deployment target
On 10/28/22 1:40 PM, Mark Allan via Cocoa-dev wrote: I've held off upgrading for the same reason. I wonder if it's something to do with a semantic difference between "is no longer supported" and "is no longer possible". Maybe what they really mean is "if it appears to work, great, but we can't guarantee it, and if it fails spectacularly, you're on your own"? That would certainly be great to know for sure. And where exactly it would fail spectacularly (if it did), meaning on the development machine or on a user's machine running an unsupported-by-Xcode system. We didn't notice that change and released an update to our app which targets 10.11 as deployment target. Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa framework or Object class to uncompress files
On 10/25/22 3:45 AM, Carl Hoefs via Cocoa-dev wrote: My iOS app downloads a gzip'd data file into its sandbox that the app needs to unzip and process. I don't see anything in Cocoa (such as NSFileManager) that addresses uncompressing files. Is there a way? (BTW, I tried some ancient 3rd party code called ZipArchive but it always fails trying to parse the zipped file.) I'm hoping there's a built-in solution or framework that I'm just overlooking. I'm using an NSData extension that uses : https://github.com/schacon/igithub/blob/master/CocoaGit/Util/NSData%2BCompression.m Is very easy to use and works very well. You need to add "-lz" to the "Other Linker Flags" linker option in the target build settings of your project. Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WKWebView rejecting keyboard input
On 4/15/21 4:42 PM, Robert Walsh via Cocoa-dev wrote: I have an Objective-C application that creates a WKWebView to collect form input. The form has a label, an input (password) field, and two buttons. When the form is shown inside the web view by the application, the user can click the buttons but cannot enter text into the input field. The system plays a sound to indicate that the key was rejected. I've tried adding a text area element to the form just to see if the problem is with the input field itself, but the user cannot type in the text area either. If I take the same HTML/stylesheet content and open it in Safari, the input field accepts keyboard input. There is another area of the application that shows a different web page in the same WKWebView component. That page, too, contains a form with an input field, and the user can type into that one. I am using a WKWebView subclass so that I can trap mouse down events, but I do not have any overloads for keyboard event handlers. Maybe your WKWebView never becomes first responder (and therefore is never getting key input), perhaps as a result of the mouse-trapping that is going on. You can check if it becomes key by overriding - (BOOL)becomeFirstResponder in your subclass and setting a breakpoint there. Best Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSSecureCoding & Nested Collections & macOS 11
On 9/3/20 12:15 PM, Markus Spoettl via Cocoa-dev wrote: On macOS 11 this produces the following exception: -- -[NSKeyedUnarchiver _validateDecodeCollectionAllowedClassesRequirementsWithClasses:]: This method only supports decoding non-nested collections. Please remove the following or use '-decodeObjectOfClasses: forKey:' instead: ( NSDictionary (0x7fff88714520) [/System/Library/Frameworks/CoreFoundation.framework] ) -- It Was All Our Fault (tm), surprisingly :) Turns out we have an NSCoder extension that helps with secure coding and declares - (NSArray *)decodeArrayOfObjectsOfClasses:(NSSet *)classes forKey:(NSString *)key Apple must have seen it because the exact same method is not in NSCoder directly. Apparently the collision wasn't resolved to call the new instance method, but something else (probably -decodeObjectForKey:). Changing the extension's method name(s) to something more unique fixed the problem. Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSSecureCoding & Nested Collections & macOS 11
On 9/3/20 9:12 PM, Jens Alfke wrote: That sounds like a framework bug, since the warning is telling you to use the method you're already using. I'd file a bug report with Apple. Agreed and I did as did a user a couple of months ago. What is strange is that this wasn't fixed months ago, as any app deserializing such structures would be affected. There must be thousands. Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSSecureCoding & Nested Collections & macOS 11
Hi, my app implements secure decoding for all its serialization and it worked fine up until macOS 11. Now the deserialization chokes on nested collections like this NSArray of NSDictionary containing [NSNumber, NSString, NSDate] (both keys and objects) What previously worked no longer does: NSSet *allClasses = [NSSet setWithObjects: [NSArray class], [NSDictionary class], [NSNumber class], [NSString class], [NSDate class], nil]; [decoder decodeObjectOfClasses:allClasses forKey:@"somekey"]; On macOS 11 this produces the following exception: -- -[NSKeyedUnarchiver _validateDecodeCollectionAllowedClassesRequirementsWithClasses:]: This method only supports decoding non-nested collections. Please remove the following or use '-decodeObjectOfClasses: forKey:' instead: ( NSDictionary (0x7fff88714520) [/System/Library/Frameworks/CoreFoundation.framework] ) -- Of course leaving out NSDictionary produces a different exception about the decode encountering an NSDictionary object. Something has changed, obviously. Can someone enlighten me how one is supposed to decode those kinds of objects? It's no option to change the encoding. Thanks for any pointers Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS open In place, permission denied
On 4/28/20 11:23 AM, Markus Spoettl via Cocoa-dev wrote: - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options Just in case anyone is interested, main part of the solution is to wrap the usage of url inside a [url startAccessingSecurityScopedResource]; [url stopAccessingSecurityScopedResource]; sequence (plus use a NSFileCoordinator to read the file's contents, but that's really secondary). This was surprisingly difficult to figure out, the documentation really sucks. Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
iOS open In place, permission denied
Hi everyone, I have a strange problem with the - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options app delegate method, that seems to have cropped up a couple of weeks ago when switching to the iOS 13 SDK (from 12). My app can no longer access files that are sent to it via "Open In". My app declares the relevant UTIs and sets UIFileSharingEnabled LSSupportsOpeningDocumentsInPlace in the Info.pList. The App delegate receives the message above just fine, but accessing the given URL yields the following error (when using "Open In" from the Files.app): Error Domain=NSCocoaErrorDomain Code=257 "The file “foo.bar couldn’t be opened because you don’t have permission to view it." UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/372CF62C-2C92-446A-9A7E-0CA3884388A2/File Provider Storage/foo.bar, NSUnderlyingError=0x281ce7120 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}} I've tried copying the file (it is a local file) via NSFileManager -copyItemAtURL::: as well reading its contents via NSData -dataWithContentsOfURL::: both produce this permission error. This worked fine prior to switching to Xcode 11 and the iOS SDK 13, I'm sure I'm just missing a tiny bit that is now required. Thanks for any pointers! Best Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Code signing problem in one project...
On 4/26/20 11:25 PM, Steve Mykytyn via Cocoa-dev wrote: I'm automatically managing code signing on all my Xcode projects. Just today, one started refusing to validate / distribute, claiming it was missing a private key. All the other projects continue to build just fine. Tried restarting Xcode, turned automatic signing on and off, deleted derived data, removed anything old in the keychain. No luck. Suggested next steps? Since you didn't mention a reboot, last time I had inexplicable problems with code signing, a reboot cured it. Best Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Questions regarding release
On 9/26/19 11:16 AM, Gabriel Zachmann via Cocoa-dev wrote: NSImage * nsImage = [[NSImage alloc] initWithSize: nsimgrep.size]; [nsImage addRepresentation: nsimgrep]; return NSImage; You probably mean to write return nsImage; Best Regards Markus -- __ Markus Spoettl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com