about:benjie

Random learnings and other thoughts from an unashamed geek

How to Interface Your Cocoa App With Skype

| Comments

Update: Give up now. Skype never responds to the [SkypeAPI connect] method!

Original post follows:

(Mac OS X only, works on Lion, Xcode 4.1, Skype 5.3)

Here are the steps to starting work on interfacing a Cocoa app with Skype:

  1. Don’t try and get the framework from the documentation (what the hell?! Invalid link? PowerPC issues? Come on Skype!)

  2. Copy Skype.framework into your app’s folder from within Skype (find the Skype app, control-click and Show Package Contents)

  3. Drag your copy of Skype.framework into the Frameworks folder of your Xcode project.

  4. In Project -> Target -> Build Phases:

    1. Ensure Link Binary with Libraries contains Skype.framework
    2. Add a new build phase (Editor -> Add Build Phase -> New Copy Files Build Phase), set the destination to Frameworks, the Subpath blank, and drag Skype.framework here from your Frameworks group.
  5. In the relevant source file add

1
#include <Skype/Skype.h>
  1. Code your app. You might want to start with the following:
1
2
3
if ([SkypeAPI isSkypeRunning]) {
  NSLog(@"Skype is running.");
}

Hopefully that’ll get you started a bit faster than I did! API documentation can be found here: https://developer.skype.com/resources/public_api_ref.zip

Comments