JS file runs on emulate but not on phone

I am trying to run a script that is saved in my JS files after my directives and filters in my controller.js. I can get it to run on IONIC EMULATE -C -L and also IONIC SERVE but if i try to run from build on xcode or once i put in testflight on phone it doesnt run. Its the twitter widget js that turns blockquote embedded tweets into twitter format so they look nice and neat and also show images and videos.

The file is at the bottom with the src widget.js. I also only need it ran on one template in my app.

My App
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

<link href="css/ionic.app.css" rel="stylesheet">

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/ionic-platform-web-client/dist/ionic.io.bundle.min.js"></script>
<script src="lib/ngCordova/dist/ng-cordova.min.js"></script>
<script src="lib/ng-twitter-api/dist/ng-twitter-api.min.js"></script>

<script src="cordova.js"></script>
<script src="js/app.js"></script>
<script src="js/camera.ctrl.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>


<script src="js/widget.js"></script>