Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

danhoo

macrumors newbie
Original poster
Jul 17, 2011
22
0
Hi,

I was wondering if anyone could do me a huge favor. I've got a screensaver XCode 4 project that builds on Snow Leopard, and the resulting screensaver runs successfully on 10.5 through 10.7. However, on 10.8, people are getting an error saying the screensaver is not compatible.

Unfortunately, I don't have a Mountain Lion capable dev system. I'm not even really sure what the issue is. What I'm wondering is if anyone has Mountain Lion and XCode properly configured, if I sent a project, could you try building it, seeing if it works, and then sending me back the resulting screensaver?

-- Dan
 

natas

macrumors newbie
Aug 4, 2012
3
0
Hi danhoo,

I'm currently facing the same problem!

I developed a screen saver on Snow Leopard and it was working fine. But now that I've upgraded to Mountain Lion it stopped working. On System Preferences, I still see my screen saver but the preview window is black and just shows this trimmed text:
"cannot use the MY_SCREEN_SAVER with this version of Mac O
e contact the vendor to get a newer version of the screen saver."

If I click Preview, I just get a black screen and back at the System Preferences the "Screen Saver Options..." button is disabled.

I still get this after rebuilding the screen saver in Mountain Lion with Xcode 4.4 and changing the "OS Deployment Target" to "OS X 10.8".

I'll keep trying to figure this out and will post if I find a solution.
 

danhoo

macrumors newbie
Original poster
Jul 17, 2011
22
0
Hi Natas,

Thanks for your reply -- yeah, that's exactly the same error message that my users are getting on Mountain Lion, the "contact your vendor to get a newer version of this screensaver". When I check places like macupdate.com, it seems like we're not the only ones experiencing this.

That's particularly helpful information that if you build it on 10.8 with the 10.8 deployment target, it still results in this error! Please do let me know whatever you find out. I've been reaching out to other devs I know (so far, no responses) and if I find out anything, I'll post it too.
 

geowar

macrumors newbie
Dec 19, 2001
5
0
Help building a screensaver on Mountain Lion

After I clicked the "validate settings" button (in Xcode 4.4) my screensaver built and ran just fine on Mountain Lion. I didn't save my pre-10.8 project to diff against or I could tell you what changed. Sorry.
 

geowar

macrumors newbie
Dec 19, 2001
5
0
For your screensaver to run on Leopard (10.6) thru Mountain Lion (10.8):
GCC_ENABLE_OBJC_GC = supported
 
Last edited:

danhoo

macrumors newbie
Original poster
Jul 17, 2011
22
0
For your screensaver to run on Leopard (10.6) thru Mountain Lion (10.8):
GCC_ENABLE_OBJC_GC = supported

Thanks Geo! That might be it -- I've got GC set to "required" not "supported". I'll give that a shot.
 

natas

macrumors newbie
Aug 4, 2012
3
0
Hey guys,

Thank you for the tips, but it is still not working for me :s

I validated the settings and checked GCC_ENABLE_OBJC_GC (which was already set to "supported"), but I still get the same behaviour.

Did these steps fix your issue Danhoo?
 

danhoo

macrumors newbie
Original poster
Jul 17, 2011
22
0
Hi Natas. Yes, switching from GC required to supported appears to have fixed the problem for me (confirmed by a couple people running 10.8). Here's a screenshot of my build settings for GC (in XCode 4):

xwjf6.png


I think that might even be overkill, as I was also able to verify with one user with a build I did on Snow Leopard using XCode 3, where I simply switched the 10.6 GC setting to supported instead of required.

Natas, feel free to send me a PM and I can email you my project if you want to compare the build settings to yours.
 

Madd the Sane

macrumors 6502a
Nov 8, 2010
534
73
Utah
Hi Natas. Yes, switching from GC required to supported appears to have fixed the problem for me (confirmed by a couple people running 10.8). Here's a screenshot of my build settings for GC (in XCode 4):

Image

I think that might even be overkill, as I was also able to verify with one user with a build I did on Snow Leopard using XCode 3, where I simply switched the 10.6 GC setting to supported instead of required.

Natas, feel free to send me a PM and I can email you my project if you want to compare the build settings to yours.

You're overcomplicating it: 64-bit 10.6 screen savers will run if you set the Garbage Collection to supported: this injects code and tells the Objective-c runtime that the code can run either under garbage collection or without it. If it were me, I'd simplify the whole thing by having the whole of Objective-C garbage collection set to supported.
Just paste the following line in the build settings window:
Code:
GCC_ENABLE_OBJC_GC = supported

But your way will work if you only target 10.8 or 10.6.
In fact, my screen saver from 10.6 built using that setting works fine under ML.
 

danhoo

macrumors newbie
Original poster
Jul 17, 2011
22
0
You're overcomplicating it: 64-bit 10.6 screen savers will run if you set the Garbage Collection to supported: this injects code and tells the Objective-c runtime that the code can run either under garbage collection or without it. If it were me, I'd simplify the whole thing by having the whole of Objective-C garbage collection set to supported.
Just paste the following line in the build settings window:
Code:
GCC_ENABLE_OBJC_GC = supported

But your way will work if you only target 10.8 or 10.6.
In fact, my screen saver from 10.6 built using that setting works fine under ML.

Yes, that's basically what I ended up doing anyway -- just use GC Supported for everything. However, I think the issue stems from screensaver developers such as myself originally using GC Required for SL due to a (now out of date) recommendation from Apple:

https://developer.apple.com/library/mac/#qa/qa1666/_index.html

This requirement changed from SL to ML, so thus some of us ended up with screensavers that would mysteriously not load.
 

natas

macrumors newbie
Aug 4, 2012
3
0
Hi Natas. Yes, switching from GC required to supported appears to have fixed the problem for me (confirmed by a couple people running 10.8). Here's a screenshot of my build settings for GC (in XCode 4):

Image

I think that might even be overkill, as I was also able to verify with one user with a build I did on Snow Leopard using XCode 3, where I simply switched the 10.6 GC setting to supported instead of required.

Natas, feel free to send me a PM and I can email you my project if you want to compare the build settings to yours.

Hey danhoo,

I'm glad that fixed your issue. Unfortunately, mine remains unfixed.

I can't see the option that you show on the image: "Objective-C Garbage Collection" I guess that's because I'm using the compiler "Apple LLVM compiler 4.1", but I already tried setting a User-Defined Setting for GCC_ENABLE_OBJC_GC and that didn't work.

I also tried setting -fobjc-gc in Other C Flags to no avail. I'm starting to guess this is some other problem.

It would be great if I could have a look at your configs or try to run your screensaver. I tried PMing you, but I get a message saying I don't have permission to do that... I've befriended you, maybe that will allow me to PM you.

Thanks for the help guys!
 

danhoo

macrumors newbie
Original poster
Jul 17, 2011
22
0
Natas, I can't seem to send you a PM either (even though I've got all the appropriate options checked in my user settings). Ping me at danhoo (at) gmail (dot) com.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.