phonegap 2.0 at ios has an error - ios

My code works well at android platform(phonegap 2.0 and before).But when i try to run it at ios, it has some problems.
If i add cordova2.0.js like this:
<script type="text/javascript" src="js/cordova-2.0.0.js"></script>
But my app will alert a lot. like these:
["Info","NetworkStatus0",true]
["tDeviceInfo","Device1",true]
When i romove cordova-2.0.0.js tag. The index.html load normally without any alert.
I don't know why.

We had a similar problem that got fixed by always using the cordova-2.0.0 that xCode creates automatically for you when starting a phonegap-project.
Are you using the android version of the javascript?

Try using cordova library for ios. It seems that you are using the android one, or the path is wrong.

Related

Instagram Widget is not loading properly in iOS

I'm facing an issue with Instagram Widget. I'm loading HTML content in WKWebView. But thumbnail is not loading in below iOS 13.0 version. Any solution?
The issue is with referencing the embed.js file in the html code.
instead of this,
<script async src="//www.instagram.com/embed.js"></script>
Replace with,
<script async src="https://www.instagram.com/embed.js"></script>
We can also keep the embed.js file in the xcode project and compile it .
Project structure
Output
For reference , I have committed project in Github : https://github.com/vinayakasy99/InstaWebview

Input text not working on Cordova

I'm writing a WebApp for Android using Cordova 3.5
When i compile and run my application, all the input text's don't work, i try to input some text but no work.
I try to do some CSS tricks like *{user-select: text;}, but also don't work.
I build my app using jQuery mobile 1.4.3
Someone knows what's happening?
Delete position:absolute from the CSS of container

Bootstrap 3.0.3 glyphicons displaying emoticons on iOS 7

I use Bootstrap 3.0.3 glyphicons. All is ok on desktop browsers and on Android devices. My problem is about Apple devices (tested on iPhone and iPad running iOS7).
The glyphicons look like emoticons. I've found some issues but not answering my problem.
Here is the link to view the screenshot : http://www.fredericblancheton.fr/imgdisallow/image.png
Thank you for your help.
I had a similar problem, but only when another font was included via font-face inside the stylesheet. It seems that mobile safari or safari in general has a very short timeout for loading fonts which are included via font-face syntax.
I had to remove the font from the main stylesheet and add the font-face syntax directly in the sites header using <style></style> syntax. Weird.
Another approach is illustrated over at filamentgroup, which are using the Data-URI syntax for the font and loading these asynchronously via javascript. This should also trick the browser to wait longer.
-> http://www.filamentgroup.com/lab/font-loading.html
We've seen the same problem in our app - it's totally bizarre. It happens when the user has installed an old Emoji app ("Emoji Free!", which I can no longer find in the app store).
The only solution was to get the user to uninstall the app.
I encountered same issue and resolved it by removing woff2 font file from #font-face. It seems iOS doesn't support woff2.
[Updated 2016-03-02]
Fix above turns out just matter of luck (timing?).
#rofflox 's answer which seems to be more promising and it works for me.
I just tried the solutions above and none of them worked for me. It turned out that:
I had updated bootstrap to 3.3.6 css
I didn't update the font files that came with it
Getting the latest version of the font files fixed my issue with the unwanted emojis.
I started getting this error today using Pulsar for Salesforce, I turned out that my FE DEV had included references to Fonts and forgotten to update the static resources with the new fonts! In case that helps someone.

Error loading external URL in Phonegap 2.5

I created a new Phonegap 2.5 project from scratch, and I've been trying to load an external URL in it, but I keep getting input boxes popping up on startup before loading the actual URL. I first get a pop-up with the URL of the website, then in the input box it says "DeviceInfo","Device652321624". If I click Cancel, it pops up 2 more times before loading the website. On the website itself, it loads some relative URLs, but others cause the entire page to refresh and the input boxes to pop up again.
I set the URL by setting <content src="http://phonegap.example.com" />, which is just a regular website with Javascript. I even tried commenting out all Phonegap specific code (no more ondeviceready calls), but it still causes the problem. http://www.google.com loads for me, so I'm not sure what else to check. And it works with the Android version that I've developed.
If it helps, I've also seen this message in the XCode log: Resetting plugins due to page load.
I've had the exact same problem today.
I fixed it by checking the include of the cordova.js file (this js is generated when you create the project using the create command.
( called cordova.js in the renamed cordova project version. probably phonegap.js in phonegap ?)
anyway my include was :
<script type="text/javascript" src="js/cordova.js"></script>
whereas je js file was in the project root :
I changed it to
<script type="text/javascript" src="cordova.js"></script>
and every things is fine now.
also, the 'create' command for Android generate a different js file. make sur that the new one generated for ios is used.
hope that helps !
Problem is you are using android's cordova.js instead of ios's cordova.js.
Just make sure you are using the proper one.

iOS Phonegap Infinite Dialog error when running application?

I'm having an issue developing a phonegap app for iOS. I just copied all the html / css / javascript markup into a phonegap application. I'm using xcode3 on a Mac with 10.6.8
When I go to run the application, I get these dialogs once it loads and install:
gap:["Network Status","getConnectionInfo","Network Status0",true]
usePolling: gap_callbackServer
getPort: gap_callbackServer:
getToken: gap_callbackServer:
Then is stays forever at gap_poll:
While I'm getting these dialogs, I can see the app's home screen all loaded in the background.
This application was successfully built, deployed and is currently on the App Marketplace for Android, never had problems like this developing for it.
What could be causing this?
More than likely you are using the Android version of phonegap.js. Each platform has it's own phonegap.js so you have to make sure you are using the right one. I know it is confusing but we are working on it.
Just change the script tag from:
<script type="text/javascript" src="cordova.2.0.0.js"></script>
to:
<script type="text/javascript" src="phonegap.js"></script>
Another solution that I found was to just use "phonegap.js" (and I don't even have that file included) and when I added my .zip file to build it seemed to automatically add the correct version for me. I noticed the phonegap getting started app didn't include an version of the .js file and that gave me the idea.
Main reason is for using the cordova.js which mainly for Android. I've searched the cordova-1.8.1.js for iOS, bad-luck for me.
And finally I create phonegap-1.8.1 project for iOS from terminal then tried to create another project with phonegap-2.1.0 from template and found the cordova-2.1.0.js. This JS then used for phonegap-1.8.1 project ...
I've got my success, now my application is running successfully on iOS 6(new version iPAD)

Resources