1. rasputin007's Avatar
    On the free plan (Anvil and Developer) you have a limit of 500 calls a day and 10 calls a minute. I only once in almost 2 years went over that and went from 30 raindrops to 29. LOL
    Javascript and local json files are a bit of a pain in the backside. It can be done, but is much more fiddly then local stored xml file.
    I changed the call url from json to xml.
    Paste that, now xml url call, into the computer browser (Chrome) and press enter. The response xml file shows on the screen. Then a Ctrl-A and Ctrl.-C and paste into and save as mywug.xml file.
    Then the Jquery.get() works again, something like
    Code:
    var url = "mywug.xml";
    //var url = "/var/mobile/Documents/mywug.xml";  
    	jQuery.get(url, function(data) {
    
    		$(data).find('current_observation').each( function() {
    			var weather  = $(this).find('weather').text();
                            var temp_c = $(this).find('temp_c').text();
                            var temp_f = $(this).find('temp_f').text();
    .
    .
    .
    $("#weather_desc").text(weather);
    $("#temp").text(temp_f); //or $("#temp").text(temp_c) if Celsius is wanted
    })
    })
    Even though xml is an old format it is easier to deal with when it is a local file.

    When you rename a mydata.json file into a mydata.txt file it still is a json structure underneath!
    Is like, you rename a picture.bmp file into picture.png file and think it can be opened as a png image, won't work.
    Last edited by rasputin007; 2015-01-30 at 05:55 PM.
    Nothing is impossible only miracles take a bit longer!
    2015-01-30 05:47 PM
  2. NewD's Avatar
    Very clear explanation, Ras! Thank you so much for your experience and your willingness to share! So basically if I had changed my local file to myFile.json in name then I wouldn't have needed $.getJSON(...) in the call?
    2015-01-30 07:12 PM
  3. chevymusclecar's Avatar
    Happy bday G!! Make it great!
    2015-01-30 07:16 PM
  4. rasputin007's Avatar
    Very clear explanation, Ras! Thank you so much for your experience and your willingness to share! So basically if I had changed my local file to myFile.json in name then I wouldn't have needed $.getJSON(...) in the call?
    Loading a json file from a remote server is simple, any browser can do that.
    Loading a local json file is a completely different story, some browser, e.g. Chromium and some webkit based browser, do not easily load a local json files. It is possible, but only with a detour.
    For that reason I changed from json to xml.
    Local xml file is much simpler to load and read the content.
    Simple change.
    Old json url:
    var url = "http://api.wunderground.com/api/..........json";
    changed to xml
    var url = "http://api.wunderground.com/api/..........xml";
    Then use the above method of jquery.get to load the local xml file and the example code to get all the info you want from the local xml file.

    I mean if you want to use a local json file then you look at a loooooong time to get it to work. You might get it to work on your computer, but then it might not work on the iPhone. Just google "jquery read local json file" and see if you can cope with that.

    I always would prefer json as the format to get from a REMOTE server, but reading LOCAL file it has to be xml format.
    Keep it simple!
    Nothing is impossible only miracles take a bit longer!
    2015-01-30 09:56 PM
  5. NewD's Avatar
    Loading a json file from a remote server is simple, any browser can do that.
    Loading a local json file is a completely different story, some browser, e.g. Chromium and some webkit based browser, do not easily load a local json files. It is possible, but only with a detour.
    For that reason I changed from json to xml.
    Local xml file is much simpler to load and read the content.
    Simple change.
    Old json url:
    var url = "http://api.wunderground.com/api/..........json";
    changed to xml
    var url = "http://api.wunderground.com/api/..........xml";
    Then use the above method of jquery.get to load the local xml file and the example code to get all the info you want from the local xml file.

    I mean if you want to use a local json file then you look at a loooooong time to get it to work. You might get it to work on your computer, but then it might not work on the iPhone. Just google "jquery read local json file" and see if you can cope with that.

    I always would prefer json as the format to get from a REMOTE server, but reading LOCAL file it has to be xml format.
    Keep it simple!
    Thanks! Just read that article.. But it's strange that for me it's a 'bit' easier than they mention... jQuery allows a very simply 'remember' to get local json.. simply by changing:
    jQuery.get(.....) to jQuery.getJSON(......).. the latter of which gets json formatted files from servers or locally each time - in my testing..

    And for those of you who are learning code.. one things that was very confusing to me for a while until recently - is that in pretty much all the internet articles I was reading and the two books I now own... I kept seeing $.get in all parsing examples... and NEVER jQuery.get which is all I see in our widgets.. Well $ = jQuery -- bottom line. Anywhere you'd need the syntax jQuery - you can substitute the $ for it. As long as the jquery.min plug in file exists in the same folder with the other javascript files.

    Thanks again, Ras! The only thing I don't like about xml is that it has no formatting - so it comes out all jumbled when you place in a text file.. Json always has formatting and is easier to read. But each coder has their preferences.. All the stuff from GoogleMaps I use is all XML and I love it.
    2015-01-30 11:31 PM
  6. NewD's Avatar
    For those learning code who want to learn how to get data from a particular feed and want to learn how to get at it from xml format or json format here are the different sets of syntax to use..

    Let's use the free GoogleAPI

    We'll start with the XML format response:
    Code:
    var obj = new Array;
    
    var url = "https://maps.googleapis.com/maps/api/geocode/xml?latlng=49.233889,-124.805"
    
    jQuery.get(url, function(data) {
    	$(data).find('xmlHeadingNameHere').each( function() {
    		obj.myData =$(this).find('actualDataItemHere').text();	
    	}); 
    document.getElementById("myData").innerHTML = obj.myData;
    Now with the JSON format response:
    Code:
    var obj = new Array;
    
    var url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=49.233889,-124.805"
    
    jQuery.getJSON(url, function(data) {
    		obj.myData =data.jsonSubHeadingNameHere.actualDataItemHere;
    	}); 
    document.getElementById("myData").innerHTML = obj.myData;
    Different code masters will tell you their different views on which format response to bring into your code for better more complete results. I am nowhere near a 'code master' yet.. but I aspire to be. Rasputin007, and June'siPhone and Dacal and Ian Nicholl can answer the finer details of that. I will attempt to provide tutorials of things I've found to work.
    2015-01-30 11:49 PM
  7. iPrison7Break's Avatar
    Instroductions in 1st post said to install deb files with iFile. Can install this files from WinSCP with terminal ?

    If yes what command to use ?
    Last edited by iPrison7Break; 2015-02-01 at 09:21 AM.
    2015-02-01 07:03 AM
  8. King_O_Hill's Avatar
    dpkg -i xxx.deb

    xxx.deb is obviously the name of your package file.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0
    2015-02-01 09:19 AM
  9. iPrison7Break's Avatar
    Where path input deb files ?

    dpkg -i xxx.deb

    xxx.deb is obviously the name of your package file.
    2015-02-01 09:35 AM
  10. King_O_Hill's Avatar
    Where ever you put it. Really doesn't matter. I might suggest:

    var/mobile/Downloads

    If you have iFile, just click it, then select "installer"

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0
    2015-02-01 09:37 AM
  11. mike42's Avatar
    Hi King_O_Hil!! Can you help with this? Where do I find this in Ifile so I can delete it!!😁👍 thanks!!Workaround Stategies for iOS8 respringing using GroovyAPI+-imageuploadedbymodmyi1422778459.734517.jpg
    2015-02-01 10:15 AM
  12. iPrison7Break's Avatar
    Install 3 deb files correctly but i try when download from cydia widget show depends. Why ?
    Last edited by iPrison7Break; 2015-02-01 at 11:07 AM.
    2015-02-01 10:44 AM
  13. NewD's Avatar
    Install 3 deb files correctly but i try when download from cydia widget show depends. Why ?
    The groovy "plus" versions aren't available in Cydia.. I don't understand your point. Please restate with more details.
    2015-02-01 03:24 PM
  14. iPrison7Break's Avatar
    The groovy "plus" versions aren't available in Cydia.. I don't understand your point. Please restate with more details.
    Download the deb files from 1st post and install it.

    Other GroovyLock and other GroovyLock+ ?

    Workaround Stategies for iOS8 respringing using GroovyAPI+-1rz19k.png
    2015-02-01 05:35 PM
  15. Simon's Avatar
    Download the deb files from 1st post and install it.

    Other GroovyLock and other GroovyLock+ ?

    Workaround Stategies for iOS8 respringing using GroovyAPI+-1rz19k.png
    If you have GL+ or GB+ installed you wont be able to install any widgets that depend on the original ones in cydia. You will have to uninstall them and install the original ones. Or if you have another device use that device to download them from cydia then manually move them to your device that has GL+ on it.
    2015-02-01 05:43 PM
  16. UMAR88's Avatar
    Guys just a small question witch one di you think its more stable the + GL&GB or the normal one thanks.
    2015-02-01 06:06 PM
  17. Simon's Avatar
    Guys just a small question witch one di you think its more stable the + GL&GB or the normal one thanks.
    Small question, big answer lol. Put it this way, if you are not experiencing a lot of resprings then stick with the regular GL. If you are and want them to stop then checking out GL+ may be worth it to you.
    2015-02-01 06:17 PM
  18. Clark3529's Avatar
    Hi do the weather lock screens that come with widget weather 2 work with gl+ if so why do I get this Workaround Stategies for iOS8 respringing using GroovyAPI+-imageuploadedbymodmyi1422904258.549346.jpg
    And this too no weather cox file too ?
    2015-02-02 09:12 PM
  19. NewD's Avatar
    Hi do the weather lock screens that come with widget weather 2 work with gl+ if so why do I get this Workaround Stategies for iOS8 respringing using GroovyAPI+-imageuploadedbymodmyi1422904258.549346.jpg
    And this too no weather cox file too ?
    For the 02_WidgetWeather_Base to work in GL+ - you need to go into the config.js file set GroovyPlus to "true". It's default is "false". It also looks like you manually set the size to iPhone 6 or 6plus and you're using an iPhone 5/5S. Just leave the sizing option to "auto" and it should auto size for you.
    2015-02-02 09:58 PM
  20. Clark3529's Avatar
    Still not working and showing the above I have a iPhone 6 +also can't get chevymusclecar mod to work keeps telling me no widget weather xml file
    But if I use lockhtml 4 they both work but get a few re springs but get no re springs with gl+and gb+ with
    2015-02-03 11:27 AM
831 ... 7151617181927 ...
LINK TO POST COPIED TO CLIPBOARD
We have updated our Privacy Policy and Terms & Conditions. Please check them out.