Giter Site home page Giter Site logo

cocoalibspotify's Introduction

CocoaLibSpotify

CocoaLibSpotify is an Objective-C wrapper around our libspotify library. It provides easy access to libspotify’s features in a friendly, KVC/O compliant Objective-C wrapper.

CocoaLibSpotify requires libspotify.framework, which isn’t included in the repository. The Mac Framework and iOS Library Xcode projects include a build step to download and unpack it from developer.spotify.com automatically. If this fails for some reason, download it manually from developer.spotify.com and unpack it into the project folder.

Building - Mac OS X

The Xcode project was built in Xcode 4.0, but should also work fine in Xcode 3.2.x.

The built CocoaLibSpotify.framework contains libspotify.framework as a child framework. Sometimes, Xcode gives build errors complaining it can’t find <libspotify/api.h>. If you get this, manually add the directory libspotify.framework is in to your project’s "Framework Search Paths" build setting. For example, if you’re building the CocoaLibSpotify project alongside your application as an embedded Xcode project then copying it into your bundle, you’d have this:

$CONFIGURATION_BUILD_DIR/CocoaLibSpotify.framework/Versions/Frameworks

Otherwise, you’d point to the downloaded libspotify.framework manually, something like this:

../../libspotify-9.1.32-Darwin-universal

Building - iOS

The built libCocoaLibSpotify contains libspotify internally as a static library, as well as all of the required header files in a directory called "include".

When including libCocoaLibSpotify in your application, you must also link to the following frameworks:

  • SystemConfiguration.framework

  • CFNetwork.framework

  • libstdc++

In addition, you must add the following two items to the "Other Linker Flags" build setting:

  • -all_load

  • -ObjC

If you’re building the CocoaLibSpotify project alongside your application as an embedded Xcode project then linking it with your application in a build step, you can tell Xcode where the header files are by adding the following setting to the "Framework Search Paths" build setting of your project:

$CONFIGURATION_BUILD_DIR/include

Otherwise, you can simply add all of the header files to your project manually.

Once everything is set up, simply import the following header to get started with CocoaLibSpotify!

#import "CocoaLibSpotify.h"

Playback Helper Classes

If you want to use the provided playback helper classes, you also need to link to the following framworks in your project:

Mac

  • CoreAudio.framework

  • AudioUnit.framework

iOS

  • CoreAudio.framework

  • AudioToolbox.framework

  • AVFoundation.framework

Documentation

The headers of CocoaLibSpotify are well documented, and we’ve provided an Xcode DocSet to provide documentation right in Xcode. With these and the sample projects, you should have everything you need to dive right in!

Contact

If you have any problems or find any bugs, see our GitHub page for known issues and discussion. Otherwise, we may be available in irc://irc.freenode.net/spotify.

cocoalibspotify's People

Contributors

adrienbrault avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.