Re: sharing code between screensaver and regular app

2020-03-02 Thread Jonathan Prescott via Cocoa-dev
When you created the application, you should have created two pairs of files, AppDelegate.h/.m and ViewController.h/.m. The AppDelegate is used to augment and tailor the behavior of the NSApplication that is implicitly created as part of the AppKit framework. For your purposes, you may not nee

Embedded binary is not signed with the same certificate as the parent app

2020-03-02 Thread Gabriel Zachmann via Cocoa-dev
I have a naked macOS app (created with Xcode's template "App"). I get this funny error message Embedded binary is not signed with the same certificate as the parent app but only, when I switch to Release *and* when I add a Copy Files phase with Destination = Absolute Path and Name = MyPr

Image GPS Properties Question

2020-03-02 Thread Marco S Hyman via Cocoa-dev
Hello all, Given a URL to an image I currently do this to grab image properties (ignoring error handling to simplify the example code) let imgRef = CGImageSourceCreateWithURL(url as CFURL, nil) let imgProps = CGImageSourceCopyPropertiesAtIndex(imgRef, 0, nil) as NSDictionary? let GPSDictionary

Re: Sharing code between screensaver and regular app

2020-03-02 Thread Dave via Cocoa-dev
Hi, All I can think of that this behaviour has changed on your version of MacOS/XCode. You can do the same thing as the template by manually adding the files, e.g copy your “ViewController” file, rename it and then add it to the new project. You will need to make sure that the Storyboard/Nibs

Re: Sharing code between screensaver and regular app

2020-03-02 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your response! > > File/New Project - Select MacOS and then “App” (from the New Project Dialog). That is what I did: see this screen recording: https://owncloud.informatik.uni-bremen.de/index.php/s/br8rN3HGYfj9w3d

Re: Sharing code between screensaver and regular app

2020-03-02 Thread Dave via Cocoa-dev
Hi, You need to create a project with the right template to start with. In XCode: File/New Project - Select MacOS and then “App” (from the New Project Dialog). On XCode 11.0 and MacOS 10.14.6, this results in a new project Setup with a view controller. There are a number of ways to share code

Sharing code between screensaver and regular app

2020-03-02 Thread Gabriel Zachmann via Cocoa-dev
I am trying to replicate what this guy suggests: https://medium.com/better-programming/how-to-make-a-custom-screensaver-for-mac-os-x-7e1650c13bd8 under section "Additional Debugging". The idea is to create a standalone app that shares as much code with the screensaver as possible. I am using