I'm Binding to an Objective-C native library with Xamarin Custom Bindings.
I got the whole application working in Visual Studio with the generated DLL.
I also added the bundle (of the library I'm binding to) and marked the images and nib's inside it as "Bundle Resources".
But when I run the App the nib's don't get copied at all to the Simulator/Device.
I know the app/binding is fine because if I manually copy the nib and images the app works as expected.
I have already tried configuring several locations for the bundle folder but none of them worked:
- VSProjectFolder/Resources/miAssetKit.bundle/*
- VSProjectFolder/Resources/*
- VSProjectFolder/miAssetKit.bundle/*
(I also edited the csproj file to add the "miAssetKit.bundle" Resource Reference instead of the Resources in this last try.)
This is the error I get when using the "VSProjectFolder/Resources/miAssetKit.bundle/" location
2014-08-07 12:01:42.832 KPIBindingiOS[4771:70b] @ monotouch: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle (not yet loaded)' with name 'miKpiValueViewController'
Looking at the mtbserver.log I have this error:
[07-Aug-2014 14:40:32] Warning: Fail moving file /Users/Manish/Library/Caches/Xamarin/mtbs/builds/KPIBindingiOS/decba649-b058-4744-bbb3-22ca560a321e/output/Debug/iPhoneSimulator/KPIBindingiOS.app/miScatterPlotPopView.nib to bundle dir: /Users/Manish/Library/Caches/Xamarin/mtbs/builds/KPIBindingiOS/decba649-b058-4744-bbb3-22ca560a321e/bundle/KPIBindingiOS.app/miScatterPlotPopView.nib [07-Aug-2014 14:40:32] Warning: Exception type: System.IO.FileNotFoundException /Users/Manish/Library/Caches/Xamarin/mtbs/builds/KPIBindingiOS/decba649-b058-4744-bbb3-22ca560a321e/output/Debug/iPhoneSimulator/KPIBindingiOS.app/miScatterPlotPopView.nib does not exist