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 && win_rect.siz

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

2023-08-19 Thread Angela Brett via Cocoa-dev
> > > Now, this does not work any more on Mac's with "the notch". > At least, the Quicktime full-screen window, and a youtube video playing in > Safari in full-screen, is smaller than the mainScreen.frame.size . Have you tried using mainScreen.visibleFrame, or adjusting mainScreen.frame with

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 Descripti

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 full-sc

Re: How to convert path through container into standard form?

2022-12-11 Thread Sandor Szatmari via Cocoa-dev
I was thinking that’d break sandbox encapsulation. But I guess what really matters is what you get when you do the reverse and expand the tilde? > > On Dec 11, 2022, at 17:58, Ben Kennedy via Cocoa-dev > wrote: > >  > >> On 11 Dec 2022, at 12:51 pm, Mike Abdullah via Cocoa-dev >> wrote:

Re: How to convert path through container into standard form?

2022-12-11 Thread Ben Kennedy via Cocoa-dev
> On 11 Dec 2022, at 12:51 pm, Mike Abdullah via Cocoa-dev > wrote: > > Have you tried -URLByResolvingSymlinksInPath? As far as I’m aware, the > Pictures entry inside your container is a symlink to the real thing, so > assuming you have appropriate entitlements, should be possible to resolve

Re: How to convert path through container into standard form?

2022-12-11 Thread Sandor Szatmari via Cocoa-dev
Looking back, I guess you’d bump up against the sandbox with this… > > On Dec 11, 2022, at 16:21, Sandor Szatmari > wrote: > > -stringByAbbreviatingWithTildeInPath > > First page in google results > >> On Dec 11, 2022, at 15:06, Gabriel Zachmann via Cocoa-dev >> wrote: >> >>  >> I have

Re: How to convert path through container into standard form?

