Re: Screen saver settings don't take effect (again) under Sonoma

2024-02-01 Thread Gabriel Zachmann via Cocoa-dev
hment.bin> > > -- > > Message: 2 > Date: Thu, 12 Oct 2023 08:22:21 -0500 > From: Steve Mills > To: Cocoa dev > Subject: Re: Screen saver settings don't take effect (again) under > Sonoma > Message-ID: <0d02e197-d36a-4a4b-ac48-297848fe

Re: Xcode interferes with signal handler

2024-01-31 Thread Gabriel Zachmann via Cocoa-dev
Sorry, Jens and Pascal! I have received your messages just now. You were right, as I have found out a while later kind of the hard way ... So, thanks again! Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev

Re: Xcode interferes with signal handler (was: Sending SIGUSR1 to a process)

2024-01-31 Thread Gabriel Zachmann via Cocoa-dev
I think , I found the solution, so just for the record (so that others will find it using Google): Launch the app in the debugger on the command line : lldb /private/tmp/Build/Products/Debug/MyApp.app In lldb's command line: process handle -p true -s false -n true // otherwise lldb

Re: Xcode interferes with signal handler

2024-01-31 Thread Gabriel Zachmann via Cocoa-dev
I have investigated a bit further. When I launch my app from lldb (on the command line), it still stops in mach_msg2_trap when I send a SIGUSR1 to my app. But at least, I get a more meaningful stack trace: * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGUSR1 * frame #0:

Xcode interferes with signal handler (was: Sending SIGUSR1 to a process)

2024-01-30 Thread Gabriel Zachmann via Cocoa-dev
I am setting up a signal handler in my app like this: void *e = signal( SIGUSR1, signal_handler ); if ( e == SIG_ERR ) ... It works (i can 'kill -30 '), BUT ONLY, if I run my app outside of Xcode. When I launch it from Xcode, and I send a SIGUSR1 to my app, it always breaks at

Re: Sending SIGUSR1 to a process

