Using Ionic 2 with IBM MobileFirst 7.1


#1

I need to know the structure of an IBM MobileFirst hybrid mobile application using Ionic 2. I found a tutorial witch explain that but using Ionic 1, and I try to apply it with the new version but node_modules generates always compilation errors in Eclipse.
tutorial link


#2

Hm I don’t know a whole lot about MobileFirst platform, but maybe @raymondcamden would be able to shed some light here?


#3

So - I haven’t tried Ionic2 with MF yet, just Ionic1, but I have a few suggestions.

1 - Stop using Eclipse. Instead, use the command line to work with the app. Please see my blog post here (https://developer.ibm.com/mobilefirstplatform/2015/09/15/hybrid-mobile-development-and-mobilefirst-7-1-increasing-the-awesome/) where I describe using the CLI to work with the build.

2 - Related to that blog post, once you have a ‘virgin’ Ionic2 project building right, you should then look into integrating the MF init stuff. I’m still real new to Ionic2, but you should be able to tie into the bootstrap code to handle connecting to MF.

I’ll definitely look into documenting this - but not till Ionic2 is in RC (or released).


#4

As Ionic2 is still in beta, MFP with Ionic2 is still in cooking stage.

Will keep you posted once there is something solid.


#5

Hi @raymondcamden, I’m new to MobileFirst, could you please talk about the benefits of using MobileFirst+Ionic 2 instead of just using the Ionic CLI? Thanks in advance!


#6

It isn’t either/or per se. MF provides back end services to help you create a better mobile application. I don’t want to ‘spam’ the board here with the benefits of MF and all that (I used to be an evangelist for the product, but now I’m focused on Node stuff), so I’d say check out the web site and see if the benefits make sense to you. But again - it doesn’t “replace” Ionic per se.


#7

Hi,

Ionic 1.3.1 version not working in ibm mobile first 7.1 but “version”: “1.2.4”, working please let me know what is the issue


#8

Sorry not sure what to tell you. If you see an issue on the Ionic side, file a bug, if you see it on the MFP side, file a bug there. :slight_smile: I don’t work with MobileFirst anymore.


#9

Please check attached screen shot for your reference. if i use ionic 1.3.1 i am error like that . can you please help on this issue


#10

if i use ionic 1.3.1 i am getting error like in the attached screen shot in MFP


#11

Thanks for your reply. We roughly went through the MF stuff and didn’t find too many features that add extra benefits than using Ionic 2 itself. Will keep digging deeper though.:+1:


#12

Issue is that MF 7.1 is not compatible with angular 1.5. So MFP 7.1 is constrained to ionic 1.2.4. It is also constrained to cordova versions Android (3.6.4) iOS (3.7).


#13

Hi,
Here is a sample I did which shows you how to combine MFP7.1 and Ionic2.

Best Regards,
Ishai Borovoy


#14

Hi,
do we have any sample for MFP8.0 and ionic 2? Because MFP8.0 is latest one and I want to integrate it into my ionic 2 project.

Thanks in advance.


#15

Sure,


#16

Hi,
While installing “cordova plugin add cordova-plugin-mfp” I am getting error “Failed to install ‘cordova-plugin-mfp’:CordovaError: Plugin doesn’t support this project’s cordova-android version. cordova-android: 6.0.0, failed version requirement: >=5.1.1 <6” . I tried downgrading cordova version but still cordova version is showing 6.0.0. Because of this I am stuck , I am not able to do further changes. Please can you help me?


#17

See https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/sdk/cordova/

Check that your cordova-android: >= 5.1.1 and < 6.0

See http://stackoverflow.com/questions/22152016/how-do-you-use-the-cordorva-cli-to-add-a-specific-version-of-the-cordova-framewor it might help or maybe this one http://stackoverflow.com/questions/21391431/can-i-install-a-previous-version-of-a-plugin-using-the-cordova-plugin-add-comman


#18

Hi,
Thanks for quick rply…It worked…


#19

Hi,
I am sending MobileFirst Analytics through ionic 2 app. But on MFP analytics console in message tab it showing InternalRequestSender Outbound. The key which I have send is not appearing in MFP console. I am using the below link for analytics reference.
https://mobilefirstplatform.ibmcloud.com/labs/developers/8.0/advancedmessenger/

I have tried sending logs using below methods
WL.Logger.error('MFPInitComplete: '+‘Sample message’);
WL.Logger.send();

WL.Analytics.log({'Sample Key' : 'Sample Message'});
WL.Analytics.send();

Could you please help me in this issue?


#20

Hi,
Am trying with ionic 2 + IBM MF 8

but inside the self.renderer.listenGlobal(‘document’, ‘mfpjsloaded’, () => {

/// WL is undefined here if i add 5-10 sec timeout then i can see the WL

});

Please help