MobileFirst is_connected, is_disconnected events do not work - ibm-mobilefirst

I'm using MobileFirst 7 to develop a hybrid Windows8 + iPad app.
The event WL.Events.WORKLIGHT_IS_DISCONNECTED works fine if I start my app with server down, but if I start app with server up (online) then I stop server the event is not risen.
This happens in both Windows8 and iOS (ipad) environments.

A regression was introduced in MFPF 7.0 causing the WORKLIGHT_IS_CONNECTED and WORKLIGHT_IS_DISCONNECTED events to fail (APAR PI38012). It was fixed in a subsequent iFix release.
If you are using the Developer Edition then make sure you are using the latest build in Eclipse > Help > Check for updates.
If you're using the Consumer or Enterprise Editions then get the latest iFix from IBM Fix Central website.
The date of the fix should be from 2015-04-08 or later.

Related

Preview not working on MobileFirst Platform Foundation Server 7.0

On the MobileFirst Server Platform Foundation 7.0, the Preview is not working in the console. On the Eclipse development side, all is working well.
The error message is the following:
Here is the error in the log:
[4/10/15 12:12:55:267 CEST] 00000027 org.apache.wink.server.internal.RequestProcessor I The following error occurred during the invocation of the handlers chain: WebApplicationException (404 - Not Found) with message 'null' while processing GET request sent to http://10.3.20.64:9080/catalogmanagerfull/authorization/v1/clients/preview
The application can use the server without any issue. It's really only the Preview in the console that is not working. The Application Server is a WAS Liberty profile running on Linux.
In a MobileFirst Server V6.3, the same project has no issue.
Preview is not meant to work in a production environment, however the preview button was still there in the GM release of MFPF 7.0.
I think you might have hit APAR PI37266:
MFP OPERATIONS CONSOLE: PREVIEW OF COMMON RESOURCES BUTTON MUST BE
HIDDEN IN PRODUCTION ENVIRONMENT
So, you should update your installation to the latest available 7.0 iFix, whereh the preview button is not longer available.

Upgrading Worklight 6.2 to MobileFirst Platform 7.0

