Author Topic: Problems with Bass.Net.iOS in the use of Xamain.ios  (Read 114 times)


  • Posts: 3
I am trying to use Xamarin.Form to make my first bass program,

In the .net Standard project
  Added a reference to Bass.Net.dll (from\standard\Bass.Net.dll version
  The following code is executed when the program starts:
    Bass.BASS_Init(-1, 44000, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);

In the Xamarin.Android project
  Added a reference to Bass.Net.Addroid (from:\Android\Bass.Net.Android.dll version )
  A folder named "lib" is created under the project root directory, which has multiple subfolders: "arm64-v8a", "armeabi", "armeabi-v7a" "x86", "x86_64", each folder There are in them, they come from "\libs\" (updated: 3 Feb '21)

In the Xamarin.iOS project
  Added a reference to Bass.Net.iOS.dll (from:\iOS\Bass.Net.iOS.dll version
  Added a native reference to libbass.a (from: "\libbass.a" updated: 4 Dec '20)
  Set "iOS build -> Linker Behavior" to "Link All"
  Set "iOS build -> Additional mtouch arguments" to:
    -gcc_flags "-L. -lstdc++ -framework AudioToolbox -framework Accelerate"

Xamarin.Android runs successfully
When Xamarin.iOS executes Bass.BASS_Init, an exception occurs:
                System.TypeInitializationException(The type initializer for 'Un4seen.Bass' threw an exception.)
                  System.DllNotFoundException(bass assembly:<unknow assembly> type:<unknown type> number:(null))

How should I correct the settings of Xamarin.iOS?


Ian @ un4seen

  • Administrator
  • Posts: 23550
I'm not a Xamarin or .Net user myself, so I'm afraid I can't help very much with that, but from the "DllNotFoundException" message it looks like the issue may be that it's trying to dynamically load the BASS library. The iOS BASS libraries should be statically linked into the app instead, so please check the Xamarin options for something like that.


  • Posts: 4716
Unfortunately I have also not much experience with iOS.
But... the Bass.Net.iOS links the bass libs (see the related iOS post) with the following module name: __Internal

This is static linking - but you still need to provide and link in your build environment the related native bass libs.


  • Posts: 3
Thanks, I will keep trying. :)