2022-12-11 Thread Sandor Szatmari via Cocoa-dev
-stringByAbbreviatingWithTildeInPath First page in google results > On Dec 11, 2022, at 15:06, Gabriel Zachmann via Cocoa-dev > wrote: > >  > I have an NSURL * pictures_path; > > By default, this is set to > > pictures_path = [ [NSFileManager defaultManager] URLForDirectory: > NSPictures

Re: How to convert path through container into standard form?

2022-12-11 Thread Mike Abdullah via Cocoa-dev
Have you tried -URLByResolvingSymlinksInPath? As far as I’m aware, the Pictures entry inside your container is a symlink to the real thing, so assuming you have appropriate entitlements, should be possible to resolve it. Mike. > On 11 Dec 2022, at 10:56, Gabriel Zachmann via Cocoa-dev > wrote

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 error

Re: How to distinguish between different MS Teams statuses

2021-07-23 Thread Gabriel Zachmann via Cocoa-dev
>> So far, i have been checking whether or not MS Teams is running by the >> following snippet (omitting some of the safety guards): > > That code is answering the wrong question. It might appear to provide the > state of some running apps, but all it actually does is indicate the presence > of

Re: How to distinguish between different MS Teams statuses

2021-07-23 Thread Gabriel Zachmann via Cocoa-dev
> It seems that it would be tough. How can you check if it’s happening in a > browser? yes, any video conferencing via browser is pretty much undetectable , I guess. That is OK. I would be happy if I could detect some of the more common video conferencing tools. With Zoom, Webex, and GoToMeeti

Re: How to distinguish between different MS Teams statuses

2021-07-22 Thread Alex Zavatone via Cocoa-dev
It seems that it would be tough. How can you check if it’s happening in a browser? And what if I move the window to the other monitor? > On Jul 22, 2021, at 12:45 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > My questions is quite simple: > is it possible to determine - in my own app - whet

Re: How to distinguish between different MS Teams statuses

2021-07-22 Thread Ben Kennedy via Cocoa-dev
> On 22 Jul 2021, at 10:45 am, Gabriel Zachmann via Cocoa-dev > wrote: > > is it possible to determine - in my own app - whether or not there is an MS > Teams video call taking place at the moment? The only correct answer to that depends on whether Microsoft Teams provides API that vends su

How to distinguish between different MS Teams statuses

2021-07-22 Thread Gabriel Zachmann via Cocoa-dev
My questions is quite simple: is it possible to determine - in my own app - whether or not there is an MS Teams video call taking place at the moment? So far, i have been checking whether or not MS Teams is running by the following snippet (omitting some of the safety guards): let mainScreen =

Re: How to check signature and notarization?

2021-04-13 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot to all of you! This is very helpful! Best regards, Gabriel > On 13. Apr 2021, at 00:45, Jack Brindle wrote: > > Quick followup: > > Howard’s app: ArchiChect will do the job you need. The product page is at: > > https://eclecticlight.co/32-bitcheck-archichect/ > > And it is fr

Re: How to check signature and notarization?

2021-04-12 Thread Jack Brindle via Cocoa-dev
Quick followup: Howard’s app: ArchiChect will do the job you need. The product page is at: https://eclecticlight.co/32-bitcheck-archichect/ And it is free! Jack > On Apr 12, 2021, at 3:40 PM, Jack Brindle via Cocoa-dev > wrote: > > From the code sign man page: > codesign --display --verbos

Re: How to check signature and notarization?

2021-04-12 Thread Jack Brindle via Cocoa-dev
From the code sign man page: codesign --display --verbose=4 Terminal.app replace Terminal.app with your application name (be sure to unzip first). The information shown will tell you whether it is has a valid signature. You might try it on a few other apps just to see what that looks like. Be su

Re: How to check signature and notarization?

2021-04-12 Thread Sean McBride via Cocoa-dev
On Mon, 12 Apr 2021 18:36:12 +0200, Gabriel Zachmann via Cocoa-dev said: >Is there a way to check that the signature and notarization is proper? >Are there any other checks I can do to determine what is going wrong? You might find this helpful:

Re: How to check signature and notarization?

2021-04-12 Thread Marco S Hyman via Cocoa-dev
I don’t know about zip file distribution, but I have both the app AND the dmg that I use for distribution notarized. I create the DMG from a folder containing the notarized app and a link to /Applications then run codesign on the DMG and upload the result to Apple for notarization. Once notar

How to check signature and notarization?

2021-04-12 Thread Gabriel Zachmann via Cocoa-dev
I am distributing my app using a simple zip file. Now, I have a few users (only a few it seems) who get the error message ".. can't be opened because Apple cannot check it for malicious software" when they try to run it. I am pretty positive I did sign and notarize it before exporting the archive

Re: How to parse a log file

2020-10-27 Thread Steven Mills via Cocoa-dev
On Oct 27, 2020, at 00:54:40, Rob Petrovec wrote: > > While I agree this would be a good thing to have, I don’t see how Xcode > could find the dSYM to use given that they are typically ephemeral. The dSYM > is tied to the build. So if you build your project twice you will have two > di

Re: How to parse a log file

2020-10-26 Thread Alex Zavatone via Cocoa-dev
If you upload your build (iOS) to the iTunes connect, I do believe that the dSym goes up as well. Look at the build script for Crashlytics. It makes sure to upload your dSyms and does the symbolicating for iOS apps. The process already exists with these and other crash tracking tools. It’s pr

Re: How to parse a log file

2020-10-26 Thread Rob Petrovec via Cocoa-dev
> On Oct 26, 2020, at 10:00 PM, Steven Mills via Cocoa-dev > wrote: > > >> On Oct 26, 2020, at 17:49:59, James Walker via Cocoa-dev >> wrote: >> >> I don't see any "Download Debug Symbols" in the Organizer. I don't think it >> exists for macOS apps. >> >> However, one can right-click on

Re: How to parse a log file

2020-10-26 Thread Steven Mills via Cocoa-dev
> On Oct 26, 2020, at 17:49:59, James Walker via Cocoa-dev > wrote: > > I don't see any "Download Debug Symbols" in the Organizer. I don't think it > exists for macOS apps. > > However, one can right-click on an archive and select "Show In Finder", then > once in Finder right-click again a

Re: How to parse a log file

2020-10-26 Thread James Walker via Cocoa-dev
On 10/26/20 3:31 PM, Alex Zavatone via Cocoa-dev wrote: As a note to Jens’s tip, it’s important to keep the .dSWM files for your releases so that you can symbolicate your crash logs. Crashlytics does this for you, but the debug symbols are stripped from released builds to try and prevent peop

Re: How to parse a log file

2020-10-26 Thread Alex Zavatone via Cocoa-dev
As a note to Jens’s tip, it’s important to keep the .dSWM files for your releases so that you can symbolicate your crash logs. Crashlytics does this for you, but the debug symbols are stripped from released builds to try and prevent people from reverse engineering your code and to make the exec

Re: How to parse a log file

2020-10-26 Thread Alex Zavatone via Cocoa-dev
Starting with Gabriel’s comment. We can see that at line 2, we have this. NSCFString characterAtIndex: And on line 1, we have the thrown exception. If I’m correct, the assumption here is thatthe operation is trying to get the first character of a a string at index 0 and there isn’t any, so the

Re: How to parse a log file

2020-10-26 Thread Jens Alfke via Cocoa-dev
> On Oct 26, 2020, at 3:01 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > Is it possible to determine the exact line in the source code where the error > occurred? The "+ " thing in each stack line is the byte offset from the start of the function, in the machine code. Not super useful

Re: How to parse a log file

2020-10-26 Thread Gary L. Wade via Cocoa-dev
Line 7 appears to show your app allocating an array with one of its objects being nil. -- Gary L. Wade http://www.garywade.com/ > On Oct 26, 2020, at 3:02 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > From a user, I received a log file that contains an error (see below) > and a stack trace

How to parse a log file

2020-10-26 Thread Gabriel Zachmann via Cocoa-dev
From a user, I received a log file that contains an error (see below) and a stack trace of my macOS app. Is it possible to determine the exact line in the source code where the error occurred? Best regards, Gabriel Encl: excerpt from log. "ArtSaverApp" is my macOS app. 2020-10-23 10:47:30.4

Re: How to refund a customer on mac app store?

2020-10-25 Thread Sandy McGuffog via Cocoa-dev
You can’t. The customer needs to contact Apple directly. > On Oct 25, 2020, at 4:30 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > Is it possible to give a refund to a customer who has bought my app on the > Mac App Store? > > Best regards, Gabriel > > > ___

How to refund a customer on mac app store?

2020-10-25 Thread Gabriel Zachmann via Cocoa-dev
Is it possible to give a refund to a customer who has bought my app on the Mac App Store? Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

Re: How to reposition subviews without Auto Layout

2020-10-18 Thread Andreas Falkenhahn via Cocoa-dev
I didn't know about that. That's why I was asking the question :) I guess your answer is what I was looking for originally but since simply overriding "layout" does the job as well I'll just leave it like it is. On 17.10.2020 at 23:57 Richard Charles wrote: > So why not just do this. > [myVie

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Richard Charles via Cocoa-dev
So why not just do this. [myView translatesAutoresizingMaskIntoConstraints:NO]; [myView setAutoresizingMask:myMask]; --Richard Charles > On Oct 17, 2020, at 2:47 PM, Andreas Falkenhahn > wrote: > > No, they are inserted programmatically. > >> On 17.10.2020 at 18:41 Richard Charles wrote: >>

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Andreas Falkenhahn via Cocoa-dev
Yeah, that's fine with me. I don't care what's going on under the hood as long as I'm not bothered with the Autolayout API ;) On 17.10.2020 at 18:52 Rob Petrovec wrote: > As was pointed out by an earlier reply, even if you use -layout or > setAutoresizingMask you are still using auto layout. The

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Andreas Falkenhahn via Cocoa-dev
No, they are inserted programmatically. On 17.10.2020 at 18:41 Richard Charles wrote: > Just curious if these three subviews are in a nib or xib file or > are they inserted into the content view programmatically? > --Richard Charles >> On Oct 17, 2020, at 9:46 AM, Andreas Falkenhahn >> wrote

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Jean-Daniel via Cocoa-dev
If you want to be pedantic, I would rather say "without using Auto Layout constraints ». Even the -layout method is part of the AutoLayout API. > Le 17 oct. 2020 à 18:52, Rob Petrovec via Cocoa-dev > a écrit : > > As was pointed out by an earlier reply, even if you use -layout or > setAutore

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Rob Petrovec via Cocoa-dev
As was pointed out by an earlier reply, even if you use -layout or setAutoresizingMask you are still using auto layout. The frame changes get converted to auto layout constraints under the hood. If you said “without using Autolayout API” that would be more correct. —Rob > On Oct 17, 2020, at

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Richard Charles via Cocoa-dev
Just curious if these three subviews are in a nib or xib file or are they inserted into the content view programmatically? --Richard Charles > On Oct 17, 2020, at 9:46 AM, Andreas Falkenhahn > wrote: > > Thanks, out of curiosity I've tried to override the "layout" method and see > if it wor

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Andreas Falkenhahn via Cocoa-dev
Thanks, out of curiosity I've tried to override the "layout" method and see if it works and it indeed does. So it looks like simply overriding the "layout" method and doing the positioning and sizing there is also possible without using any Auto Layout features whatsoever... On 17.10.2020 at 16

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread じょいすじょん via Cocoa-dev
> On Oct 17, 2020, at 9:57 PM, Andreas Falkenhahn via Cocoa-dev > wrote: > > Hi, > > I have an NSView that I set as the content view of my NSWindow. The NSView > has three subviews. Where should I reposition and resize those three subviews > when the NSWindow size changes? > > I see that

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Richard Charles via Cocoa-dev
You could call this method on your three views. -[NSViewView setAutoresizingMask:] --Richard Charles > On Oct 17, 2020, at 6:57 AM, Andreas Falkenhahn via Cocoa-dev > wrote: > > Hi, > > I have an NSView that I set as the content view of my NSWindow. The NSView > has three subviews. Where s

