Request: Using bassmidi on managed expo - .a library files

Started by kittentaser, 5 Mar '25 - 20:45

kittentaser

Ian, first of all thanks for making these incredible pieces of software.

I am on managed Expo on react native. On the android side I've gotten Bass and BassMIDI to integrate perfectly. The issue is, on the iOS side, managed expo does not allow you to edit your podfiles through any means other than a config plugin. Configuring and including dynamic frameworks like those you distribute in your iOS versions of these plugins has proven to be impossible so far. My senior dev said that if we could get .a files (library files), we would probably be far more successful.

Do you happen to either have .a's or know how i might go about converting the dynamic framework to a static library? Chat GPT seems to say its doable but risky if there's initialization behavior depending on the framework loading behavior.

Its frustrating because on android everything works perfectly, and now I'm addicted to the functionality gained by using bassmidi. I cant go back to vanilla ios soundfont playing anymore :-(, but I don't have the dev resources to devote to leaving Expo managed workflow.

Ian @ un4seen

The iOS BASS libraries were initially in static form because Apple required them to be. But Apple later (as of iOS 8) allowed dynamic libraries and the iOS BASS libraries eventually (as of BASS 2.4.17) switched to that, mainly so BASS_PluginLoad works the same as on the other platforms (which all use dynamic libraries). I'm not familiar with Expo, so unfortunately I'm unable to advise on setting that up to use the BASS libraries, but here are the last static BASS and BASSMIDI libraries if you would like to try them:

   www.un4seen.com/stuff/bass24-ios-static.zip
   www.un4seen.com/stuff/bassmidi24-ios-static.zip

kittentaser

Thanks dude.

While i was waiting I, just to see if i could do it,  converted the latest ones to .a's using lipo. Do you see any reason why those wouldnt work? (Is there any initialization code behavior in your dynamic frameworks that might not translate)?

Ian @ un4seen

I've never tried converting dynamic libraries to static ones, so I can't say for sure if that'll work, but I can say that the BASS libraries do have initialization code that's run when they're loaded. I don't think BASS will work if that code isn't run, so if it is working then I guess the code is being run!