Phonegap application would not work in iOS - ios

I have a very interesting problem. I have a phone-gap application that I am building. It works fine when we run it in the android environment, or even when we open index.html in firefox. But when I try to run this on an iPad simulator in Xcode, it fails.
The application installs fine and displays the start up page correctly. The next thing my application requires is to open a job attached in the email. But as soon as we do that, thats when it starts failing. It does not display the body text. The header and the footer are displayed fine.
To me this does not look like any javascript error because I am able to run this code on other platforms. I think its got to do with some css I am using which might not be compatible with iOS. Also, I have this other problem that my code will not run on any version except phone gap-1.3.0. I am not sure if that has anything to do with this too.
Anyways, I would like to know your thoughts on this.

ok the offending code was found to be the following:
$.mobile.touchOverflowEnabled = true;
I just stumbled across this and I am not sure why its breaking my app. Anybody got any ideas.
After commenting this code out, my app worked fine.

Related

VueJs Nuxt PWA not rendering on iphone

My vuejs nuxt portfolio(https://gunjankadu.com/)is not opening on ios phones but working flawlessly on all other devices. On IOS devices only a red spinner is shown and nothing more.
What can be done?
A script "tag.js" took time to load, which I have currently disabled but still not working.
I had a look on your application and found out two problems.
First was about regular expressions, It seems Safari doesn’t support look behind yet. One alternative would be to put the / that comes before in a non-captured group, and then extract only the first group (the content after the / and before the #).
/(?:\/)([^#]+)(?=#*)/
And second is about The minimal-ui viewport property that you can find out more here
Look at all your js/vue files especially in store. And see if any variable used is not imported. Nuxt in SPA mode doesn't detect those kind of errors and surprisingly the UI gets stuck on loading only on iOS. Very weird but scratched my brain over it for a day.

Vue Web App Blank on Some iPhones, but fine on all other devices

I created a webapp in Vue several months back and have been using it for some time. I've used it on Android, iPhone, Mac, Windows, and all was good in the beginning, however a couple of months back, I began noticing that the page would sometimes load on iPhone, and sometimes not. It worked perfectly fine on every Android I've tried without issue, works on Mac and on Windows, though iPhone seems to be hit or miss (haven't tried it on any other iOS/iPadOS devices), and I have no idea where to start. I know this doesn't give a lot of information to begin with, but I'm not sure how to even begin debugging this. What I have tried so far:
Resetting cache - did not fix
Using various browsers - blank page across Safari, Chrome, in private/incognito modes and normal modes
Tried different iPhones - would work without issue on some, but not on others
I have not touched the Vue config file, is there some support issue between specific iOS versions and Vue that I'm not aware of?
Again, I know there's not much detail provided other than "It doesn't work", but I honestly don't know what else to try or what information I might be able to use - if there is something additional I need to provide, let me know and I can update the post with the information.

Program white-screening all of a sudden

I've been working for a few days on an electron application. When I was done working for the day yesterday, the program was working and running just fine. I came in this morning to start working on it again, and now all of a sudden partway through the program it just whitescreens now. I have not changed anything from the time of working on it last (last known working) to current time.
I do not see any errors being logged to the powershell console after running npm start (Program does not work packaged either), and when I use inspect element it just says:
DevTools was disconnected from the page.
Once page is reloaded, DevTools will automatically reconnect.
But it just sits on this white page forever.
This page has quite a lot of code (531 lines), but I am completely unable to pinpoint the problem because there are no errors logged. That said, I began taking pieces out of my code trying to get it to work, and I was able to narrow it down to the code below.
What can I do to fix my application?
This is the code I narrowed it down to, when I comment out this code, the page runs fine.
var audio = require('win-audio').speaker;
weirdly enough, this is one of the first pieces of code that I had written in this page of the application, and it has worked until just today.
I just found out that if I plug in some speakers, the program no longer whitescreens. But this isn't really a good fix, because this program will be ran on hundreds of computers a day that may or may not have speakers.
UPDATE::
Ok, I think I have fixed it. To try it out:
Download my fork at: https://github.com/11AND2/win-audio
In your terminal change dir (cd) into the directory e.g. "cd C:\...\win-audio"
run command "npm run install" - this rebuilds the module
To test it run "node sample.js" and activate/disable your audio devices
If at any point you want to check if the device is alive just run
var audio = require('win-audio').speaker;
var _vol_alive = audio.get();
if (_vol_alive === -999) {
console.log("this device is dead :-(");
}
in your application. Please note that I have not changed the API at all so there should be no need to change your application code.
Please give me a heads up if the fix works for you so I can create a pull request for the fix. I am not the creator of this plugin, all my changes are public domain.
DEPRECATED::
Ok, I have found a fix for you. Would it be ok if:
var audio = require('win-audio').speaker;
returns -1 if no device is found?
So you could do:
if (audio !== -1) {
audio.set(30);
}
Please give me a short heads up and I will post the implementation route.

Images disappear on refresh in heroku-hosted rails application

Let me say first that I'm quite new and inexperienced with rails. Today I tried to update an image in a rails app hosted on Heroku. Anyway, this is the simple flow I followed as I did other times before:
Add updated image to the image folder
Precompile the assets rake assets:precompile
Add and commit all changes
Push to heroku
Until this point all seems fine: I open Chrome to check my app from my domain and it's all there as expected.
The problem is that if I refresh the page all the images disappear (like they have never been loaded). This does not happen locally.
If I do a ctrl+f5 it all comes back nicely, but I lose everything again on simple refresh.. and so on.
Has anyone experienced something similar? I understand this might be hard to answer as there is not much code to show. Let me know if I can give more details.
On a final note, it seems that all works normally on a friends machine (that is, refresh doesn't give this problem). I'm thinking something might be wrong with my Chrome settings here? I don't remember having changed anything recently though.
This is very weird and quite annoying some help/insights would be great.
UPDATE: This seems indeed really to happen locally on my machine at work. I checked from another couple of computers at home and the app is displayed fine (without any refreshing problem).
Did you check if the cookie is disabled by your browser for the heroku website in particular?
I have just tested this issue with an image based website (https://unsplash.com/). When the cookie is disabled for that website, pressing F5 clears all the images, while pressing Ctrl-F5 brings those lost resources back as like as your case.
Enabling cookie resolves the issue in my case.

view iphone console logs without a mac

Is there a way to view the iphone console logs without having a mac ?
It used to be possible using the iPhone Configuration Utility but it does not seem to be available any longer.
I saw a tool called iTools but it seems to require a 32bit version of itunes which is also not available any more.
Given an iPhone device + windows + linux, Is there any workaround / tool to view the iphone console logs?
Realizing it is over half a year ago you asked this, but since it does not have an accepted answer yet:
I ran into this very same issue over and over, and got fed up with it, so I decided to have a go at writing a script that displays console messages in HTML, so you can just view everything in the webpage itself, without having to resort to a console-replacement or a tedious remote debugger (for which you, indeed, require a Mac), without having to modify each console call in existing code.
The key lies in 'replacing' the four main functions in window.console: log, warn, error and trace. This is done by redifining each method, adding own code to that, and calling the original method in the end. Jakub Fiala wrote the basic script for that, on which I built the rest: https://gist.github.com/jakubfiala/8fe3461ab6508f46003d
I dubbed it 'MobileConsole'. It is quite unobtrusive and will 'catch' all console.log (or .warn, .error or .trace) events, and even bind to window.onerror.
I have created a separate page for this script with an elaborate explanation on how it works, including a demo, over here.
Download this from the app store onto the iphone, you can then view logs directly on the phone:
https://itunes.apple.com/us/app/console/id317676250?mt=8
Please note, this is an old app, it will crash when launched, then on reopening it will show you the device logs.
If that fails, here is a link to the iPhone configuration utility for windows:
http://download.cnet.com/iPhone-Configuration-Utility-for-Windows/3000-20432_4-10969175.html

Resources