In my earlier blogs, I have discussed about how to setup the Android development platform and run SAPUI5 Mobile App in Eclipse. This blog will cover the steps to run the SAPUI5 in Xcode for iOS devices using PhoneGap.
Prerequisite: You have installed Xcode in your IOS.
Download the latest PhoneGap folder from the PhoneGap website and unzip them in your desktop.
I’m Packaging the PhoneGap in Xcode using “Command Line Interface“.
Create an empty folder in the desktop. I created folder with name “JUN11” [ Just to remember the folder name easily..:) ].
Launch the “Terminal” app.
Open the downloaded PhoneGap folder and drag the “bin folder” from the path Phonegap-2.9.1->lib->ios->bin into the terminal app.
You should see the bin path in the terminal after performing the above step.
Once the Terminal app is opened, create a new project in Xcode with Cordova libraries using the below command line as shown and enter the password of your desktop if required.
“sudo ./create ~/Desktop/Jun11 org.apachecordova.Jun11 Jun11”
You should see all the Cordova libraries, folders created as a result of above step under the folder.
Copy all your SAPUI5 developments from your eclipse and paste under the WWW folder.
As I have used index.html in my project, it has overwritten the default file which gets created during folder creation. I just copied the folders from the Eclipse project explained in blog 2.
Copy the Cordova.Js file downloaded from Phonegap into the WWW folder as shown below.
Once you open the Jun11.xcodeproj, you can see the project with the below structure in Xcode.
If you have created the SAPUI5 application with different start up HTML file, you can overwrite it in the AppDelegate.m file by uncommenting the line self.viewController.startpage = @”index.html”;
Make sure the index.html file has the access to these Cordova.JS files.
Choose the Simulator to test your UI5 app.
I was successfully able to generate the app, export the .IPA file from the Xcode. Here is my UI5 running in the Simulator mode.