2024-01-29 Thread Gabriel Zachmann via Cocoa-dev
> > Yes, this should work. The only changes I know of is that you can’t signal > some Apple processes these days if System Integrity Protection is engaged. I have tried it like the following, but to no avail: void signal_handler( int sig ) { logMessage( LogClient, [NSString

Sending SIGUSR1 to a process

2024-01-28 Thread Gabriel Zachmann via Cocoa-dev
IIRC, one process cannot send a Unix signal to another one. At least, not any more, and not without special privileges. But would it be possible for a user to send a SIGUSR1 (using 'kill -30 ' on the command line) to a process they own? I couldn't find information about that. In fact, in the

Re: Security-scoped bookmark and screensaver

2024-01-03 Thread Gabriel Zachmann via Cocoa-dev
>> >> For that user, the directory for which my screensaver creates the bookmark >> is on an external HD. > > Is that use running 10.10? Googling reveals a bug resolving SSBs on external > drives that was fixed in 10.11.6. He is running 10.14 Best regards, Gabriel smime.p7s Description:

Security-scoped bookmark and screensaver

2024-01-03 Thread Gabriel Zachmann via Cocoa-dev
From one of the users of my screensaver, I get the issue report that resolving the SSB does not work. He is running macOS 10.14.6 on a Mac Mini. I have compiled my screensaver using the current version of Xcode, under macOS 14, but for the target macOS 10.13. When my screensaver tries to

Screen saver settings don't take effect (again) under Sonoma

2023-10-12 Thread Gabriel Zachmann via Cocoa-dev
IIRC, I had an issue with screen saver settings not taking effect some months ago (under Ventura), but back then it turned out to be a non-issue. Now, under Sonoma (14.0), I have an issue with the settings (user defaults) of my screen saver, again. I go into System Settings, change some

Re: How to check for full-screen apps, robustly?

2023-09-12 Thread Gabriel Zachmann via Cocoa-dev
Thanks a million! (and sorry for the late response) For the record (i.e., Google's databases), in case somebody else googles for this: this seems to recognize full-screen windows even on Mac's with a notch: if ( win_rect.size.width >= mainScreen.visibleFrame.size.width &&

Re: 'originals' folder is greyed out

2023-09-05 Thread Gabriel Zachmann via Cocoa-dev
> Are you overriding NSOpenSavePanelDelegate -panel:shouldEnableURL:? If so, > make sure your code isn’t No, I am not doing anything with any of those methods . > inadvertently disabling the folder for some reason. > > Doing those steps in TextEdit works fine for me. Maybe ask the user to try

'originals' folder is greyed out

2023-09-05 Thread Gabriel Zachmann via Cocoa-dev
My app loads a number of image files and displays them. To some users, I suggest the following in order for them to loads their photos: > in Finder, go to your Pictures folder; > control-click on the icon > Photos Library.photoslibrary, > then select "Show Package Contents". > Now go to the

Re: How to check for full-screen apps, robustly?

2023-08-19 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for the quick response. I was thinking of the styleMask, too, but IIUC, the documentation of CGWindowListCopyWindowInfo says that I get only Required Window List Keys and Optional Window List Keys, and the styleMask is not part of those. Best regards, Gabriel smime.p7s

How to check for full-screen apps, robustly?

2023-08-19 Thread Gabriel Zachmann via Cocoa-dev
How can I robustly check in my app whether or not there is any other window running in full-screen? I would like to prevent my app from going full-screen if another app is currently running in full-screen. (For instance, when the user is watching a video in Quicktime Player or Safari in

Re: Confusion with app settings / NSUserDefaults

2023-08-15 Thread Gabriel Zachmann via Cocoa-dev
Right, that makes sense, in particular with Saga's insights in mind. > Use the commend “defaults delete de.zach.ArtSaverApp” to delete all your > prefs. That should remove them everywhere. > smime.p7s Description: S/MIME cryptographic signature

Re: Confusion with app settings / NSUserDefaults

2023-08-15 Thread Gabriel Zachmann via Cocoa-dev
Ah, thanks a lot for the insights! Could it happen that the new settings have not been written to disk even if the app has quit normally? Or, in other words, there might be key/value pairs stored in cfprefsd's internal/runtime storage, even if i have changed the app and those key/value pairs

Re: Full-screen not working

2023-08-15 Thread Gabriel Zachmann via Cocoa-dev
I can try that , but I would have no idea what to look for. Is there any known reasons why a toggleFullScreen call might not send the window to full-screen? smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list

Re: Full-screen not working

2023-08-15 Thread Gabriel Zachmann via Cocoa-dev
> I have tested this on 1, 2 and 3 display systems over a month ago. There > appears to be a 1/2 hour delay (or so) before it takes over and is full > screen. Very strange - how could that be? > Greetings from the deepest darkest jungles of suburban Windhoek. Happy safari! Best regards,

Full-screen not working

2023-08-15 Thread Gabriel Zachmann via Cocoa-dev
I have one user of my macOS app (under macOS 13.4.1) where the app does not want to go into full-screen mode. It is a pretty plain app. In the AppDelegate's method -applicationWillFinishLaunching, I switch to full screen like this: [self.window toggleFullScreen: nil]; It works, of course,

Screensaver options: nothing clickable

2023-08-13 Thread Gabriel Zachmann via Cocoa-dev
One of the users of my screensaver has reported a very funny bug: my screensaver is working, but when they open the Options panel, they cannot click on any GUI element; well, they can click, but nothing happens, as if that does not generate any event. Consequently, when they click on the "OK"

Confusion with app settings / NSUserDefaults

2023-08-06 Thread Gabriel Zachmann via Cocoa-dev
I am pretty confused with the NSUserDefaults system. My app stores different settings for different monitors in the [NSUserDefaults standardUserDefaults]. To do so, I generate defaults_ = [NSUserDefaults standardUserDefaults]; Then, I create a dictionary containing the default settings and

Re: Substitute for kill(2)? (James Walker)

2023-07-25 Thread Gabriel Zachmann via Cocoa-dev
>> > An XPC service isn't an app, and wouldn't you need an app to run an > NSStatusItem, which I assume is what's meant by a "menu bar item"? Oh, sorry, PS: yes, I do create let statusBar = NSStatusBar.system statusBarItem_ = statusBar.statusItem( withLength: NSStatusItem.variableLength

Re: Substitute for kill(2)? (James Walker)

2023-07-25 Thread Gabriel Zachmann via Cocoa-dev
>> > An XPC service isn't an app, and wouldn't you need an app to run an > NSStatusItem, which I assume is what's meant by a "menu bar item"? > I am just a beginner in "menu bar items" , but what I have is an @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate which Xcode

Re: Substitute for kill(2)?

2023-07-25 Thread Gabriel Zachmann via Cocoa-dev
> NSDistributedNotificationCenter is a way to send a notification out across > the system. Only processes that are listening for the notification will > receive it and have a chance to do something with it. It’s like yelling out > in a crowded room to tell a single person something. Everyone

Re: Substitute for kill(2)?

2023-07-25 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your responses! Sorry for the misunderstanding: I don't want to kill the other process. (In case you forgot: the kill(2) system call is for sending unix signals to processes, which can listen to those signals (at least, most of them). I just want to signal the other process,

Substitute for kill(2)?

2023-07-25 Thread Gabriel Zachmann via Cocoa-dev
Is there a simple way for one process to send a single signal to another process? Both processes are my programs, one is a regular app, the other a menu bar item. Both are launched by the same user. In the old unix days, I would have used kill(2) and send a SIGUSR1 , but as far as I understand,

Re: "Z" in setDateFormat ?

2023-07-22 Thread Gabriel Zachmann via Cocoa-dev
Thanks! ... and what is the meaning of the Z at the end of a date/time ? GMT+0:0 ? Best regards, Gabriel > On 22. Jul 2023, at 12:25, Roland King wrote: > > It’s a literal. It’s quoted. So it prints “Z” > >> On 22 Jul 2023, at 06:15, Gabriel Zachmann via Co

"Z" in setDateFormat ?

2023-07-22 Thread Gabriel Zachmann via Cocoa-dev
In the Apple docs in chapter "Date Formatters" I found sample code that contains this line: [rfc3339DateFormatter setDateFormat:@"'-'MM'-'dd'T'HH':'mm':'ss'Z'"]; Now, my very specific question is: what does the 'Z' do? And where would I find the doc about it? (and potential other

Re: How do decipher an exception in the log file

2023-07-21 Thread Gabriel Zachmann via Cocoa-dev
t; > Saagar Jha > >> On Jul 18, 2023, at 16:01, Gabriel Zachmann via Cocoa-dev >> wrote: >> >> >>> That number is 0x7FFF, which is particularly recognizable and >>> happens to be the value of NSNotFound. >>> >>> I imagi

Re: How do decipher an exception in the log file

2023-07-18 Thread Gabriel Zachmann via Cocoa-dev
> That number is 0x7FFF, which is particularly recognizable and > happens to be the value of NSNotFound. > > I imagine that in the preceding line of code you called -indexOfObject: on an > array that didn't contain the object, but then failed to test the value > against NSNotFound

How do decipher an exception in the log file

2023-07-18 Thread Gabriel Zachmann via Cocoa-dev
Does anybody know how I could decipher the following entries in the log file? More precisely, is there a way I can determine the location in the code where the exception occurred? Thanks a lot in advance. G. 2023-07-17 13:13:23.650173+0200 0xff744Default 0x1144e1 2670 0

Log file not showing all messages

2023-07-14 Thread Gabriel Zachmann via Cocoa-dev
I have an app that logs messages (info and errors) as follows: ... log_client_ = os_log_create( "de.zach.MyApp", "MyApp" ); ... void logMessage( NSString* msg, bool is_error ) { if ( [ msg canBeConvertedToEncoding: NSUTF8StringEncoding] ) msg_string = [msg UTF8String];

Re: Screensaver running only on one display with a multiple display setup

2023-06-13 Thread Gabriel Zachmann via Cocoa-dev
> By logging when init and viewDidMoveToWindow methods, you can see when the > latter fails to be called. That's what i did > It's a bug Apple needs to fix. Oh, it's a well-known bug? Good to know. > They broke it some time ago, then didn't fix it when the partially fixed > legacy

Re: Screensaver running only on one display with a multiple display setup

2023-06-10 Thread Gabriel Zachmann via Cocoa-dev
> > I have one user, who has three displays connected to the Mac, but only the > main display (center) gets a screensaver. > This is on macOS Ventura 13.4. > (I should also say that with other users, who also have multiple displays, > everything seems fine.) > > According to the log file,

Re: NSScreen.screens under multiple displays

2023-06-10 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot. But different displays/monitors will count as different screens, no matter if "Displays have separate Spaces" is on or off? Best regards, Gabriel > On 8. Jun 2023, at 19:45, Rob Petrovec wrote: > > The order of the screens can change under various user scenarios. One easy >

NSScreen.screens under multiple displays

2023-06-08 Thread Gabriel Zachmann via Cocoa-dev
In my method - (void) viewDidMoveToWindow I have these lines of code: window_ = [self window]; NSUInteger idx_of_screen = [NSScreen.screens indexOfObject: window_.screen]; My question is: will this always produce the same results, whether or not the user has switched "Displays have

Screensaver running only on one display with a multiple display setup

2023-06-08 Thread Gabriel Zachmann via Cocoa-dev
I have a screensaver that is supposed to run on all displays simultaneously. MacOS launches several instances, if there are multiple displays. I have one user, who has three displays connected to the Mac, but only the main display (center) gets a screensaver. This is on macOS Ventura 13.4. (I

IOSurface creation failed

2023-05-16 Thread Gabriel Zachmann via Cocoa-dev
My slide show app loads a large number of images and displays them using CALayer. Occasionally, I get an error message in the log like this: 2023-05-16 16:16:33.606195+0700 MyApp[17514:6600184] IOSurface creation failed: e2c2 parentID: properties: { IOSurfaceAddress =

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Gabriel Zachmann via Cocoa-dev
Hm, on closer inspection, maybe it did help. At the moment, at least, the memory footprint of my app levels out at 3GB (which would be OK). In any case, thanks again so much to everybody who chimed in! Best regards, Gabriel > On 1. May 2023, at 12:43, Gabriel Zachmann wrote: > > Thanks a lot

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Gabriel Zachmann via Cocoa-dev
Thanks so much again! I tried, and it didn't give me a good clue, though. What I got as output is: All zones: 1466 nodes malloced - Sizes: 117040KB[25] 96KB[25] 8KB[2] 5.5KB[1] 5KB[1] 4KB[2] 3KB[3] 2.5KB[2] 2KB[4] 1.5KB[4] 656[15] 592[2] 528[2] 512[2] 448[5] 400[3] 384[2] 368[3] 352[1] 336[1]

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Gabriel Zachmann via Cocoa-dev
___ 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:

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your response! I am not sure, though, I understand what you mean. I've got 3 autoreleasepool's in different places in my source code. They are just @autoreleasepool { ... do something ... } What do you mean by "insufficient use" ? and how do you mean "exit the nearest

Re: Memory leak in Apple's image handling frameworks ?

2023-04-30 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your response! And thanks a lot for your hints to 'leaks'. I tried it, but I don't see any "ROOT CYCLE" in the output of 'leaks'. (I see a bunch of ROOT LEAKS, but in total it's just 6 kB.) Also, in the Debugger of Xcode, when i click on "Debug Memory Graph" icon, I get lots of

Memory leak in Apple's image handling frameworks ?

2023-04-29 Thread Gabriel Zachmann via Cocoa-dev
I have an app that is basically a slide show. Basically, it loads one image after another, displays it, then frees up its memory. When I test it with my image collection of 100k+ images, everything is fine. However, one user sent me a photo (JPG) that makes my app use up more and more memory. I

Re: Screensaver under 13.3 using multiple monitors appears funny

2023-04-23 Thread Gabriel Zachmann via Cocoa-dev
> > Yes, Apple broke legacy screensavers when multiple monitors are present, even > some of their own screensavers. We just have to wait for them to fix it. It's > been reported, and I've heard that they are aware. That makes me suspect a bit that Apple is working on the legacyScreenSaver SW

Screensaver under 13.3 using multiple monitors appears funny

2023-04-22 Thread Gabriel Zachmann via Cocoa-dev
With the latest upgrade to macOS 13.3, I have received a few reports from users that my screensaver (a real .saver) looks funny when the Mac has two monitors, the built-in one and an external one. Symptoms: it does not show anything on the builtin monitor, as if it's not running on that one.

Re: Retrieving the EXIF date/time from 250k images

2023-01-15 Thread Gabriel Zachmann via Cocoa-dev
parse the first markers of the file (0xFF, 0x??) and look > for the EXIF one. The JPEG file format (JFIF) is pretty simple to decode (I > can help). > > Regards, > > Raphaël > > > On Sun, Jan 8, 2023 at 3:30 PM Chris Ridd via Cocoa-dev > wrote: > > > >

Re: Retrieving the EXIF date/time from 250k images

2023-01-07 Thread Gabriel Zachmann via Cocoa-dev
> > I wonder if there is a method to load the EXIF data out of the files without > opening them completely. That would seem like the ideal approach. That's the approach I am looking for, but I haven't found any API to do that. Best, G. smime.p7s Description: S/MIME cryptographic signature

Re: Retrieving the EXIF date/time from 250k images

2023-01-07 Thread Gabriel Zachmann via Cocoa-dev
rth considering. > -- > Gary L. Wade > http://www.garywade.com/ > >> On Jan 7, 2023, at 10:37 AM, Gabriel Zachmann via Cocoa-dev >> wrote: >> >> So, why would would several threads loading those images in parallel help >> here? In my thinking, they wil

Re: Retrieving the EXIF date/time from 250k images

2023-01-07 Thread Gabriel Zachmann via Cocoa-dev
Hi Alex, hi everyone, thanks a lot for the many suggestions! And sorry for following up on this so late! I hope you are still willing to engage in this discussion. Yes, Alex, I agree in that the main question is: how can I get the metadata of a large amount of images (say, 100k-300k) *without*

dictionaryWithObjects:keys: looses elements

2023-01-03 Thread Gabriel Zachmann via Cocoa-dev
I have this line in my code: NSDictionary * temp = [NSDictionary dictionaryWithObjects: imagefiles_ forKeys: datesAndTimes_ ]; The funny thing is: the input arrays (imagefiles_ and datesAndTimes_) both have 17 elements; however, the dictionary temp has only 7 elements afterwards! In the

Re: Proper way to retrieve the NSScreenNumber in a screen saver ?

2022-12-13 Thread Gabriel Zachmann via Cocoa-dev
. I am interested in the *screen* on which I am running, irrespective of whether it's inside System Prefs or as a fullscreen screensaver. Best regards, Gabriel >> On Dec 11, 2022, at 14:56, Gabriel Zachmann via Cocoa-dev >> wrote: >> >> ?Thanks again for the responses

Re: Proper way to retrieve the NSScreenNumber in a screen saver ?

2022-12-11 Thread Gabriel Zachmann via Cocoa-dev
kind of work-around for those cases, where this happens. Right? Best regards, Gabriel > >> On Nov 17, 2022, at 16:11, Gabriel Zachmann via Cocoa-dev >> wrote: >> >> ?Thanks a lot for your quick responses! >> >> I would like to understand what

How to convert path through container into standard form?

2022-12-11 Thread Gabriel Zachmann via Cocoa-dev
I have an NSURL * pictures_path; By default, this is set to pictures_path = [ [NSFileManager defaultManager] URLForDirectory: NSPicturesDirectory inDomain: NSUserDomainMask appropriateForURL: nil create: NO

Re: Proper way to retrieve the NSScreenNumber in a screen saver ?

2022-11-17 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your quick responses! I would like to understand what you are saying and what is going on, so please bear with me. So, Steve, if I understand correctly, you suggest to write: - (void) viewWillMoveToWindow: (NSWindow *) newWindow { unsigned long my_screen =

Proper way to retrieve the NSScreenNumber in a screen saver ?

2022-11-17 Thread Gabriel Zachmann via Cocoa-dev
In my screensaver (macOS), I am trying to retrieve the 'screen number' (NSScreenNumber) for the screen on which I am running. So, in - (void) viewWillMoveToWindow: (NSWindow *) newWindow I have this line of code: displayID_ = [ [[newWindow screen] deviceDescription] objectForKey:

Re: Screensaver Options under macOS 13 (Ventura) doesn't work

2022-11-10 Thread Gabriel Zachmann via Cocoa-dev
> >> On Nov 9, 2022, at 11:26, Gabriel Zachmann via Cocoa-dev >> wrote: >> >> I asked them to send the log file, but I could not find anything elucidating >> in the log. > > You didn?t do something like change the min version for your config xib? If I &

Re: Screensaver Options under macOS 13 (Ventura) doesn't work

2022-11-09 Thread Gabriel Zachmann via Cocoa-dev
> > I have a couple of custom screensavers where the button works, so it sounds > like this must be something with your setup. Perhaps looking at Console might > be helpful? > I asked them to send the log file, but I could not find anything elucidating in the log. Best regards, Gabriel

Screensaver Options under macOS 13 (Ventura) doesn't work

2022-11-06 Thread Gabriel Zachmann via Cocoa-dev
I've got a screensaver (sitting in System Preferences) that works fine under macOS 12.x and that still seems to work fine under macOS 13 (Ventura) - except that users cannot open the "Options" dialog any more! (I can't investigate directly, since I cannot upgrade to Ventura just yet). My

Re: Retrieving the EXIF date/time from 250k images

2022-08-16 Thread Gabriel Zachmann via Cocoa-dev
That is a good idea. Thanks a lot! Maybe, I can turn this into more fine-grained, dynamic load balancing (or latency hiding), as follows: create a number of threads (workers); as soon as a worker is finished with their "current" image, it gets the next one (a piece of work) out of the list,

Re: Retrieving the EXIF date/time from 250k images

2022-08-15 Thread Gabriel Zachmann via Cocoa-dev
> I noticed you release the fileProps but didn’t release the image, but I don’t > know if that’s one of those details you left out for clarity. Good point, and sorry for the confusion. Yes, I do release the image. > Also, depending on some factors like mutability, while the initWithString >

Re: Retrieving the EXIF date/time from 250k images

2022-08-15 Thread Gabriel Zachmann via Cocoa-dev
> I think an important question here is, what exactly are you trying to do? Do > you Good point, I should have mentioned it: I would like to sort the list of images by their EXIF date/time. > really expect to process these images repeatedly? 3.5m for a quarter million > pics isn't terrible

Retrieving the EXIF date/time from 250k images

2022-08-14 Thread Gabriel Zachmann via Cocoa-dev
I would like to collect the date/time stored in an EXIF tag in a bunch of images. I thought I could do so with the following procedure (some details and error checking omitted for sake of clarity): NSMutableArray * dates_and_times = [NSMutableArray arrayWithCapacity: [imagefiles count]];

Re: Mystery interference with AirPlay

2022-06-16 Thread Gabriel Zachmann via Cocoa-dev
I must be doing something pretty stupid: I don't see all those buttons, neither on my iPhone nor on my Macbook Pro. I tried these instructions: https://www.macrumors.com/how-to/airplay-from-iphone-to-mac/ with the TV app on iPhone. iPhone 12 with iOs 15.5 MacbookPro 2019 with macOS 12.4

Re: Mystery interference with AirPlay

2022-06-16 Thread Gabriel Zachmann via Cocoa-dev
> > I can’t point you in the right direction but find out what is acquiring the > audio device. Start with your multimedia playback code. What are you using > to play the ‘video’? I am not playing any videos - I am only showing images. Best regards, Gabriel smime.p7s Description: S/MIME

Re: Mystery interference with AirPlay

2022-06-15 Thread Gabriel Zachmann via Cocoa-dev
I am using only: o NSBeep() o NSSound 0 and link to these frameworks: CoreLocation, Foundation, Cocoa, ScreenSaver, QuartzCore, ApplicationServices, AppKit, Photos, MediaLibrary, IOKit Does any of those cause trouble? Best , G. smime.p7s Description: S/MIME cryptographic signature

Re: Mystery interference with AirPlay

2022-06-15 Thread Gabriel Zachmann via Cocoa-dev
There is no sound whatsoever from my app. Best, G. smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Mystery interference with AirPlay

2022-06-15 Thread Gabriel Zachmann via Cocoa-dev
I have a macOS app that plays a slideshow, and no music/sound whatsoever. One user has reported that whenever he launches my app, his music played over AirPlay stops. Does anyone have an idea what might be causing this? I have no clue where to search or what to look for. Making matters worse, I

Playing videos on CALayer ?

2022-03-28 Thread Gabriel Zachmann via Cocoa-dev
Currently, my app displays images on a CALayer, with some basic animation like so: CABasicAnimation * anim = [CABasicAnimation animationWithKeyPath: @"bounds.size"]; Now, I would like to include videos, too. So, first of all, how would I put videos on such a CALayer, so that they get

Re: Lock screen ?

2022-03-27 Thread Gabriel Zachmann via Cocoa-dev
> I did a similar thing for a remote control server I made for the Mac. You can > look at the window level or at capture screen depending on what you want to > achieve. What does that mean? Sorry , I am just a casual Mac programmer. (I used to code under Unix/Linux in C++, now not so much

Re: Lock screen ?

2022-03-27 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your response and for your link! > http://www.albertopasca.it/whiletrue/swift-c-lock-macos-programmatically/ Would a macOS appeasing that approach get through the app store approval process? Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature

Lock screen ?

2022-03-26 Thread Gabriel Zachmann via Cocoa-dev
Is it possible for a macOS app to lock the screen while it is running, so that users need to enter their password when clicking the mouse or hitting a specific key? Similar to what macOS does when a screensaver is running? In particular, is it possible to do so in full-screen mode? Best

Re: Building for 10.12

2022-03-20 Thread Gabriel Zachmann via Cocoa-dev
>> My question now is: why did Xcode not warn me about that function, even >> though the deployment target was set to 10.12 ? > The deployment target not a compiler setting. It is more of a runtime > thing. So if you set the deployment target to 13.0 it will not launch on > macOS 12, for

Re: Building for 10.12

2022-03-20 Thread Gabriel Zachmann via Cocoa-dev
I have now the crash report. Apparently, this caused it: Symbol not found: _AVAudioSessionInterruptionNotification Yes, I am using that function, and yes, it seems to be available only on macOS 11 and higher. My question now is: why did Xcode not warn me about that function, even though

Re: Building for 10.12

2022-03-18 Thread Gabriel Zachmann via Cocoa-dev
>>> Make sure you have the 10.12 SDK installed in your Xcode. To find out >>> what Actually, it seems I wouldn't need older SDK's any more, see, for instance: https://developer.apple.com/forums/thread/82518 And some people even say it could be harmful to have multiple SDK's with Xcode

Re: Building for 10.12

2022-03-18 Thread Gabriel Zachmann via Cocoa-dev
>> I am trying to build my app for macOS 10.12 (Sierra). >> >> First of all, is it correct that I need to build it for "My Mac" , not do a >> niversal build (Any Mac)? > If you are only building to debug it then My Mac is fine. But if you > are building to send out to customers then you

Building for 10.12

2022-03-18 Thread Gabriel Zachmann via Cocoa-dev
I am trying to build my app for macOS 10.12 (Sierra). First of all, is it correct that I need to build it for "My Mac" , not do a niversal build (Any Mac)? Second, I have been switching the scheme to build for "My Mac", but when I archive it to notarize it and export it, I still get a

Building for 10.12

2022-03-18 Thread Gabriel Zachmann via Cocoa-dev
PS: I have, of course, switched the Deployment Target to 10.12, but I am working on macOS 12.1 and Xcode 13.3. (Sorry for not mentioning earlier) smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list

Re: New (?) behavior of screensavers wrt. keyboard clicks

2022-03-17 Thread Gabriel Zachmann via Cocoa-dev
Thanks a million. That fits the bill. Best regards, Gabriel > On 17. Mar 2022, at 14:23, Richard Somers wrote: > > Perhaps this may help. > > https://discussions.apple.com/thread/8329971 > > Best regards, Richard > > >> On Mar 17, 2022, at 4:59 AM, Gabriel

Re: New (?) behavior of screensavers wrt. keyboard clicks

2022-03-17 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot. So it's rather a glitch on my machine, I guess. On my end, the "alert" sound occurs with Apple's screensavers, too. Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list

New (?) behavior of screensavers wrt. keyboard clicks

2022-03-15 Thread Gabriel Zachmann via Cocoa-dev
It used to be the case that a screensaver (launched by macOS) was terminated as soon as the user wiggled the mouse, or clicked a keyboard key. Now, at least on my macbook, I just get the alert sound (a blip in my case). It sounds as if there was an app that didn't respond to the event. (Yes, I

Re: Problem with rangeOfString and Umlauts

2022-03-14 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your insights! (I'm cc'ing the mailinglist, just in case someone else later stumbles across this.) Best, G. > On 14. Mar 2022, at 14:57, Aandi Inston wrote: > > This is largely from memory, so details might be wrong. > Normalisation is an insufficiently known thing to

Re: Problem with rangeOfString and Umlauts

2022-03-14 Thread Gabriel Zachmann via Cocoa-dev
> > It’s hard to tell from the above snippet, but I suspect your strings are > different in normalization. I suspected that, too, but I have no expertise in normalization. > Specifically, I suspect that file_basename uses two Unicode codepoints for > the ä, and info_item uses only one. > > As

Problem with rangeOfString and Umlauts

2022-03-11 Thread Gabriel Zachmann via Cocoa-dev
Well, SSIA. In more detail, I've got two strings: file_basename = @"Morgendämmerung (1)" info_item = @"Morgendämmerung" This code NSString * prefix = [ info_item commonPrefixWithString: file_basename options: NSCaseInsensitiveSearch ]; unsigned int prefix_len = (unsigned int) [prefix

Re: Indexing broken for one project

2022-02-14 Thread Gabriel Zachmann via Cocoa-dev
> > In Monterey, /tmp is now only writeable by root. It is? I have been storing temp files in /tmp all my life (output from all kinds of programs), and did not notice a change when upgrading to Monterey. /Users/zach% cd /tmp /private/tmp% ls -ld . drwxrwxrwt 17 root wheel 544 Feb 14 12:00

Re: Indexing broken for one project

2022-02-13 Thread Gabriel Zachmann via Cocoa-dev
> This seems to indicate an error somewhere in the Xcode prefs. Oh, wow, maybe I have resolved the issue! The Derived Data directory is set to /tmp (i have had that setting for years). Now, in Xcode / Preferences / Locations / Derived Data / Advanced, I set Custom = Relative to Derived Data.

Re: Indexing broken for one project

2022-02-13 Thread Gabriel Zachmann via Cocoa-dev
> > Sort of straw-grasping I would try with Xcode under these circumstances? > > Try changing the target CPU/OS setting to something else, build, and see if > the indexing works. > > If it does, make the minimal changes needed to appropriately build your > target. > Thanks a lot for the straw ,

Re: Indexing broken for one project

2022-02-13 Thread Gabriel Zachmann via Cocoa-dev
This is, indeed, strange. I tried it, as you suggested, with a new user account on the very same machine. Everything works just fine in a copy of the project under that pristine account. Even when I launch the .xcodeproject in my real home, the indexing works. It just does not work in my home.

Re: Indexing broken for one project

2022-02-12 Thread Gabriel Zachmann via Cocoa-dev
Here is another attempt at getting to the root of the indexer problem I am experiencing. First of all, thanks a lot for your helpful hints, albeit they did not resolve the issue. Here is - for recap - the description in a nutshell of my original post: A few weeks ago, indexing in

Re: Indexing broken for one project

2022-02-06 Thread Gabriel Zachmann via Cocoa-dev
> I have come across issues where a code syntax error messes up indexing—are > you able to do a full, successful compilation? Yes, I think so. Have done Product / Clean Build Folder , then quit Xcode, then launched again. The project builds fine, no warnings. But I still have a hunch it's in

Re: Indexing broken for one project

2022-02-06 Thread Gabriel Zachmann via Cocoa-dev
e directory, like I > do, so you can keep your build products with your code. > > Hope that helps. > > —Rob > > >> On Feb 6, 2022, at 6:20 AM, Gabriel Zachmann via Cocoa-dev >> wrote: >> >> A few weeks ago, indexing in Xcode 13 stopped working for one of m

Indexing broken for one project

2022-02-06 Thread Gabriel Zachmann via Cocoa-dev
PS: I have also done this defaults write com.apple.dt.Xcode IDEIndexShowLog -bool YES Now, in the indexing log I can see in Xcode, there are a lot of messages "Crash detected during compilation". But I still don't get a clue as to what might be causing this. smime.p7s Description:

Indexing broken for one project

2022-02-06 Thread Gabriel Zachmann via Cocoa-dev
A few weeks ago, indexing in Xcode 13 stopped working for one of my projects. So, for instance, "Jump to Definition" does not work any more. I don't know what stopped indexing to work. The project consists of objective-c source code. For other projects, indexing still works fine. I have tried to

Photos access under macOS Monterey ?

2022-01-14 Thread Gabriel Zachmann via Cocoa-dev
I was wondering if anything regarding the accessing of photos has changed under macOS Monterey or Big Sur. For a number if macOS generations, it was no longer possible to access the photos from an app using PhotoKit. Even with the proper capabilities this was not possible any more, because,

Re: Sandboxing question regarding ~/Pictures

2021-09-27 Thread Gabriel Zachmann via Cocoa-dev
Yes, my app does have that entitlement: com.apple.security.app-sandbox com.apple.security.application-groups V362FCBY2W.de.zach.ArtSaverGroup com.apple.security.assets.pictures.read-write

Sandboxing question regarding ~/Pictures

2021-09-27 Thread Gabriel Zachmann via Cocoa-dev
I guess i still haven't understood something about sandboxing or entitlements. I am trying to access the user's ~/Pictures folder, and also create a security-scoped bookmark (SSB) for that folder. Under the target's Signing & capabilities section, File Access Type, I have set "Pictures Folder"

Accessing ~/Pictures under Mojave from screensaver ?

2021-09-26 Thread Gabriel Zachmann via Cocoa-dev
In my screensaver, I'd like to search the ~/Pictures for images. I would like to use that folder as a default, without requiring the user to open it for me. Under macOS Mojave (10.14), the ScreenSaverEngine has these entitlements: com.apple.developer.extension-host.screensaver

Entitlements of ScreenSaverEngine under macOS Mojave (10.14)

2021-09-20 Thread Gabriel Zachmann via Cocoa-dev
Does anybody still have access to a Mac running Mojave? (10.14) If yes, could you please send me the output of codesign -dvvv --entitlements :- /System/Library/CoreServices/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine (I hope it is the correct path.) What I am interested in is the

Re: App can't be opened

2021-09-15 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for the insight. Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

  1   2   3   4   >