cordova 1.7.0 set info error - ios5

I am using cordova 1.7.0. My app is running fine in simulator but a message comes like
Error: executing module function 'setInfo' in module 'cordova/plugin/ios/device'. Have you included the iOS version of the cordova-1.7.0.js file?
I have included
<script type="text/javascript" charset="utf8" src="[location of cordova.ios(for ios)]"></script>
in index.html but did not work.Plz help.

there must be something wrong with the path to the js.
The index.html file is read?
Is your www folder maybe a group instead of a reference folder?
Go step by step

This generally happens when the cordova file is not properly available when the page is loaded. You can check that it is referencing properly by opening the index.html (or your start page) in the Chrome and check in Inspect Element that all the resources are loaded and there are no errors.

to solve this problem, just follow steps in picture

Related

ionic 4 sub paths not loading when running ionic serve

I had an ionic 4 beta project of --type=angular that was loading at any path without issue.
Periodically, i have been updating my packages by running an npm update and am currently at:
"#ionic/angular": "^4.0.2"
as well as updated installs for the ionic cli, and am currently at:
CLI 4.10.3
I am not sure when this app loading issue started, but i suspect it was after running the last npm update or update install of the cli.
When running ionic serve my application loads correctly, and i am able to navigate to all sub paths without any issues.
However, when:
• refreshing the browser while viewing a sub path
• attempting to enter a url with a sub path
• live reloading while viewing a sub path
the app attempts to load all js files relative to the sub path and fails to run like so:
http://localhost:8100/page/sub/path
fails to load because the app attempts to load runtime.js here:
http://localhost:8100/page/sub/path/runtime.js
my base href is currently set to ./
When i inspect the html source, the script tags are formatted as follows:
<script type="text/javascript" src="runtime.js"></script>
If i attempt to load a page directly at the root, the application loads ok without issue like so:
http://localhost:8100 loads OK
http://localhost:8100/page loads OK
So again to recap, the app only fails to load the js assets at a sub path.
Any idea where to begin troubleshooting?
For anyone running into this same problem, i have the answer.
I am not sure when or why, but my base href was set incorrectly and this was the problem.
I changed my base href from ./ to / and this solved my problem.

how to use ionic script in angular project

I need to know how to implement the below script in my angular index.html file
<script src='node_modules/#ionic/core/dist/ionic.js'></script>
It is throwing as above URL is not found even though I have installed #ionic/core. Can someone help me with this
i tried to include that script in angular index.html file but it not working
Thanks in advance
Regular
Pinterest

How to build browser version in Ionic 4

How to build browser version using Ionic 4. When I tried to build using ionic cordova build browser --prod and uploaded platforms/browser/www files on server and tried to run in browser it’s not showing anything(webpage is blank) and getting below error in devtools.
Can anyone please help me on the same?
Hi I also had this problem with my vuejs apps and it also happened with the new ionic 4 production build.
It looks like these system assume that you are going to drop the "dist" or "www" files in the home directory of your web server like in my case I was using xampp server. But we usally put these files in a sub directory like htdocs/app2.
So for this to work you need to change the <base href="/" /> in ionic 4 to <base href="/app2/" /> or what ever your app is. In vue js it's almost the same thing. but you can manually add "/app2" to the index.html file's scripts.
That worked for me; you can try it.
If you are trying to deploy the app in the server in a custom folder then you need to change the <base href="/" /> to <base href="/custom_folder_name/" /> in the index.html file in your project.
Try this change in index.html base.
Before: href="/" />
After: <base href="./"
it changed in the last version. This works for me:
ionic build --prod --public-url=/app/
I had the same problem, my solution was to upgrade xampp version to latest.
Try ionic build --prod.. The www folder has everything you need for a website.

javascript library not loaded in ionic

Im including the google cast external javascript library. When I run with ionic serve it works good, but when I run the app in the phone, the library is not loaded. Debugging can see that :
https://cdn-enterprise.discourse.org/ionicframework/uploads/default/original/3X/a/d/ad4c985f45c1c538bdfbfbb02d10141b6929e1d5.png
The "http" is replaced by "file"!
I tried to include the libraries with that code:
script src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1">
and with type="text/javascript" added; but all codes replaces http by file, and the library is not loaded.
Any suggestions?
When you run the app do not add cdn files starting with "//:", add them like "http://".
If its possible download those files and keep them in directory, after that give directory path to file.
e.g. <script type="text/javascript" src="assets/js/library.js">

playframework2 jquery error (jquery.min.map)

When I launch my minimal play2 application I can see an exception in the js console like:
GET http://localhost:9000/assets/javascripts/jquery.min.map 404 (Not Found)
Why it happens? Is it known issue. I've seen some play-tool-projects on github that has this file there. By default I do not have this file in my "javascripts" folder. Should I?
The source map file maps the minified version of the code against the un-minified version so that you can access the real code while debugging.
The 404 error only appears when using the developer tools. To fix this, just download the correct version of your source map file. Mine for example was:
jquery-1.9.0.min.map
Then rename it to:
jquery.min.map
and move it in the javascripts directory.
Try to map of the Assets controller in your conf/routes file.
GET /assets/javascripts/jquery.min.map
For more information read this documentation
Working with public assets