Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtmidi on ios is not working #39

Closed
sed0 opened this issue May 24, 2023 · 13 comments
Closed

rtmidi on ios is not working #39

sed0 opened this issue May 24, 2023 · 13 comments

Comments

@sed0
Copy link
Contributor

sed0 commented May 24, 2023

Can't build for iOS, says dependencies can't be resolved for iosArm64 and iosSimulatorArm64. My guess is iosX64 target is not enough and you should also include iosArm64 and iosSimulatorArm64

@sed0
Copy link
Contributor Author

sed0 commented May 24, 2023

this branch might fix it
If you can publish it on Maven I can test it. I was unable to use it by simply importing to another project.

@atsushieno
Copy link
Owner

oops, that indeed looks like a real issue. Thanks for the report.

You can verify your local changes to ktmidi by publishing your version "locally" by running ktmidi gradle target publishToMavenLocal (a build target offered by maven-publish plugin), and adding the following changes in your app project:

    repositories {
        ....
        mavenLocal()
    }

and your reference (implementation) to ktmidi will be resolved just like the published versions.

@sed0
Copy link
Contributor Author

sed0 commented May 25, 2023

Thanks for the suggestion, I'll try it and give you an update!

@atsushieno
Copy link
Owner

I'm rolling 0.4.2 release as planned, but we can release 0.4.3 at any time once this iOS build issue gets resolved.

@atsushieno
Copy link
Owner

I believe I fixed it on the main branch, up to the state where I could locally build ktmidi on aarch64 Mac with those new targets you mentioned above.

If it builds I will close this issue and your PR once I could release the latest version (that will be v0.5.0 as there will be various updates).

@sed0
Copy link
Contributor Author

sed0 commented Jun 22, 2023

@atsushieno I'm trying to make rtmidi work on iOS but wasn't even able to compile it for iOS successfully. I could build a static lib, but shared fails with an error reporting that jack isn't present on my system which isn't true. I'm using ios-cmake to build. Just wanted to let you know that I'm still working on the issue!

@atsushieno
Copy link
Owner

Ah, I don't think iOS build is supported in RtMidi itself and thus it's not going to be our candidate MidiAccess implementation for iOS. It is more realistic to implement CoreMidiAccess i.e. implement MidiAccess API over CoreMIDI, by some means. Then it would be sharable with macOS (unless their CoreMIDI stuff are quite different, where I am not very sure).

@atsushieno
Copy link
Owner

(ktmidi offers some API that is independent of native MIDI access API such as UMP processing, so having no MidiAccess implementation is not a concern to me.)

@sed0
Copy link
Contributor Author

sed0 commented Jun 23, 2023

Ah, I don't think iOS build is supported in RtMidi itself and thus it's not going to be our candidate MidiAccess implementation for iOS. It is more realistic to implement CoreMidiAccess i.e. implement MidiAccess API over CoreMIDI, by some means. Then it would be sharable with macOS (unless their CoreMIDI stuff are quite different, where I am not very sure).

iOS is supported since 5.0.0 but not a lot information is available on it. But yes CoreMidiAccess would work too for both mac and iOS, I might go this way instead.

(ktmidi offers some API that is independent of native MIDI access API such as UMP processing, so having no MidiAccess implementation is not a concern to me.)

Thanks for the suggestion, I'll look if it works for us!

@atsushieno
Copy link
Owner

Oh, interesting. I didn't find any mention on "iOS" in RtMidi sources so I thought it does not. It seems it mentions "IPHONE". But current RtMidiAccess is based on rtmidi-jna which does not support iOS either way (for that JNAerator maintenance issue).

The new rtmidi-javacpp might work as it seems to support iOS (with various dependencies though).

@atsushieno
Copy link
Owner

Yesterday I tried the latest "ktmidi-ci-tool" (a Compose Multiplatform app for the latest MIDI-CI functionality testing tool in this repo) on iOSArm64Simulator and it just worked. Considering that, ktmidi now works on iOS. Only rtmidi part is not covered yet.

I would change the subject to mention "rtmidi" and leave it open, but the priority (in case I had...) is lower now. I would prefer CoreMIDI bindings, especially now that we would love to have MIDI 2.0 support in MidiAccess.

@atsushieno atsushieno changed the title ios is not working rtmidi on ios is not working Jan 14, 2024
@atsushieno
Copy link
Owner

As ktmidi 0.8.0 adds native CoreMidiAccess implementation, I would like to close this issue unless we really need RtMidi integration (the original issue title when it was filed was "ios is not working", and I find it better if direct MidiAccess implementation exists).

Having said that, CoreMidiAccess is tested only on macOS, not iOS. I don't have any iOS device and it's not possible to have any existing MIDI device app from AppStore onto iOSSimulator.

@atsushieno
Copy link
Owner

Considering that v0.9.1 is verified to work, I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants