Skip to main content
Rick E Johnson
Inspiring
October 4, 2015
Answered

Can Xcode 7 be used for CS6 plugins?

  • October 4, 2015
  • 1 reply
  • 1896 views

Xcode 5 worked well for me under Yosemite after running the XcodeLegacy.sh script, but it cannot be used since I upgraded to El Capitan, and there are issues with Xcode 6, as well.

Has anybody tried Xcode 7 for older plugins? I'd prefer not to have to run a separate partition with an older OS, as it's much more convenient to have immediate access to all the work I do without rebooting.

Any recommendations would be much appreciated.

-- Rick

This topic has been closed for replies.
Correct answer LeoTaro

It was encouraging that I also got FreeGrid to build in Xcode 7 following your lead, but that one has a separate UI project. I've tried QT and Flex, and found them too cryptic to use without documentation (maybe I'm overlooking something that should have been obvious), so I was going to try native Xcode InterfaceBuilder panels as in the Empty Panel project. There I get "Redefinition of 'NSView' as a different kind of symbol" errors in AIPanel.h and AIControlBar.h.

Man, I sure miss ADM!


To build the Empty Panel project as well as making the changes to get FreeGrid working you need to make these changes:

AIPanel.h

Replace:

#elif MAC_ENV

  class NSView;

  typedef NSView* AIPanelPlatformWindow;

#else


With (from the CC 2015 SDK headers)

#elif MAC_ENV

    #ifdef __OBJC__

    @class NSView;

    typedef NSView* AIPanelPlatformWindow;

    #else

    typedef void* AIPanelPlatformWindow;

    #endif

#else

AIControlBar.h

Replace:

#elif MAC_ENV

  class NSView;

  typedef NSView* AIControlBarPlatformWindow;

#else


With:

#elif MAC_ENV

  #ifdef __OBJC__

    @class NSView;

    typedef NSView* AIControlBarPlatformWindow;

  #else

    typedef void* AIControlBarPlatformWindow;

  #endif

#else


And comment out this line in EmptyPanel.r

#include "Types.r"


BTW, when you comment out this line in SPFiles.h:


#pragma options align=mac68k


You should also comment out the following line shortly after it (though it probably won't matter):


#pragma options align=reset



1 reply

Inspiring
October 5, 2015

I just tried the FreeGrid project in XCode 7. I didn't use the XcodeLegacy.sh script, I just opened the project in XCode. I clicked on the project and then Build settings and changed the following two settings:

Architectures | Base SDK -> Latest OS X (OSX 10.11)

Build Options | Compiler -> Apple LLVM 7.0

I then tried to build the project and got an error about Carbon.h not being found. I searched for Carbon.h in /Applications/Xcode.app/Contents/Developer and added the path it was found in (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Headers) to the "Search Paths | Header Search Paths" Build setting.


I then got an error about this line in SPFiles.h

#pragma options align=mac68k

This is ancient and no longer relevant. After commenting this line out, the project built successfully.

Rick E Johnson
Inspiring
October 7, 2015

Thanks, LeoTaro.

Were you compiling for CS6? It's my understanding that CS6 needs the Xcode 10.6 SDK. Or maybe with a newer Xcode SDK the plugin runs in CS6, but requires a newer OS than 10.6 does.

That "align=mac68k" has been a real nuisance. It's great to know it can safely just be commented out!

I really appreciate your advice.

-- Rick

Inspiring
October 7, 2015

Yes I was using the CS6 SDK. The align=mac68k line has been removed in the newer SDKs.

Re running on older OS X versions. This is controlled by the Deployment target build setting which is already set to 10.6 in the sample projects, so it should run on 10.6 or later.