I am trying to add Sparkle framework to my Application for automatic updates.
I did everything as prescribed in the documentation. But the update was not happening. I tried to find out more by putting some NSLog statements. What I found this was is quite scary. Most of the delegates does not work.
My application does not have much interface. So I called checkForUpdates directly in the code.
Did anyone faced the same problem? Can anyone help me to get out of this issue?
I'm using Xcode 4.1 under Mac OS X 10.7 Lion.
Related
wxWindowMac::MacVisibilityChanged() is virtual method and it is meant to be overridden, but it does not get called in Cocoa, while when using Carbon it was. (There was a migration from Carbon to Cocao).
My guess is that triggering this method via events is not implemented for Cocoa port of wxWidgets. Anyone had the same problem, what was the solution?
I am using wxWidgets 3.0.2 and Mac OS 10.9.
Found the answer myself for this one.
Just add an event handler for wxShowEvent and forget about using wxWindowMac::MacVisibilityChanged.
I am working on a consulting gig in which my client got a prototype for his App to work on Mac OS X 10.10 (Yosemite) by using a storyboard. However the App crashes on 10.9.x and earlier, because the APIs required to use storyboards in Cocoa desktop applications were not yet available.
At present the application is not very complex, so I could satisfy his immediate requirement by revising his application so as not to use storyboards at all, I would instead implement his UI "The Old-Fashioned Way", without using storyboards at all.
I'm not real sure what is the best course of action. If I implement what I just said, he will eventually find his UI deprecated by Apple. If I use a storyboard for 10.10 and later, but not on 10.9 and earlier then there could be twice as much work for my client to develop this code.
Note that, as a consultant, I could stand to gain by increasing my client's workload. I don't want to do that as I regard it as unethical to take advantage of my clients by writing bad code. I really want to do right by this fellow.
Right. Storyboards are only available in MacOS X from 10.10 (Yosemite) onward. Support for storyboards is feature of the Cocoa framework, so the fact that it doesn't exist on versions <= 10.9 means code using storyboards won't work.
I'm not real sure what is the best course of action.
I think the most reasonable solution is to explain the situation to your client and let him decide. It's going to be a long time before .xib-based code goes away, if it ever happens, so sticking to .xib files for now is not necessarily a bad choice. On the other hand, your client might prefer to have the most forward looking app you can build, and he may not care all that much about supporting older OS versions. (Several sources indicate that as of early 2015, about half of all Macs are running Yosemite.) You'll serve your client best by giving him the information he needs to make a decision and then writing the app in accordance with his wishes.
Mavericks is coming out and for developers that's always a busy time with all these new features and APIs to know about and use. For me, I think it is the perfect time to ask a question that has been bugging me for a very long time.
Here's the thing, in context: I am developing an app that I want to be able to run on 10.8 (so the target system is 10.8+). Right now I am using the 10.8 SDK. However, with the release of 10.9 comes some pretty sweet APIs that I would like to use in my app. I use them in my code, but then, of course, I have to compile my app against the 10.9 SDK. If I do that, can I still run the app on 10.8?
Or, in a more general way, if I compile my app against one SDK, can I still run it on a 'lower' Mac OS? If yes, can you explain how does it work under the hood (what is the compiler doing)? This is a mistery for me.
Generally speaking, Xcode disassociates the issue of the SDK and the Deployment Target of the app.
The SDK is determined by Base SDK, and the deployment target is determined by OS X Deployment Target. These both show up in the Build Settings tab for each target in Xcode.
When programming with different SDK and Target, you are responsible for making sure that you don't call methods or functions on an OS that doesn't have them. This is often facilitated by weak linking (in the case of new frameworks) and/or using -respondsToSelector: in the case of new methods on existing classes and frameworks.
In Xcode, under build settings, there is an option for target OS where you can pick 10.8. 10.8 applications are generally compatible with 10.9 so the compiled application will work with both OSs.
Don't expect the new Apis to work when running on a lower version. It doesn't work that way.
There are two choices (or at least I know two) for implementing XPC client and service for Mac. NSXPCConnection which is introduced in 10.8 and XPCKit. What should I use to implement helper app that resides in menu bar and uses XPC to read data from the main app.
The main difference I see is that XPCKit will work in 10.7 Lion while NSXPCConnection is available only in 10.8 Mountain Lion. What else should I take into consideration when choosing between them. I'd be grateful for the responses from the developers who used both.
P.S. My app still works in 10.7, however from my previous experience it's not a problem to require the latest version of OS X in 2-3 months after release.
Finally I decided to use NSXPCConnection.
It is provided by Apple, so, less chances to have problems with updates.
Since the release of Mountain Lion and NSXPCConnection it seems that XPCKit is not supported any more.
I've tried both and for me personally NSXPCConnection seems to be a better solution
I've been writing a program based on the ScreenSnapshot example from apple: http://developer.apple.com/library/mac/#samplecode/OpenGLScreenSnapshot/Introduction/Intro.html
and after upgrading from Snow Leopard to Lion my program stopped working. When I checked the example I realized it is not working either.
For some reason glReadPixels function raises the GL_INVALID_FRAMEBUFFER_OPERATION_EXT error (0x0506).
I have reinstalled developer's tools but no luck. Has anyone made any progress with this issue? Any pointers will be greatly appreciated.
An updated version was posted a few days ago, see this new sample code called ScreenSnapshot. There's now a dedicated fonction CGDisplayCreateImage. There's even an accompanying technical Q&A.
So, a more général answer: follow Apple's document révisions regularly. (Sorry for extraneous accents over é's or fonctions... somehow Lion's spell checker wants to be in French mode.. grr...)