Static Library can see folder in Xcode but not in Xamarin

JPBoroJPBoro PHMember ✭✭

I'm currently trying to port an ObjC project which uses static libraries in C++. I successfully created an Objective-C binding but gets a crash. From my investigation, it can't see a directory that it needs. In Xcode, it is being passed as static NSString* const configFile = @iOSSDK/conf/config.json; And when it's included in Xcode, it runs fine and if removed then it get's the error:

  • Json parsing error.
  • Line 1, Column 1
    Syntax error: value, object or array expected.

So in Xamarin with the binding, I expected the same behaviour, it will get the error if it can't find config.json. But even if I have included it with the folder structure <iOSSDK/conf/config.json"> in Resources folder and then config.json set as BundleResource, I still get the Json parsing error. I have also set the file as content but it really can't find the file. I've tried in iOS FileExists("iOSSDK/conf/config.json"); and it sets to TRUE which means Xamarin iOS can find the file but the method from the binding can't. Anyone else has a solution for this? I will appreciate any help.

Sign In or Register to comment.