0

I am attempting to enable push notifications with the MobileFirst Platform Foundation service. However, when I initialize Bluemix, I receive the following error messages:

"Uncaught Exception: ReferenceError: IBMBluemix is not defined at (compiled_code):10"
ReferenceError: IBMBluemix is not defined
TypeError: cordova.define is not a function
"Uncaught Exception: TypeError: cordova.define is not a function as (compiled_code):1" 

enter image description here

Edited to add index.html info

<script type="text/javascript" src="http://www.testapp.com/blog/js/jquery.order.js"></script>
   <script src="js/Services.js"></script> 
   <script src="js/main.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMBluemixHybrid.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMDataHybrid.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMPushHybrid.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMBluemix.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMBluemix.min.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMBluemixHybrid.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMCloudCode.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMCloudCode.min.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMCloudCodeService.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMData.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMData.min.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMDataHybrid.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMPush.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMPush.min.js"></script>
   <script type="text/javascript" src="js/bluemix/IBMPushHybrid.js"
</script>  
James Young IBM
  • 616
  • 1
  • 5
  • 13
ValerieLampkin
  • 2,620
  • 13
  • 27
  • Can you please throw some details of your application where you are enabling the push notifications? I am looking for files like javascript and index.html if you have one? – Kamaganahally Jaganatha Sep 22 '15 at 18:57

1 Answers1

1

@ValerieLampkin, the error may be thrown if IBMBluemix library is not loaded yet: check to see you are loading the correct Bluemix.js before the other js libraries. In order to make it to work fine, you have to load all the libraries before your custom code.

<script src="js/Services.js"></script>
<script src="js/main.js"></script>
<script type="text/javascript" src="js/bluemix/IBMBluemixHybrid.js"></script>
<script type="text/javascript" src="js/bluemix/IBMDataHybrid.js"></script>
<script type="text/javascript" src="js/bluemix/IBMPushHybrid.js"></script>
<script type="text/javascript" src="js/bluemix/IBMBluemix.js"></script>