Adding a Third-Party Framework to a Project

Because there are so many different third-party frameworks, there’s no one way to do this. However, you’ll often find the framework packaged into an Xcode project, so you can download the project, open it in Xcode and use it, expand it, or modify it as needed.

Figure 9.15 shows the web page of a sample project called PGMidi. iOS and OS X include a framework called CoreMidi, which is used to trigger synthesizers. CoreMidi manages MIDI connections, and you can use it to send messages from an iPhone or iPad to a software synthesizer.

Unfortunately, CoreMidi is poorly documented and difficult to use. PGMidi is a popular sample project created by developer Pete Goodliffe. It packages some of the features of CoreMidi into a more accessible framework. It’s also an example of a project that uses a repository to store and share the project code. The sample code not only includes a simplified version of CoreMidi, it also includes a working MIDI monitor app that displays currently active MIDI connections and displays MIDI events.

caution_exclamation_2c.eps

Although the creator of PGMidi has provided the code as open source, always check the terms of use and licensing terms yourself before using anyone’s code.

9781118462133-fg0915.tif

9.15 A first look at PGMidi.

github has many features and ...

Get iOS App Development Portable Genius now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.