How to reposition subviews without Auto Layout

2020-10-17 Thread Andreas Falkenhahn via Cocoa-dev
Hi, I have an NSView that I set as the content view of my NSWindow. The NSView has three subviews. Where should I reposition and resize those three subviews when the NSWindow size changes? I see that NSView has a "layout" method that can be overridden but AFAIU this is only to be used for Aut

How to sample MTLPixelFormatR32Float in Metal buffers and/or textures?

2020-06-10 Thread Demitri Muna via Cocoa-dev
Hi, I have float array data that I want to use to create images in Metal. My plan is to apply one or more shaders to the data, then render it into a new RGB texture and continue from there. I’m using MTLPixelFormatR32Float as the source pixel format with success. In all the kernel examples I s

Re: How to save a window's position and size

2020-05-25 Thread Carl Hoefs via Cocoa-dev
You could try setting your self.masterViewController.view as self.window's initial first responder. (But I get the feeling you're "fighting the Frameworks" here...) -Carl > On May 25, 2020, at 11:48 AM, Gabriel Zachmann wrote: > > Thanks a lot for the response. >> >> [self.window setFrame

Re: How to save a window's position and size

2020-05-25 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for the response. > >[self.window setFrame:[[NSScreen mainScreen] frame] display:YES]; It sort of works, but the window still has borders. I tried this: [self.window toggleFullScreen: nil]; and it makes the app start in real full-screen (no window borders), but then it does

Re: How to save a window's position and size

2020-05-25 Thread Carl Hoefs via Cocoa-dev
Something like this would work (in -applicationWillFinishLaunching:): [self.window setFrame:[[NSScreen mainScreen] frame] display:YES]; -Carl > On May 24, 2020, at 3:09 PM, Gabriel Zachmann wrote: > > Alternatively, is there a way to start it such that it always starts in > fullscreen, >

Re: How to save a window's position and size

2020-05-24 Thread Gabriel Zachmann via Cocoa-dev
>> >> No guarantees, but you could try moving your code into an AppDelegate method >> that gets invoked earlier: >> >> - (void)applicationWillFinishLaunching:(NSNotification *)notification; >> Sorry for bothering again. The above solutions works very well. Now I would like to make my app sta

Re: How to save a window's position and size

2020-05-23 Thread Gabriel Zachmann via Cocoa-dev
Looks good! Thanks! > On 23. May 2020, at 21:59, Carl Hoefs wrote: > > No guarantees, but you could try moving your code into an AppDelegate method > that gets invoked earlier: > > - (void)applicationWillFinishLaunching:(NSNotification *)notification; > > -Carl > smime.p7s Description: S

Re: How to save a window's position and size

2020-05-23 Thread Sandor Szatmari via Cocoa-dev
Gabriel, > On May 23, 2020, at 15:54, Gabriel Zachmann via Cocoa-dev > wrote: > > Actually, after observing the new behavior for a while, > I have to say it's "almost" perfect. > > The window still opens at some funny position with a smallish size (where is > that stored?), > but with no co

Re: How to save a window's position and size

2020-05-23 Thread Carl Hoefs via Cocoa-dev
No guarantees, but you could try moving your code into an AppDelegate method that gets invoked earlier: - (void)applicationWillFinishLaunching:(NSNotification *)notification; -Carl > On May 23, 2020, at 12:53 PM, Gabriel Zachmann wrote: > > Actually, after observing the new behavior for a wh

Re: How to save a window's position and size

2020-05-23 Thread Gabriel Zachmann via Cocoa-dev
Actually, after observing the new behavior for a while, I have to say it's "almost" perfect. The window still opens at some funny position with a smallish size (where is that stored?), but with no content, just grey inside, for a split second, then it snaps to the autosaved position/size. It's

Re: How to save a window's position and size

2020-05-23 Thread Gabriel Zachmann via Cocoa-dev
Seems to work like a charm! thanks a lot. (For the record: [self.window setDelegate: self]; has to be done before setFrameAutosaveName.) Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Co

Re: How to save a window's position and size

2020-05-22 Thread Carl Hoefs via Cocoa-dev
but awakeFromNib never gets called. > > I defined -windowDidLoad in the app delegate, but that, too, never gets > called. > (However, other methods like windowWillClose or windowDidEndLiveResize do get > called.) > > Any hints how to achieve the goal will be appreciated. >

How to save a window's position and size

2020-05-22 Thread Gabriel Zachmann via Cocoa-dev
indowDidLoad in the app delegate, but that, too, never gets called. (However, other methods like windowWillClose or windowDidEndLiveResize do get called.) Any hints how to achieve the goal will be appreciated. Best regards, Gabriel smime.p7s Description: S/MIME cryptogr

How to ask user to grant access ?

2020-03-13 Thread Gabriel Zachmann via Cocoa-dev
PS: So far, I am not even getting permissions within the same app invocation. What I have tried is, when I hit an alias that is also a directory, I open an NSOpenPanel with setDirectoryURL: resolved URL of the alias. The user hits OK, then I try to set up an enumerator with that URL. However,

How to ask user to grant access ?

2020-03-13 Thread Gabriel Zachmann via Cocoa-dev
I am doing a directory enumeration , collecting a list of files for accessing them later. When I encounter aliases / symlinks, I would like to follow them. As far as I understand, in a sandboxed app, I need to ask the user to grant my app access to the directories the aliases point to. I guess I

How to present a web view while supporting 10.9?

2020-02-06 Thread John Brownie via Cocoa-dev
My app currently supports 10.9, and I want to add a feature that displays an HTML document stored locally (in the bundle). The obvious way is to have a window which contains a web view. However, WKWebView is only available in 10.10, and WebView is deprecated. If it were a matter of calling a m

Re: How to check whether directory tree has changed?

2019-12-21 Thread Sandor Szatmari via Cocoa-dev
> On Dec 21, 2019, at 13:43, Jens Alfke wrote: > >  > >> On Dec 21, 2019, at 10:18 AM, Gabriel Zachmann via Cocoa-dev >> wrote: >> >> Right. I was hoping there is an easy way to do this. >> Something like a recursive check sum over the whole directory tree that the >> OS might keep. >> I

Re: How to check whether directory tree has changed?

2019-12-21 Thread Jens Alfke via Cocoa-dev
> On Dec 21, 2019, at 10:18 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Right. I was hoping there is an easy way to do this. > Something like a recursive check sum over the whole directory tree that the > OS might keep. > I don't want to do a complete tree traversal every time the app la

Re: How to check whether directory tree has changed?

2019-12-21 Thread Jim Crate via Cocoa-dev
You want the FSEvents API. I’m pretty sure you can specify the start time for the events, and subdirectories are included. My app specifically discards events before I start monitoring. Jim Crate > On Dec 21, 2019, at 11:09, Gabriel Zachmann via Cocoa-dev > wrote: > > Is there a quick and

Re: How to check whether directory tree has changed?

2019-12-21 Thread Allan Odgaard via Cocoa-dev
On 22 Dec 2019, at 1:18, Gabriel Zachmann wrote: Right. I was hoping there is an easy way to do this. There is the File System Events API: https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html __

Re: How to check whether directory tree has changed?

2019-12-21 Thread Gabriel Zachmann via Cocoa-dev
> Are you looking to detect changes that happen in between launches of your > app? If so you’d have to save state and compare that saved state to the dir > contents each time the app is launched. Right. I was hoping there is an easy way to do this. Something like a recursive check sum over the

Re: How to check whether directory tree has changed?

2019-12-21 Thread Sandor Szatmari via Cocoa-dev
> On Dec 21, 2019, at 12:56, Gabriel Zachmann wrote: > >  > Thanks a lot! > > Does it really watch subfolders, too? The docs can answer this better I. > > Also, it seems to me like it works only while the program is running. > > I am mostly interested in changes that happen "behind the pro

Re: How to check whether directory tree has changed?

2019-12-21 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot! Does it really watch subfolders, too? Also, it seems to me like it works only while the program is running. I am mostly interested in changes that happen "behind the program's back", i.e., while it is *not* running. Does your code really handle that? Best regards, Gabriel > I’ve

Re: How to check whether directory tree has changed?

2019-12-21 Thread Sandor Szatmari via Cocoa-dev
I’ve used dispatch stuff. I found this with a quick google… it should be close to what one would need to monitor a folder. int fildes = open("/path/to/directory", O_RDONLY); dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_source_t source = dispa

How to check whether directory tree has changed?

2019-12-21 Thread Gabriel Zachmann via Cocoa-dev
Is there a quick and easy way to check whether or not a directory tree has changed? I am only interested in file additions or deletions, somewhere beneath a specific root directory, e.g., ~/Data/some_directory. However, I am interested in such changes between different invocations of my progra

Re: How to compile for macOS 10.11 ?

2019-10-11 Thread Jens Alfke via Cocoa-dev
> On Oct 11, 2019, at 1:36 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > But a customer tells me that it does not work under El Capitan on their > machine. > It displays the message "This screen saver requires OS X 10.14". If the alert is that specific, it sounds like your bundle has an In

How to compile for macOS 10.11 ?

2019-10-11 Thread Gabriel Zachmann via Cocoa-dev
I have some code that works fine in macOS 10.14. The only warnings I get during compilation are related to the GUI (about clipping and constraints and the like). Now I would like to compile this for 10.11 (El Capitan). Problem is, I only have one Macbook running 10.14 In Xcode, I switched the de

How to have users select a directory

2019-09-25 Thread Gabriel Zachmann via Cocoa-dev
I am looking for a nice, intuitive way to let users select a directory. Right now, I have a simple TextField in my GUI that shows the current path, and a simple Button next to it that says "Change". When users click on it, it opens an NSOpenPanel that is runModal. This works fine, but I am wonder

Animating bounds/position when layer.transform is set, or how to orient an image

2019-09-23 Thread Gabriel Zachmann via Cocoa-dev
Have a layer that displays an image and has some animations attached. The animations modify layer.bounds (just the size changes) and layer.position . Everything works fine, EXCEPT when the image's orientation EXIF flag is set. So, I am also setting the layer.transform to a transformation that br

Re: How to get log from user

2019-06-14 Thread Leo 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: https://lists.apple.c

How to get log from user

2019-06-11 Thread Gabriel Zachmann via Cocoa-dev
I have a bit of trouble getting a relevant log from a user. I asked him to invoke Console.app, type the keyword of my log messages in the search box, then run my app, then send me all the messages. Unfortunately, no message appear in Console.app. He has sent me a screenshot of Console.app, too. T

Re: How to clear macOS app bundle cache

2018-09-08 Thread Tor Arne Vestbø
> On 8 Sep 2018, at 21:20, Andreas Falkenhahn wrote: > > Unfortunately not. I can see my app in the lsdump and the path points to the > network share but purging the LS database doesn't have any effect. macOS > still loads the old version of my app, not the latest one on the share. Only > by re

Re: How to clear macOS app bundle cache

2018-09-08 Thread Andreas Falkenhahn
On 07.09.2018 at 23:45 Sean McBride wrote: > On Mon, 3 Sep 2018 15:31:37 +0200, Andreas Falkenhahn said: >>Optimally, I'm looking for a solution to flush the app bundle cache on >>the iMac from the makefile that I run on the Mac Mini I use for building. > Not sure what "the app bundle cache" is

Re: How to clear macOS app bundle cache

2018-09-07 Thread Sean McBride
On Mon, 3 Sep 2018 15:31:37 +0200, Andreas Falkenhahn said: >Optimally, I'm looking for a solution to flush the app bundle cache on >the iMac from the makefile that I run on the Mac Mini I use for building. Not sure what "the app bundle cache" is, but maybe nuking the LaunchServices db would hel

Re: How to clear macOS app bundle cache

2018-09-06 Thread Alastair Houghton
On 6 Sep 2018, at 13:59, Andreas Falkenhahn wrote: > > On 06.09.2018 at 11:31 Alastair Houghton wrote: > >> On 6 Sep 2018, at 05:23, Jeff Szuhay wrote: >> Did you try clearing the defaults persistent domain in your code? >> I don’t think that is likely to help. Andreas was complaining that >> t

Re: How to clear macOS app bundle cache

2018-09-06 Thread Andreas Falkenhahn
On 06.09.2018 at 11:31 Alastair Houghton wrote: > On 6 Sep 2018, at 05:23, Jeff Szuhay wrote: > Did you try clearing the defaults persistent domain in your code? > I don’t think that is likely to help. Andreas was complaining that > the code in his bundle was being cached somewhere, so when he >

Re: How to clear macOS app bundle cache

2018-09-06 Thread Alastair Houghton
On 6 Sep 2018, at 05:23, Jeff Szuhay wrote: > > Did you try clearing the defaults persistent domain in your code? I don’t think that is likely to help. Andreas was complaining that the code in his bundle was being cached somewhere, so when he rebuilt it didn’t always load the new version. User

Re: How to clear macOS app bundle cache

2018-09-05 Thread Jeff Szuhay
Did you try clearing the defaults persistent domain in your code? Something like the following (the juicy bits are in red) : NSUserDefaults * myAppDefaults; myAppDefaults = [[NSUserDefaults alloc] initWithSuiteName: (NSString*) myAppBundleID ]; then, to clear: #if de

Re: How to clear macOS app bundle cache

2018-09-05 Thread Alastair Houghton
On 4 Sep 2018, at 19:57, Andreas Falkenhahn wrote: > > On 04.09.2018 at 18:27 Marco S Hyman wrote: > >> Have you tried disabling SMB client side caching? >> https://support.apple.com/en-us/HT207520 > > Doesn't change anything. Maybe because the share is SMB 1, not SMB 2 or 3 as > stated in th

Re: How to clear macOS app bundle cache

2018-09-04 Thread Andreas Falkenhahn
On 04.09.2018 at 21:02 Alex Zavatone wrote: > I meant just the bundle for your app. If you get the wrong bundle > and you know it, what would happen if you deleted or renamed that bundle, > even if only temporarily? > Would it force the new bundle to resolve? Yes, but once again, I can have tha

Re: How to clear macOS app bundle cache

2018-09-04 Thread Alex Zavatone
I meant just the bundle for your app. If you get the wrong bundle and you know it, what would happen if you deleted or renamed that bundle, even if only temporarily? Would it force the new bundle to resolve? Sent from my iPhone > On Sep 4, 2018, at 2:00 PM, Andreas Falkenhahn wrote: > >> On

Re: How to clear macOS app bundle cache

2018-09-04 Thread Andreas Falkenhahn
On 04.09.2018 at 19:33 Alex Zavatone wrote: > Question, what causes the bundle to be cached in the first place? > Is there a way to force that to happen again? If you know what the > bundle is, can you rename part of it or delete it to force an > update? Sure, as I wrote in my very first mail

Re: How to clear macOS app bundle cache

2018-09-04 Thread Andreas Falkenhahn
On 04.09.2018 at 18:27 Marco S Hyman wrote: > Have you tried disabling SMB client side caching? > https://support.apple.com/en-us/HT207520 Doesn't change anything. Maybe because the share is SMB 1, not SMB 2 or 3 as stated in the article. -- Best regards, Andreas Falkenhahn

Re: How to clear macOS app bundle cache

2018-09-04 Thread Alex Zavatone
Question, what causes the bundle to be cached in the first place? Is there a way to force that to happen again? If you know what the bundle is, can you rename part of it or delete it to force an update? Cheezy, I know, but I’m just trying to get some insight into how to do this. > On Se

Re: How to clear macOS app bundle cache

2018-09-04 Thread Marco S Hyman
Have you tried disabling SMB client side caching? https://support.apple.com/en-us/HT207520 I don’t know if that note pertains to current versions of macos. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mo

Re: How to clear macOS app bundle cache

2018-09-04 Thread Jean-Daniel
> Le 4 sept. 2018 à 17:01, Andreas Falkenhahn a écrit : > > On 04.09.2018 at 15:54 Alastair Houghton wrote: > >> OK. Have you tried logging the path of a file in the bundle, so you >> can see where it’s being read from? > > CFBundleCopyBundleURL(CFBundleGetMainBundle()) always returns the pat

Re: How to clear macOS app bundle cache

2018-09-04 Thread Andreas Falkenhahn
On 04.09.2018 at 15:54 Alastair Houghton wrote: > OK. Have you tried logging the path of a file in the bundle, so you > can see where it’s being read from? CFBundleCopyBundleURL(CFBundleGetMainBundle()) always returns the path of the bundle on the network volume. > If the path still says the net

Re: How to clear macOS app bundle cache

2018-09-04 Thread Alastair Houghton
On 4 Sep 2018, at 14:30, Shane Stanley wrote: > > On 4 Sep 2018, at 11:28 pm, Alastair Houghton > wrote: >> >> On 4 Sep 2018, at 00:19, Shane Stanley wrote: >>> >>> On 3 Sep 2018, at 11:31 pm, Andreas Falkenhahn >>> wrote: I'm looking for a solution to flush the app bundle cache

Re: How to clear macOS app bundle cache

2018-09-04 Thread Shane Stanley
On 4 Sep 2018, at 11:28 pm, Alastair Houghton wrote: > > On 4 Sep 2018, at 00:19, Shane Stanley wrote: >> >> On 3 Sep 2018, at 11:31 pm, Andreas Falkenhahn >> wrote: >>> >>> I'm looking for a solution to flush the app bundle cache >> >> If you find one, I'd love to know what it is. I had n

Re: How to clear macOS app bundle cache

2018-09-04 Thread Andreas Falkenhahn
On 04.09.2018 at 15:28 Alastair Houghton wrote: > Is the application in question sandboxed? If so, have you checked > to see whether the application bundle gets copied into the sandbox? > (I don’t have time to look right now myself, but it might make sense > to do that for sandboxed bundles launch

Re: How to clear macOS app bundle cache

2018-09-04 Thread Alastair Houghton
On 4 Sep 2018, at 00:19, Shane Stanley wrote: > > On 3 Sep 2018, at 11:31 pm, Andreas Falkenhahn wrote: >> >> I'm looking for a solution to flush the app bundle cache > > If you find one, I'd love to know what it is. I had no luck at all. Is the application in question sandboxed? If so, have

Re: How to clear macOS app bundle cache

2018-09-04 Thread Andreas Falkenhahn
On 04.09.2018 at 01:19 Shane Stanley wrote: > On 3 Sep 2018, at 11:31 pm, Andreas Falkenhahn wrote: >> I'm looking for a solution to flush the app bundle cache > If you find one, I'd love to know what it is. I had no luck at all. Aren't there any Apple engineers on this list anymore? :-) --

Re: How to clear macOS app bundle cache

2018-09-03 Thread Shane Stanley
On 3 Sep 2018, at 11:31 pm, Andreas Falkenhahn wrote: > > I'm looking for a solution to flush the app bundle cache If you find one, I'd love to know what it is. I had no luck at all. -- Shane Stanley , ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: How to clear macOS app bundle cache

2018-09-03 Thread Andreas Falkenhahn
On 03.09.2018 at 16:07 Mark Allan wrote: > Sounds like you need a way to refresh the filesystem cache rather > than some sort of "app cache". Being a network volume, I suspect a > fair amount of file/directory cacheing goes on. That's what I was suspecting as well but it really turned out to be

How to clear macOS app bundle cache

2018-09-03 Thread Andreas Falkenhahn
Not really Cocoa-related but maybe somebody on here knows how to solve this: I build my application on a Mac Mini system using makefiles on a network drive (SMB). I don't use Xcode. Now I want to run the application from the network drive on a different machine, an iMac. However, the

Re: How to make my NSViewControllers participate in responder chain?

2018-06-30 Thread Richard Charles
> On Jun 30, 2018, at 3:46 AM, Rick Mann wrote: > > I have a complex view hierarchy with a lot of controllers. I'd like to > provide menu commands that the various controllers can respond to, but I have > a couple of problems: > > 1) I can't seem to get any of my view controllers (even the w

How to make my NSViewControllers participate in responder chain?

2018-06-30 Thread Rick Mann
I have a complex view hierarchy with a lot of controllers. I'd like to provide menu commands that the various controllers can respond to, but I have a couple of problems: 1) I can't seem to get any of my view controllers (even the window's root view controller) to participate, even if I overrid

  1   2   3   4   5   6   7   8   9   10   >