Topic
7 replies Latest Post - ‏2013-04-17T14:22:08Z by IdanAdar
IdanAdar
IdanAdar
741 Posts
ACCEPTED ANSWER

Pinned topic Development FAQ

‏2012-07-11T07:24:36Z |
Question:
I am trying to develop adapter-based authentication using requireAuthentication=onStartup, but this does not work!

Answer:
Adapter-based authentication will not function with the onStartup setting.
onStartup authentication means that your application has to first authenticate to be able to gain access to adapters in the first place. So, you're in a loop - you need to authenticate to be able to invoke adapters, but you need to be able to invoke adapters in order to authenticate.

Therefore currently the only option to use adapter-based authentication is by using the onDemand setting.
You can use WL.Client.login("your-realm-name") in your JavaScript to invoke authentication sequence on application start-up.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Development FAQ

    ‏2012-07-17T04:50:52Z  in response to IdanAdar
    Question:
    Where do I find my application's logs during development time?

    Answer:
    The various logs (Audit, Error, Server)can be found in the Eclipse workspace.
    The full path would be: <eclipseWorkspace>/WorklightServerHome/<projectName>/logs/<logName>.log
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Development FAQ

    ‏2012-08-06T10:32:14Z  in response to IdanAdar
    Question:
    When I'm trying to launch my application in the Android emulator, I get an error message stating that the application could not connect to the server. Why?

    Answer:
    Make sure that your application's application-descriptor.xml points to an actual server and not to localhost.
    This can be set via the worklightServerRootURL element in the XML file.

    Android runs a server within, and when pointing to localhost, the emulator will then try to connect to itself rather than to Worklight Server.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Development FAQ

    ‏2012-08-27T08:03:40Z  in response to IdanAdar
    Question:
    Dojo and internationalization how-to?

    Answer:
    http://dojotoolkit.org/reference-guide/1.8/dojox/mobile/internationalization.html#dojox-mobile-internationalization
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Development FAQ

    ‏2012-12-10T17:07:22Z  in response to IdanAdar
    Question: While developing my application in Eclipse using the split view option, the following error appears: "Response cannot be parsed, please contact support"

    Answer: Please review the following IBM tech note: http://www-01.ibm.com/support/docview.wss?uid=swg21613220

    Update: fixed in Worklight 5.0.5

    Message was edited by: IdanAdar
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Development FAQ

    ‏2012-10-13T05:18:02Z  in response to IdanAdar
    Question: How do I tell what version of Worklight I have running?

    Answer: See this technote that explains how to find your Worklight internal version number and how it maps to the Worklight external fixpack number.
    http://www-01.ibm.com/support/docview.wss?uid=swg27036358

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Development FAQ

    ‏2012-10-28T05:43:42Z  in response to IdanAdar
    Worklight and the various App Stores.

    Question: Does Worklight handle deploying to the iOS and Android Stores?
    Answer: No, Worklight will help you to create the .apk and .ipa files that are needed to submit your applications to the Android Marketplace and Apple App Store. You must then follow the process set up by Apple (iOS) or Google (Android) for submitting and approving the ipa/apk that you created using Worklight.

    Question: We want to minimize manual steps and would really like to have a code set automatically deployed to the iOS store. Is this doable?
    Answer: No. You must follow Apple's procedures for submitting and updating an application. The process has gotten a lot smoother overtime but not to the point where it could be fully automated.

    Question: What code artifacts are hosted on our own server and what is hosted in the app store(s)? I assume anything like HTTP Adapters resides on the WAS box, but what about HTML5/CSS and JavaScript?
    Answer: Whatever lives inside your ipa/apk is what goes into the stores. The Worklight builds in the HTML, JavaScript and CSS files into the ipa and apk, so they reside in the app that is in the stores as well. Everything else lives in your server.
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Development FAQ

    ‏2013-04-17T14:22:08Z  in response to IdanAdar

    Question: Why I'm having style rendering problems when launching my Worklight Dojo application?

    Answer: The best practice for using deviceTheme is using <script> include in the <head> area, *before* dojo.js, to avoid style problems due to the timing difference with AMD loading.

    To get this, you will need to change the way deviceTheme is referenced from the application:
    1) Remove dojox/mobile/deviceTheme from the require() call in the application.js file
    2) Add it in <script> include BEFORE dojo.js (<script type="text/javascript" src="dojo/dojox/mobile/deviceTheme.js"></script>)