mixedinkey-opensource / MIKMIDI

MIDI Library for Swift and Objective-C Mac and iOS apps.
Other
492 stars 95 forks source link

Add error handling to MIKMIDIClientSource/DestinationEndpoint creation method(s). #52

Open armadsen opened 9 years ago

armadsen commented 9 years ago

This issue was raised by the fact that MIDIDestinationCreate() fails on iOS (6+) unless the audio key is set for UIBackgroundModes. See here:

Beginning in iOS 6, apps need to have the audio key in their UIBackgroundModes in order to use CoreMIDI’s MIDISourceCreate and MIDIDestinationCreate functions. These functions return kMIDINotPermitted (-10844) if the key is not set.

This also causes MIKMIDISequencer to fail on iOS unless that's set

We should make sure the error message for that particular case is descriptive to guide people toward the solution.

armadsen commented 9 years ago

I believe @pwightman is working on this.

pwightman commented 9 years ago

Yep, I'll get on this next.

armadsen commented 9 years ago

I think this is good enough for now. You get a descriptive error message and a link to a wiki page with steps to solve the problem.

armadsen commented 8 years ago

Reopening because I'd like to add real (NSError) error handling to these.