Skip to content
Andrew Madsen edited this page Apr 20, 2015 · 7 revisions

There are several ways to add MIKMIDI to your project. Choose whichever method you're most comfortable with below. The methods are listed roughly in order of my own preference.

Using an Xcode subproject

Xcode sub-projects allow your project to use and build MIKMIDI as an implicit dependency.

  1. Add MIKMIDI to your project as a Git submodule:

    $ cd MyXcodeProjectFolder
    $ git submodule add https://github.com/mixedinkey-opensource/MIKMIDI.git Frameworks/MIKMIDI
    $ git commit -m "Added MIKMIDI submodule"
    
  2. Drag Frameworks/MIKMIDI/Framework/MIKMIDI.xcodeproj into your existing Xcode project

  3. Navigate to your project's settings, then select the target you wish to add MIKMIDI to

  4. Navigate to Build Phases and expand the Link Binary With Libraries section

  5. Click the + and find MIKMIDI.framework.

  6. You should now be able to add #import <MIKMIDI/MIKMIDI.h> (Objective-C) or import MIKMIDI (Swift) to any of your target's source files and begin using MIKMIDI.

Carthage

Using Carthage, you can easily add MIKMIDI to your project as a pre-built framework. In order to use this method, you must have Carthage installed.

  1. Create a Cartfile for your project.
  2. Add the following line to your Cartfile:
github "mixedinkey-opensource/MIKMIDI"
  1. In your project directory, run carthage update
  2. Find MIKMIDI.framework in Carthage/Build/Mac or 'Carthage/Build/iOS'.
  3. Navigate to your project's settings, then select the target you wish to add MIKMIDI to.
  4. On the General tab, drag MIKMIDI.framework from Finder into the "Embedded Binaries" section.
  5. You should now be able to add #import <MIKMIDI/MIKMIDI.h> (Objective-C) or import MIKMIDI (Swift) to any of your target's source files and begin using MIKMIDI.

Using CocoaPods

You can use CocoaPods to add MIKMIDI to your project. In order to use this method, you must have CocoaPods installed.

  1. Add the following line to your Podfile:

    pod 'MIKMIDI'
  2. In your project directory, run pod update

  3. You should now be able to add #import <MIKMIDI/MIKMIDI.h>, etc. to any of your target's source files and begin using MIKMIDI.

Manually from source

If you don't want to use CocoaPods or use an Xcode subproject, you can add MIKMIDI's source directly to your project.

  1. Add MIKMIDI to your project as a Git submodule:

    $ cd MyXcodeProjectFolder
    $ git submodule add https://github.com/mixedinkey-opensource/MIKMIDI.git ThirdParty/MIKMIDI
    $ git commit -m "Added MIKMIDI submodule"
    
  2. Drag ThirdParty/MIKMIDI/Source into your Xcode project, and ensure that you add it to the targets that you wish to use it with.

  3. You should now be able to add #import "MIKMIDI.h", etc. to any of your target's source files and begin using MIKMIDI.

Note Please be aware that if you've set Xcode's Link Frameworks Automatically to No then you will need to manually link your target with CoreMIDI.framework, AudioUnit.framework, AudioToolbox.framework. Additionally, in iOS projects, regardless of this setting, you will need to link with libxml.dylib.

Clone this wiki locally