简体   繁体   中英

ReferenceError: cordova is not defined in MobileFirst

I am developing Chat application push notification using PubNub. I used pushnotification.js file in my Mobilefirst project as per the direction from

https://www.pubnub.com/blog/2014-12-18-sending-android-push-notifications-via-gcm-javascript-using-phonegap/

But i am getting the "ReferenceError: cordova is not defined" . How can i solve this issue in my MobileFirst Project?

Please suggest

You are not explaining at all(!) the steps you have taken in order to set this up. I am not sure what kind of support you're actually looking for with such a question.

What I Can recommend you to do is to NOT use a Hybrid app for this. Instead, assuming you're using MobileFirst Platform Foundation 7.1, you can use the "pure" Cordova application type (instead of "hybrid" from MobileFirst Studio). With this application type you will be able to more easily follow the instructions provided in that page.

This is because plug-man is not supported by Hybrid apps to install Cordova plug-ins, making it very difficult to get things working.

So go ahead and follow this tutorial first: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/hello-world/integrating-mfpf-sdk-in-cordova-applications/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM