Hi Robert
My working code was as follows I am not sure media:/// will work as the process is external of Servoy ie iPhone looking for image not within Servoy
function onSolutionOpen(arg, queryParams) {
var icon = {
tagName: "LINK",
attrs: [
{ name:"REL",
value:"apple-touch-icon"
},
{ name:"HREF",
value:"https://www.clickdigital.com/_clients/test.png"
}]
};
var chrome = {
tagName: "meta",
attrs: [
{ name:"name",
value:"apple-mobile-web-app-status-bar-style"
},
{ name:"content",
value:"black"
}]
};
var webapp = {
tagName: "meta",
attrs: [
{ name:"name",
value:"apple-mobile-web-app-capable"
},
{ name:"content",
value:"yes"
}]
};
var cache = {
tagName: "meta",
attrs: [
{ name:"HTTP-EQUIV",
value:"CACHE-CONTROL"
},
{ name:"CONTENT",
value:"NO-CACHE"
}]
};
plugins.ngclientutils.contributedTags.push(icon);
plugins.ngclientutils.contributedTags.push(webapp);
plugins.ngclientutils.contributedTags.push(chrome);
plugins.ngclientutils.contributedTags.push(cache);
plugins.ngclientutils.setViewportMetaDefaultForMobileAwareSites();
}
The issues I had were, it worked perfectly UPTO the point it lost the connection to Servoy ie the session timed out. The result was a white screen which meant that the web app was looking at the old session which Paolo tells me is related to the tab. I have, on his advice done a version of Cordova which does work but is a huge pfaff to set up.
I would observe the following:
-
The vast majority of corporate solutions do not require advanced phone features ie Camera. They simply require a corporate branded app experience which is simple to use and does not result in the user getting distracted ie removing the chrome and address bar from Safari.
-
Being able to configure this with the above script was incredibly simple and worked perfectly until the session died at which point it had to be re added to the home screen (iOS in my case)
SO I would suggest there are 4 options the first two of which are viable and all are possible. IF Servoy were able to make the first one work it would be a massive time saver and make Servoy far more mobile friendly. What was it Steve Jobs said 'Web Apps are great" https://9to5mac.com/2011/10/21/jobs-ori … tive-apps/
a) Servoy NG with the above script if there is a way to fix the session thing (would require Servoy to comment on this) Its an enhancement to the Servoy product and an easy win
b) Cordova native version - it works but requires a lot of effort to set up ie Node, Cordova, Xcode, ADC Membership etc
c) Servoy’s own mobile plugin I have not used but when I looked the idea was sound but the execution was involved and the end result was not beautiful
d) Using Ionic or similar framework with REST - Great but this is not Servoy and has its own challenges not least its hard to configure and is not on data broadcast etc
Interested to know your thoughts on this
Regards
Gordon