Unable to link SketchupAPI.framework in Xcode



I have a C extension that provides some utilities. It works on both Windows and Max OS X. I have decided to add an SDK call to Get Extension License. I was successful on Windows, but I’m not familiar with the Mac’s Xcode.

The Mac SDK has a file called SketchupAPI.framework,

(You can see it is the SDK Mac_16-0019913)

Following the steps at:

I can put in Xcode (Xcode Version 9.3 on macOS High Sierra 10.13.4) as follows:

After a building, I’m seeing the following errors:

If I add the framework, won’t Xcode automatically find the binarie(s)?

Is it possible now a days to license a version of the SDK that includes the “Hello_World” example with pre-configured Visual Studio and Xcode projects?


I think the README for the examples says it has code projects presetup …


Github does not have any Sketchup SDK headers or binaries that I can find, at least the “dev-xcode8” branch.

That makes sense because you have to become a licensed developer (which I am) and download the SDK from Sketchup’s website. The Github source should include the SDK headers (which are online and no reason not to include them), and insert stub files for the SDK binaries. Alternatively, it would be nice if the SDK download from Sketchup’s website would include at least one buildable example.


You asked specifically about the project files.

They are in the ruby-c-extension-examples repo’s following directory …

The Visual Studio project files are in it’s parent directory, … ie …

Totally disagree. Why because they do not belong there. If they did do this it would create a precedent and therefore complicate every example they’d publish. Ie, links their SDK source headers to every example repo.


Okay, there are no predefined project files with the SketchupAPI.framework. How do I fix my linker error?


Can you copy the error with the full message? The screenshot clips parts of it.

The ThirdParty folder in the Ruby C Extension example have headers and libs for both Win and Mac.


I have deleted the project and started with an earlier baseline as I was seeing many build errors eventually. Most related to my lack of Xcode knowledge, and adding files to a single target instead of all Ruby targets. I have stubbed out the SDK calls for now and am working other implementation.

Looking at the ThirdParty Frameworks in Xcode, I see the Ruby frameworks for all three targets, but I don’t see it initialized with a Sketchup SDK framework.


Yea, the Ruby C Extension example doesn’t include the C API for licensing.

For that, have a look in the samples included in the SDK package;


Oh, just realized that was a Visual Studio example only. You were looking at setting up XCode?
How far are you at? Where are you stuck?


Yes Xcode. I’m more familiar with VS and I got it working.

I got it to compile by hardcoding the full path to the headers, including having to modify SDK headers because of their paths. Like the title says, I can’t get it to link.

I will try downloading the Mac SDK again and re-inserting the framework. I originally base lined from the GitHub Hello World project, which worked for a few years until I wanted to use the SDK. If I can’t get the framework to work correctly, I will base line from the Xcode project in the SDK examples.


I’ve had problems before where I copied the framework on my Windows machine - which nukes the symbolic links. I then had to switch to my mac and clean out the broken framework and copy it again fresh from the mac os.


I downloaded the Mac SDK from Windows and I may have down something to it before transferring it to the mac via thumb drive. I have been trying to re-download the Mac SDK. I have documented my problem at:


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.