Currently Being Moderated

Hi Friends,

If I may put my 2 cents in, I would like to share, with those following the openSAP course 'Introduction to Mobile Solution Development', how easy and quick is to port the first week, unit 5, app (My First Integrated Mobile App, originally created for Android), to iOS.

Pre-requisite is, of course, to own an Apple Mac with Xcode installed.

So, let's assume to have completed the above unit, and hence having the 'myFirstIntegratedHWCApp' in the Eclipse ide

Image1.png

possibly up and running in the Android emulator / real device.

 

As detailed in the document for the settings and installations required for performing the course development work, we need, among others, to get Apache Cordova, aka PhoneGap.

Well, within the Apache Cordova 3.0.0 source download, there is a folder called cordova-ios:

Image2.png

move to that folder within a Terminal window, and run the create command:

Image3.png

this will create a new Cordova iOS project, in the specified path (/Documents/myFirstAppTestios).

 

Now, in this folder, delete the whole content of the 'www' directory, with the only exception of the cordova.js file. And copy here the content of the Eclipse project same name folder (found under /assets/www): of course, without touching the original (iOS project) cordova.js file.

 

Let's start now Xcode, and open the newly created Cordova iOS project:

Image4.png

Simply build and run it in the iPhone simulator:

Image5.pngImage6.pngImage7.png

Easy and quick, isn't it? 

 

Remark: as stated in posts within the Discussion forum at openSAP, to avoid the HTTP Request Failed error, I also changed the OData request for the products collection using standard sap-user=<myuser>&sap-password=<mypassword> in the URI, instead of the parameters user: "myuser", password: "mypassword"

Image8.png

Comments

Actions

Filter Blog

By author:
By date:
By tag: