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

Can't find module or Unknown object version. Just won't work #294

Closed
MrTheSaw opened this issue Sep 24, 2020 · 7 comments
Closed

Can't find module or Unknown object version. Just won't work #294

MrTheSaw opened this issue Sep 24, 2020 · 7 comments
Assignees
Labels

Comments

@MrTheSaw
Copy link

I was trying to use the branch made to work with Xcode 12, since other branches won't compile. I tried building it and dragging the release framework into my project, but while Xcode claims to have added the framework (shows up in the embedded stuff area as well as the link these libraries area), the compiler says it can't find the module when I put "import MIKMIDI".

So I tried cocoapods, simply setting the Podfile to:

target 'playnotes3' do
  use_frameworks!
  pod 'MIKMIDI', :git => 'https://github.com/mixedinkey-opensource/MIKMIDI.git', :branch => 'issue-292-apple-silicon'
end

... and pod says:

RuntimeError - [Xcodeproj] Unknown object version.

Xcodeproj is at 1.16.0

MIKMIDI, as a project, happily builds and passes all tests in the same xcode. (Version 12.0 (12A7209))

@armadsen
Copy link
Member

armadsen commented Oct 1, 2020

Can you confirm exactly which version of Xcode you're using, and which version of macOS you're on? For what it's worth, the framework project in the master branch builds just fine in Xcode 12.0 under 10.15.7 on my machine. It's being used in a (iOS) project I'm actively developing right now, so I wonder if there's something different about your setup.

@armadsen armadsen self-assigned this Oct 1, 2020
@MrTheSaw
Copy link
Author

MrTheSaw commented Oct 3, 2020 via email

@MrTheSaw
Copy link
Author

MrTheSaw commented Oct 3, 2020 via email

@MrTheSaw
Copy link
Author

MrTheSaw commented Oct 3, 2020

So Cocopads doesn't work, and dragging the completed framework bundle doesn't work.

@MrTheSaw
Copy link
Author

I got past this, but my methodology is dodgy. I added the framework in by hand (add other...), made sure the framework search path pointed to the right place, and importantly set the signing for MIKMIDI was “development”.
I have done the Hello World equivalent, and made a midi file with a quarter note middle C. It loaded into MuseScore, and played, huzzah!

I’d love thoughts on how to make this less fragile, such as how to make MIKMIDI a swift package.

@armadsen
Copy link
Member

I'm tracking SwiftPM support in #303. In the meantime, you might consider using MIKMIDI.xcframework. 1.7.1 is here: https://github.com/mixedinkey-opensource/MIKMIDI/releases/download/1.7.1/MIKMIDI-1.7.1.xcframework.zip. I plan to get a 1.7.2 release out including M1 support soon, but you can already build it yourself on the 1.8 branch by running the script Framework/build_xcframework.sh from the Framework/ directory.

@MrTheSaw
Copy link
Author

Thanks! I got the xcframework working, sort of (doesn't work for previews for reasons I bet aren't under your control). I'll try 1.8 for giggles.

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

No branches or pull requests

2 participants