I have a problem with my Phonegap application. I got a 404 error on phonegap.js
I understand that the compiler (I'm using Phonegap build) will replace the src of my phonegap.js by the real path but I don't get that.
It's weird because I have all the other scripts loaded but not this one.
This screenshot is from Safari, debugging my application launched on my iPad to give you more details.
I'm using Phonegap 3.1.0 with an iPad Retina 64 bits with iOS 7.0.
Edit: I can't use Phonegap 3.4.0, Phonegap build is still not supporting it.
Thanks in advance !
Think of phonegap.js as the runtime. It only exists when your app is running on a device.
If you are previewing your app on a local web server, you will get 404 because the local runtime is not your device (its your laptop).
To solve this, developers have invented tools like PhoneGap emulate (http://emulate.phonegap.com/) where you can use an emulator to 'mock' certain behaviors in your local runtime that would occur on a device.
Thanks guys but the problem wasn't related to Phonegap. I copied from our desktop version and that created the problem. And as I wrote in my comment, the screenshot is from Safari debugger for my iPad, not from a browser tab.
Related
I'm currently trying to use Cordova to build an ios app and I've already had all the pages of my app done in separate HTML files such as "add_entry.html" and "inbox.html". But it seems like when I tried to run my program through "cordova emulate ios" in my terminal, it only runs the index.html file that was built for cordova.
Is there a way to get it to run the other html files I made instead of index.html?
I'm very new to using Cordova so please let me know if you're having trouble understanding my questions..
Thank you!
cordova emulate ios will emulate your entire website. You just have to make the index page link to your other pages. You specifically need an index.html file in a Cordova application, which will be the first page that you see when you load up your application.
All website need an index, and you cannot circumvent that.
Keep in mind that ios emulation (and build process) is only possible through XCode on an Apple Mac computer. Android emulation and development is possible on Windows (with cordova run android). You may be looking for PhoneGap to help you with this.
Hope this helps!
looks like you try to run cordova on a normal pc with windows or linux.
you can't compile a ios app with cordova in emulator. for compiling ios apps you have to buy an apple computer. perhaps phonegap build is an option for you.
I am now developing an cordova app which is on platform browser. But I met a problem when using cordova-plugin-file to read a local file. My browser always get an "adding proxy for File" and a "Persistent fs quota granted" in my chrome console.
screenshot of console
I download an example from Cordova-Examples-master in github, but it comes in the same situation. So it seems like a wrong setting bug not bug in my code.
Have anyone met this problem before?
Any help is appreciated.
Cordova app should run from WebView control embedded to native mobile Cordova-based application with corresponding plugins compiled. It will not properly work in standalone web-browser, neither on PC nor mobile device.
Sorry for the question.
I'm current creating Phaser games for mobile using web browsers.
I can remote debugging on my android device using Google Chrome Browser of my android device also similar to Mozilla Firefox Browser and check if any error in javascript/html/css using the desktop developer tools of the browser.
Here is what i follow to use remote debugging for chrome
https://developer.chrome.com/devtools/docs/remote-debugging
Here for Mozilla Firefox
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Firefox_for_Android
Already installed Android SDK
I'm currently developing on windows platform.
Using XAMPP
But i want to test now my app on the native browser of android phones gives me hard time to do it. and don't have any idea on how to do it.
If anyone has done it before.. Kindly please share knowledge on how you to do it and make it easy and comfortable for yourself to remote debugging native android browser.
thanks in advance
Ok, this will only work if you have a local version of the website deployed... and your phone must be connected to the same network.
For reference, I used this website: http://www.broken-links.com/2013/06/28/remote-debugging-with-weinre/
First, you'll need to install NodeJS as weinre is a NodeJS app.
After you install Node, you can use NPM to install weinre.
npm install -g weinre
Then you start weinre server on your local machine
weinre --boundHost -all-
Then paste the following code in your webpage that you want to debug. Change your_private_ip to the private IP of your local server. It probably starts with 192.168.x.x.
<script src="http://your_private_ip:8080/target/target-script-min.js#anonymous"></script>
Now on your desktop, go to http://localhost:8080/client/#anonymous to see a WebKit-style web inspector.
You should see something like this:
Now you can use the other tabs like the Console to view the javascript console, or the elements to look at their styling, etc... just like on chrome or firefox.
I don't know if you still need help, but for those who are having this trouble can try this, it worked for me:
Do the exact same thing like you were to debug from google chrome, in the "chrome://inspect/#devices" tab look for this: WebView in com.android.browser (Version/4.0 Chrome/30.0.0.0) (in my case, i'm using a huawei p7)see image
Sorry for my english
I've built iOS and Android versions of the PhoneRTC project. 1 Android device (KitKat 4.4) and 1 iOS device (iphone 4, iOS 7.1). Both connected to private lan 192.168.1.x. Also, tried TURN server and confirmed successful TURN server messages in server log.
After fixing Swift compile errors on iOS (NSURL and Regex). All compiles and seems to work without throwing errors. Here's my problem and humbly ask for someone's help.
Audio comes through Android just fine, sounds great. So, iOS microphone records/sends audio successfully to Android and is rendered to Android speaker.
Android permission for the microphone is enabled, however the sounds does not arrive on the iOS side. Nothing is heard on the speaker.
Am I missing something here?
Update: I've confirmed that it is the Android library not sending the microphone audio. iOS to browser works fine. Will add issue to Github.
Cheers.
Rich
The issue was fixed in this commit:
https://github.com/alongubkin/phonertc/commit/8bf270014cdfe6acc6d2cb9aeee624c2d9e39536
I'm writing a PhoneGap application, and it's already works on Android, but on iPhone something fails.
What's even more unfortunate is I can't see the console.log outputs to see what's wrong.
I can do alerts, but that's not sufficient as I can't catch the errors.
Under Android I see everything under the LogCat window. Is there anything similar in iPhone/ios?
Thanks.
For web development on mobile I use Weinre for debugging. It redirects console.log to a remote debugging window, and should work with Phonegap.
JSConsole: http://jsconsole.com/
It's the best for this purpose, I've used it with iOS & Android PhoneGap / Cordova apps with success. You execute JavaScript commands from your browser remotely on the device and also see console output. No plugins required. It's just a matter of an extra <script> tag. Just make sure to take it out before releasing to the App Store / Google Play.
I've previously written this answer to enable console.log logging to the xCode console in generic iOS UIWebViews.
This approach works in phonegap as well:
Uncomment the 'shouldStartLoadWithRequest' function in MainViewController.m in
Follow these instructions.
Try using Safari (not Xcode)
Instructions: http://phonegap-tips.com/articles/debugging-ios-phonegap-apps-with-safaris-web-inspector.html
It works: https://www.youtube.com/watch?v=c6eB5TWx0vk
Maybe you are missing plugin? See this: console.log not working in an iOS PhoneGap 3.0 app
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git