Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Installing Kapsel Offline OData for Cordova Windows 8.1 App

Hi,

I have created a Kapsel application that should run on Windows 8.1. This application currently uses two Kapsel plugins (and its dependencies).

  • Logon
  • OData (Offline)


The application has been build using the SMP SDK 09 PL02 and SMP Server SP08 PL01 (currently everything up-to-date).

I am developing on a Windows 8.1 OS using Visual Studio 2013 Update 3.

I have created the application following this guide and these steps:

Getting Started with Kapsel - Part 10 -- Offline OData (SP09+)


  1. cordova -d create TestProject com.evora.testkapsel TestProject
  2. cd Testproject
  3. cordova -d platform add windows
  4. cordova -d prepare
  5. open "<path>\TestProject\platforms\windows\CordovaApp.sln" in VS2013
  6. retarget to Windows 8.1 (right klick solution -> retarget to windows 8.1))
  7. add plugin on console:  Perform changes on the project "CordovaApp" (all other platforms link to here.)delete windows phone and windows 8 and windows 10 projects (just the windows 8.1 and CordovaApp project remains)
    1. cordova plugin add kapsel-plugin-logon --searchpath %KAPSEL_HOME%/plugins
    2. cordova plugin add kapsel-plugin-odata --searchpath %KAPSEL_HOME%/plugins
      1. see OData-Plugin Manual Steps
  8. do changes in Windows 8.1 project (anyway linked to CordovaApp project)
  9. build in VS
  10. run in VS

The SMP Server seems to be correctly configured, because I can do logons. But following code line ends in the errorCallback:

store.open(openStoreSuccessCallback, errorCallback/*, options*/);

This is the error message I can extract from the exception object:

An error occurred "{\"errorCode\":\"9\",\"errorMessage\":\"Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E)\",\"errorDomain\":\"OfflinePluginErrorDomain\"}"

During the process of adding the Kapsel OData plugin mnaul steps have been mentioned:

* ADD NATIVE REFERENCES FOR THE WINDOWS 8.1 PROJECT

* 1) Open the Cordova generated solution in Visual Studio.

* 2) Select the project generated for Windows 8.1. Select the References node, Right Click and select "Add Reference".

* 3) Click "Browse", locate the OfflineOData plugin location on your disk ({OfflineODataPluginDirectory}/windows81/bin/win)

* 4) Select *.winmd and *.dll file for the appropriate CPU architecture of your project (x86 or x64 or ARM). This file is located in {OfflineODataPluginDirectory}/windows81/bin/win/[x86 or x64

]

* 5) Select "Windows 8.1" -> "Extensions" and select "Microsoft Visual C++ 2013 Runtime Package for Windows (Version 12.0 or higher)".

* 6) Click OK to add the references.

Strange at this is, that I am neither able to add the "SAP.Data.OData.Offline.Store.dll" nor the "Microsoft Visual C++ 2013 Runtime Package for Windows (Version 12.0 or higher)", because the "Add Reference dialog" is just allowing me to add ".winmd" files. And when I try to add the C++ Runtime below Windows 8.1 -> Extensions, its loading forever and never shown any selectable entry.


I could assume that this has something to do with my problem.

So my questions:

  1. Does someone has general thoughts on my problem?
  2. How can I add the requested .dll files as reference to the project?
  3. How do I add the Visual C++ references to the project?

It would be really nice if someone had an idea. Some people had the sam eproblem here on SCN, but none of the suggested steps helped me so far.

Thanks in advance

Sascha

Tags:
replied

Found a solution. Needed to change the performed steps a little bit.

  1. Visual Studio 2013 Update 5
  2. cordova -d create TestProject com.some.identifierTestProject
  3. cd Testproject
  4. cordova -d platform add windows
  5. cordova -d prepare
  6. add plugin on console: 
    1. cordova plugin add kapsel-plugin-logon --searchpath %KAPSEL_HOME%/plugins
    2. cordova plugin add kapsel-plugin-odata --searchpath %KAPSEL_HOME%/plugins
      1. see OData-Plugin Manual Steps
  7. cordova -d prepare
  8. open "<path>\TestProject\platforms\windows\CordovaApp.sln" in VS2013
  9. Add native references. For me just winmd-files could be added
    1. add all winmd-files in the plugin directory
    2. if C++ Runtime is missing. Add it in the Windows 8.0 project and it should appear in the add reference dialog for the Windows 8.1 project
  10. Set these preferences in config.xml<preference name='windows-target-version' value='8.1' /><preference name="LoadUrlTimeoutValue" value="120000"/>
  11. Perform changes on the project "CordovaApp" (all other platforms link to here.)
  12. build in VS
  13. run in VS
0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question