cancel
Showing results for 
Search instead for 
Did you mean: 

SAP UI 5 on iOS UIWebView

jinesh_krishnan
Advisor
Advisor
0 Kudos

Hiya

I wanted to render SAP UI 5 pages in a UIWebView on an iOS 7 device. i am loading this file locally while loading i am getting an exception on

sap.ui.localResources("babel") , the exception is "ReferrenceError: Can't find variable:sap" . i have made sure all necessary libraries are available and added to Xcode project. The same page is getting rendered in chrome browser, though i have to manage "Access-Control-Allow-Origin" header.  

The same page is also loading right on a HWC container. Though i have not tried it on a separate cordova project. Is there any one who tried to load a UI 5 page on UIWebView, any help is much appreciated. 

Regards

Jinesh Krishnan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jinesh

Access control is the main issue here..the sap ui cor library gets loaded with an ajax call..in ui web view you will have yo explicitly set the cross reference access control as allowed..by default it woukd treat this as security threat

So uiwebview by defaukt cannot be coded to do this..I knw for file:// or http:// it has some acess control configurations but it is best handled in phonegap..so unless we want to expirimebt with native webview ..I woukd suggest we switch to phonegap

Have fun with respinsivenessnof ui5 in ios

Cheers

Jemin

jinesh_krishnan
Advisor
Advisor
0 Kudos

Hi

It seems the problem is with the way web content folder has been added to the X code project. When i first added i selected "Create groups for any added folder" , this was only creating a folder for grouping purpose. It does not reflect the actual folder structure, hence resourceLoading was failing. When i adde files with "Create folder references for any added folder" resource loading is working perfectly fine.

Regards

Jinesh Krishnan

Former Member
0 Kudos

Ambarrased!! But I did paraphrase the non existing problem pretty good

Answers (0)