We are using Worklight enterprise 6.2 with fix packs and we are planning to upgrade to 6.3 in the next month (beginning of May 2015). However, we see now that IBM is about to release MFP 7.
Can you please clarify to me those queries:
What is the impact on the project which has been developed on version 6.2 to be moved to 6.3 or 7?
What is the recommendation for us in terms of upgrading, should we go immediately to WL7 or to 6.3 first?
We are very close to the production and our concern that the WL7 "might" be unstable or contains issues that we might face in a critical time."Feedback would be appreciated"
MobileFirst Platform Foundation 7.0 is not about to be released - it is already released.
Lots of changes in both 6.3 and 7.0. Read the documentation to see what's changed...
6.3: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.getstart.doc/start/c_release_notes.html
7.0: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.getstart.doc/start/c_release_notes.html
In terms of your project structure, starting 6.3 the adapter thread pool has been removed and you are now in complete control of it. Your adapter XML will be upgraded to the new structure.
In terms of technology, starting 7.0 there is REST support together with a new authentication mechanism - OAuth. Classic authentication is as before and is still there. There are also now Java adapters in addition to JavaScript adapters, and lots more.
7.0 is indeed new, but provides you with a lot of new possibilities.
6.3 is very stable (that is not to say that 7.0 is not stable, but it's also very new).
We cannot decide for you if to upgrade or not, it sounds like you are already considering the right things to consider.
Read about the two releases.

Is analytics available with the MobileFirst Platform CLI developer edition?

I have installed the MobileFirst Platform CLI developer edition from https://developer.ibm.com/mobilefirstplatform/install/#clui
I am trying to investigate the analytics of the application, but this doesn't seem to be properly installed from here.
I am able to create a MFP server, start it and access the console. It doesn't have a link to the analytics in the top-right of the console as it does in the developer edition provided by Eclipse. Is this behaviour as expected or is there something missing?
I have tried installing this package twice. I am running on OSX 10.10
In the Liberty servers directory, /Users//.ibm/mobilefirst/6.3.0/server/wlp/usr/servers, I can see the Worklight folder. It has an _analytics.war file in it (which is different from my Eclipse install which has a worklight-analytics.war and worklight-analytics-service.war)
And in the messages.log file, I am getting messages saying that the web application _analytics is available.
But I then a number of messages with
com.worklight.analytics.api.AnalyticsHttpService.sendDataToURL target server response code: 404
Going directly to http://localhost:10080/_analytics responds with an "Authorization failed" message.
Update - Got it working
I uninstalled the dev edition CLI and downloaded the CLI from Passport Advantage and installed it from there. The analytics feature now seems to work. Although the link to it is still not available in the top right of the console.
I don't know if it's a different install package, or an issue on my Mac that I inadvertently resolved, but the analytics feature is now working
The issue here was that the version you originally downloaded was not up-to-date.
This will be corrected soon.
Proper mechanisms will be put in place so that this will not happen again.
Yesterday I downloaded and installed the publically available MobileFirst Platform 6.3 CLI from https://developer.ibm.com/mobilefirstplatform/install/#clui. I created a simple app which connects to the MFP server.
Result: Analytics works without any problem.
So you do not have to buy the product just to use the CLI with analytics.

IBM Worklight SimpleDialog platforms limits

I am using Worklight 6.0 for an application working on 4 platforms (iOS, Android, Blackberry and Windows Phone 8).
While using WL.SimpleDialog I can notice today that the handler button option/callback does not work on Blackberry 10. Also when reading the documentation at http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.0.0/com.ibm.worklight.help.doc/apiref/r_wl_simpledialog_show.html there is nothing that mention that.
For the test on Blackberry, I am using Webworks 10 version 2.2, and I am inspecting the device.
I call the SimpleDialog this way:
WL.SimpleDialog.show("Alert", "Popup message", [{text:"ok", handler: function() {
console.log("hello") ;
}}]);
The message "hello" is not appearing on console after I press the button and there are no errors appearing on console too.
Update : One more detail: I checked an old version, compiled 1 year ago with webworks 1.0, and handler is working for the old version.
Is this an issue related to Worklight 6.0 and Blackberry Webworks 2.2 ?
Do you confirm that the handler option is not supported for Blackberry ? also is it supported for Windows Phone ?
Update: Fix for WL.SimpleDialog is available starting November 25th, 2014. You should be able to download the latest 6.0.0.x iFix from IBM Fix Central (or request it via a support request (PMR)).
Per the Common UI Controls training module (slide #13):
When you use WL.SimpleDialog in Windows Phone 8, you can use at most
four buttons in each instance of WL.SimpleDialog.
When you use WL.SimpleDialog in Android, you can use at most three
buttons in each instance of WL.SimpleDialog.
As for the callback in BlackBerry 10, it should work. Are you getting any errors?
Also provide your SimpleDialog implementation, i.e. what are you calling and how you are calling it.
Edit: Make sure you have added all required plug-ins: org.apache.cordova.dialogs AND org.apache.cordova.invoke.
Edit #2: the callback not getting invoked has been confirmed as a defect. To receive a fix, please open a PMR.

Installing jazz 4.0.2 plugin with IBM Worklight 6 (juno eclipse) causes functional degradation in worklight

I've installed worklight 6 into an existing juno 64 bit eclipse running in windows 7. Runs great. I then install the jazz RTC 4.0.2 plug in into that eclipse environment. After the plugin is installed, there is a noticeable loss of function. The following are examples:
On the create new Hybrid app page, the option for changing the dojo library used is gone. The dialog resembles the WL5 version.
after a dojo hybrid is created, the www folder is missing from the WL project
Some dojo widgets do not work (i.e., not presented on the mobile device emulator or in resulting adroid application) like dojo.mobile.Heading
The only way to resolve is to uninstall the RTC plugin. Any suggestion on how to make this work? Using WL5.0.6.1 and same Jazz RTC plugin has no problems. We want to move to newer WL and upgrading RTC is not an easy option.
Are you using Eclipse Java EE 4.2.2? That's the only supported version for Worklight Studio (i.e. make sure you are not using 4.2.1 or 4.2 alone).
Other things I would try:
1) Use RTC 4.0.3 plug-in instead 4.0.2, that could make some difference and usually these clients have backwards compatibility with the server.
2) Install RTC before Worklight Studio, and see if it makes any difference.