locked
WindowsRT facing problem with integration with native component using coredova RRS feed

  • Question

  • Hi 

    We have specific requirement for hybrid application in which we are calling json based services with native layer. All communication is on HTTPS layer and we have to cross check the certificate issued by server. 

    we are using bouncycastle library to validate the certificate, all the communication is working properly on windowphone8 & 7.5 but we found that coredova doesn't support integration of windowsRT so we tried with Windows Runtime component, but as Windows Runtime Component is a small subset of Windows Store App it has multiple limitations.Firstly in case of SSL validation I used the library "BouncyCastle".But its classes are not supported by Runtime Component.Secondly in case of "Web Service Consumption" same thing happened.In case of Web Service Consumption we need to create classes for Serializing and deserializing our data while communicating with JS,which was again not supported by Runtime Component

    Any help would be highly appreciated.

    Thanks in advance

    Wednesday, January 1, 2014 8:01 AM

Answers

  • I'm not sure what you mean by "integrating native code with winjs". You absolutely can use native code in a Windows Runtime Component which can be called from a JavaScript app.

    This native code must use only API available to Windows Store apps, but (outside of UI framework differences) there are no significant restrictions beyond that.

    Taking a quick look at the BouncyCastle site it has a C# (not native) library. This likely is written for the full .Net Framework and doesn't run on the .Net Core framework used by Windows Store apps. See .NET for Windows Store apps overview

    Bottom line is still the same: you need to use a library that is valid in Windows Store apps. Since it appears that BouncyCastle is an encryption library you might want to look at the Windows Runtime encryption classes to see if they will work for you.

    If the problem is figuring out how to use this with Cordova then you'll probably need to ask Cordova.

    --Rob

    Friday, January 3, 2014 7:06 PM
    Moderator

All replies

  • If BouncyCastle isdn't compatible with Windows Store apps you'll need to find another library. You need to talk to BouncyCastle's authors about support for it.

    --Rob

    Wednesday, January 1, 2014 7:34 PM
    Moderator
  • Thanks for response.

    The main problem is not Bouncy Castle library compatibility. It is issue with integrating native code with winjs. WindowsRT doesn't provide support for the same.

    Friday, January 3, 2014 1:56 PM
  • I'm not sure what you mean by "integrating native code with winjs". You absolutely can use native code in a Windows Runtime Component which can be called from a JavaScript app.

    This native code must use only API available to Windows Store apps, but (outside of UI framework differences) there are no significant restrictions beyond that.

    Taking a quick look at the BouncyCastle site it has a C# (not native) library. This likely is written for the full .Net Framework and doesn't run on the .Net Core framework used by Windows Store apps. See .NET for Windows Store apps overview

    Bottom line is still the same: you need to use a library that is valid in Windows Store apps. Since it appears that BouncyCastle is an encryption library you might want to look at the Windows Runtime encryption classes to see if they will work for you.

    If the problem is figuring out how to use this with Cordova then you'll probably need to ask Cordova.

    --Rob

    Friday, January 3, 2014 7:06 PM
    Moderator