Custom Font Load Inconsistently on PhoneGap - ios

I've built a PhoneGap application that uses FontAwesome as a part of it's user interface. When I load the application to my iPad the fonts display correctly about 1/2 of the time. When working I can close the app and then start it and then they stop displaying. Restarting the app again they will work again. Any ideas??? I'm currently running PhoneGap 2.4, since I have a custom plug-in I'd prefer not upgrade.

Related

Safari web inspector not working when debugging ios standalone webapp

I've been struggling to debug my standalone webapp with safari's web inspector. The web inspector works fine when I go to the url on the iphone's safari like a normal web page. The problem appears when I add the webapp to the homescreen. I'm having a strange bug that causes my app to crash when I start it from the homescreen and I want to see what's happening, but when I try to open the web inspector on the mac it opens for a second and then it closes unexpectedly with no message at all (also the webapp on the iphone closes). Thanks in advance. More info about the devices and versions:
- iPhone 5SE with ios 10.3.2 (14F89)
- Macbook Air with MacOS Sierra 10.12.5
Well it seems that Safari is having a bug regarding the cache when I add the webapp to the homescreen using the same app name I was previously using. I tried deleting the old one on the homescreen and add it again but with a different app name (short name) and it worked (it loaded the latest version of the webapp) and the bug I was trying to get rid of in the first place was finally gone. I'm concerned however about asking the user to add the app again to the homescreen with a different app name to get the latest version. Maybe that's a sign that I should move on to service workers :)

How to stop auto load on cordova meteor?

I am creating ios app using meteor and i have all the assets in the public folder, but still my app downloads assets from the server when it loads for the first time.
I am trying to stop auto reload or auto update on cordova.
I have tried this but didnt work.
if (Meteor.isCordova) {
Reload._onMigrate(function (retry) {
return [false];
});
}
I see two possibilities :
onMigrate
Use this on client side (/client folder)
Meteor._reload.onMigrate(function() {
return [false];
});
AUTOUPDATE_VERSION
$ AUTOUPDATE_VERSION=abc meteor
You can set the AUTOUPDATE_VERSION environment variable to something static, it will prevent autoupdate.
See Meteor Doc.
Edit note : mdg:reload-on-resume doesn't work on iOS. Issue #72.
Have you looked at the reload on resume package? Not on IOS at this time, sorry!
Add it to your Meteor app with meteor add mdg:reload-on-resume. This
package changes the behavior of Meteor's hot code push feature on
mobile devices only.
Normally, your app will update on the user's device as soon as you
push a new version. This process is always smooth in a desktop web
browser, but might momentarily interrupt the user's experience if they
are on a mobile device.
With this package, the app will only update itself to the newest
version if the user closes and re-opens the app (hence, it "reloads on
resume").
The Appcache package will stop your app downloading when it first loads
Once a user has visited a Meteor application for the first time and
the application has been cached, on subsequent visits the web page
loads faster because the browser can load the application out of the
cache without contacting the server first.

phonegap iOS app working on simulator but not in device. How to debug

I just finished developing a Cordova / Phonegapp app. When I test it on iOS simulator it all works fine and quick, but, when testing on device it works only part of it.
My app is a game with the kingdom background and has 8 buttons (8 buildings).
When I click on each building it leads me to a screen representing what it's inside the building, but one of them doesn't work and gets my app frozen.
How can I see fail or crash reports that helps me debug my app on device?
If you provide full path to your file i.e. "file:///Users/.../someDir/some.html" it will work only on simulator running on the same machine where your project is.
I suggest just adding the additional path to the file you want to access i.e. if you are in "/someDir" you will need to provide only "some.html" or if you want to access parent directory just use "../".
As far as debugging Cordova app, I suggest downloading this plugin and using console.log instead of alert.
Hope this helped.
Ok, I found a "spartan" way to debug my app via alert and found that an url wasn't set properly (still don't know why it worked on simulator)

AIR iOS load external swf ABC - almost succeeded

I have an entire day of searching and testing behind me and I officialy think it's impossible. Yet there is left to share what I've accomplished and ask for any sugestions.
So I'm working on Flash Builder 4.7, AIR SDK 3.5 and iPad 3 iOS 6.0.1.
What I want is to have an ad-hoc application to load a swf file containing actionscript and add it to stage. I started by testing the application in debug mode on device connected by usb. Everything works well. Then I compiled an ad-hoc release build, which did not work that well. Graphics was added to stage but actionscript didn't run. I've started to search the web and found out that it was possible to load swf's packed in ipa that could run actionscript, but it is no more, though there was a link to the download page of that SDK version under "Where can I get the build?"
It didn't work. I included the second swf in export package contents. Did I do it wrong?
Anyway even if it worked what I actually need is to be able to download a swf from a server, save it in storage directory and then load it to the main application.
Is there maybe a way to tell iOS that the application it's running is a debug version (that's actually working), but it shouldn't display the popup with information about connecting to a debugger and it actually should run fast like a legit release build?
Unfortunately you can not load any code from any server to execute it. Apple forbids it. The only code that can be loaded from outside and executed on iOS is JavaScript within the built in WebKit browser (using UIWebView or in case of Air - StageWebView).
As of air 3.6 (which is still in beta) you can package additional swfs with your application for later loading with Loader class, but this feature is still severely limited compared to normal web swf loading - you are only allowed to load code to the same ApplicationDomain your application uses and you can not unload anything so it is just easier to link all the code to one swf statically using swc libraries for example and not bother with loading anything.
We've found that loading SWFs with ABC code in iOS can be done without any problem with Flash Builder 4.7 and AIR 3.6 SDK. At this time Adobe Flash Builder 4.7 comes with AIR 3.5 SDK, so you can download the last SDK version from here and install it into your Adobe Flash Builder sdks folder.

Force pinned web app to retrieve latest code

I have built a web app using jqmobile which runs perfectly from within the browser but when I pin to the home screen it behaves differently.
It's as if it's still using an older version of the code. I've tried closing the application (double clicking home and deleting the icon) then removing the icon from home and re-adding it but it exhibits exactly the same behaviour.
Is there a way to purge the old version and force it to retrieve the latest version?
Thanks
Apparently there's a delay of 5 mins or so for external code libraries, longer for external css.

Resources