Page 19 of 42 FirstFirst ... 9171819202129 ... LastLast
Results 361 to 380 of 831

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Workaround Stategies for iOS8 respringing using GroovyAPI+

  1. #361
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    Default Workaround Stategies for iOS8 respringing using GroovyAPI+
    Quote Originally Posted by michaelrw View Post
    I dont have exactly
    Code:
    jQuery.get(url, function(data) {
    but i do have:
    Code:
     jQuery.get('file:///private/var/mobile/Documents/widgetweather.xml', function(data) {
    So, should I replace that with something like:
    Code:
    groovyAPI.do ( { read: "file:///private/var/mobile/Documents/widgetweather.xml" }, function(data) {
    No. Just comment out '//' the JQuery line and then add the exact groovyAPI.do syntax in my tutorial for the "simple one line fix".. and you should be good to go. You likely also need to do the same thing for the battery stats JQuery line.

  2. #362
    Default Workaround Stategies for iOS8 respringing using GroovyAPI+
    Quote Originally Posted by NewdestinyX View Post
    No. Just comment out '//' the JQuery line and then add the exact groovyAPI.do syntax in my tutorial for the "simple one line fix".. and you should be good to go. You likely also need to do the same thing for the battery stats JQuery line.
    So for the ram stats you mean:

    Code:
    groovyAPI.do ( { read: "ramstats.txt" }, function(data) {
    ??
    Sorry but I don't know much about JS and no idea how to convert to gAPI+ (aside from the WW2 simple tut you wrote)

    I have a ton of themes with a ton of jQuery in them, so would love to know how I can convert all of them.

  3. #363
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    Default Workaround Stategies for iOS8 respringing using GroovyAPI+
    Quote Originally Posted by michaelrw View Post
    So for the ram stats you mean:

    groovyAPI.do ( { read: "ramstats.txt" }, function(data) {

    ??
    Sorry but I don't know much about JS and no idea how to convert to gAPI+ (aside from the WW2 simple tut you wrote)

    I have a ton of themes with a ton of jQuery in them, so would love to know how I can convert all of them.
    Yes, you did it correctly for the ram stats. Give me an example of a theme with "tons" of JQuery calls? I have many Widgets but most only have one or two main JQuery calls.

  4. #364
    Quote Originally Posted by NewdestinyX View Post
    Yes, you did it correctly for the ram stats. Give me an example of a theme with "tons" of JQuery calls? I have many Widgets but most only have one or two main JQuery calls.
    well sure, i exaggerated a bit, but with a 'ton' of themes, and a few jquery calls per theme, i guess thats a 'ton' * ~2 = ~2 tons

    basically my themes i add the ramstats, batterystats (both calls on the txt files from infostats tweak), then various other things for weather walls, time walls, other cyclic images..

  5. #365
    i dont know a whole lot, but i do know that when i open my various themes, some of them have 5 different scripts (like the old dbar one that marty converted to ww2 the other day), and in each one there are a few jQuery
    reading your one line fix is great for the context in which you wrote it, but not every "jQuery..." that i find is in the same format, so i was looking to learn how to exactly convert any jQuery, regardless of if its for a WW function or a non-WW function.

    From your little guide, we have these before and afters:
    Code:
    jQuery.get(url, function(data) {
    Code:
    groovyAPI.do ( { read: "widgetweather.xml" }, function(data) {
    basically (if i understand correctly), if we break this down into parts... we have to replace:
    jQuery.get
    with
    groovyAPI.do

    then, if the jquery was passing a 'full path' for the url parameter, we need to just use the file name, not actually identify the path. plus, we have to add the "read:" before the filename, and enclose it in braces. So replace:
    (url,
    with
    ( { read: "filename" },

    then, for the last part, we just copy over the function(data) that's at the end of the original jQuery line.
    ** the only difference ive noticed is that some jQuery have "function(appdata)" instead of "function(data)", but if that's the case I just copy it exactly how it's written.
    Like, if the original jQuery was written with function(appdata), i wouldn't want to change that to function(data) (per your tutorial), else it wont work.. right?

    So, in sum (example 1):
    Code:
    jQuery.get('file:///private/var/mobile/Library/RAMStats.txtunction(appdata) {
    becomes...
    Code:
    groovyAPI.do ( { read: "ramstats.txt" }, function(appdata) {
    AND (example 2)

    Code:
    jQuery.get('file:///private/var/mobile/Library/BatteryStats.txt', function(appdata) {
    becomes...
    Code:
    groovyAPI.do ( { read: "batterystats.txt" }, function(appdata) {

  6. The Following 2 Users Say Thank You to michaelrw For This Useful Post:

    #m37h{ (2015-02-20), MrDLewis321 (2015-02-06)

  7. #366
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    Default Workaround Stategies for iOS8 respringing using GroovyAPI+
    Yes, Michael. You're a quick study! Mostly everything you've said is correct there. Except watch your naming.. It's BatteryStats.txt and not 'batterystats.txt',etc.. And the groovyAPI.do ({ read:.... call only looks into the Documents folder for a file. The BatteryStats.txt and RAMStats.txt files reside in var/mobile/Library/Stats folder. So you'd need the syntax:
    Code:
    groovyAPI.do ( { read: '../Library/Stats/BatteryStats.txt' }, function(appdata) {
    Now here is the kicker.. Several of the widgets that have function(appdata).. are likely older myLocation.txt-based widgets which are accessing the simple pair of coordinates in the myLocation.txt file.. And - though groovyAPI+ is able to gain us access to the myLocation.txt file locally in the Documents folder - WKWebView, on iOS 8 running on our phones, is incompatible with the older RSS feed calls made to yahoo.. ... Those forecastRSS feeds are not YQL-compliant and Apple seems to have dropped support for them, at least in the iOS8.1.2 implementation of WKWebView.. So the incompatible yahoo feed syntax renders the older dBar (based on WOEID only) and myLocation.txt mods completely useless to us in GL+ and GB+..

    So I don't want you to go through all of your attempts at conversion for nothing. In my tutorials I make clear that the simple fix method only works for WidgetWeather.xml based mods.

    Now I've been working on a way around this limitation and have had my first breakthrough.. But more testing to do. Too early for the victory lap..
    Last edited by NewD; 2015-02-06 at 07:24 PM.

  8. The Following 6 Users Say Thank You to NewD For This Useful Post:

    Boots (2015-02-06), burrzoo (2015-02-06), michaelrw (2015-02-07), MrDLewis321 (2015-02-06), undersea (2015-02-06), vXBaKeRXv (2015-02-06)

  9. #367
    Hi, right now, i am coding or modding based on WW2-Base-Chevymusclecar.
    I want to use it for GB+ and GL+. so i remove some redundant info. Like Moon, HourlyForecast, some in Daily Forecast v.v..
    Keep it simple as possible. Only keep important things like 5 or 6 days forecast, city, country, Calendar, Clock... for anyone can use for modding.
    And how to do show it all on the springboard with No Touch.
    I am learning more about it. Pls help me with it.

  10. #368
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Always wondered why you don't have to set a file path when using the groovyAPI.do. I mean, how does it know where to get the file?

  11. #369
    could it be something in the coding of the api file itself that is to recognize the jQuery data?

  12. #370
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Guess that would be a question for GC. Maybe it just automatically searches the file system for that file name. That would have issues though with multiple file with the same name so doubt that is it.

  13. #371
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by Simon View Post
    Always wondered why you don't have to set a file path when using the groovyAPI.do. I mean, how does it know where to get the file?
    Jake told me he made the groovyAPI.do {read:....}, by default, look into the Documents folder. But he also told me if you need to access a different file you can use this syntax - like when you need the data from infostats.. you need this:

    Code:
    groovyAPI.do ( { read: '../Library/Stats/BatteryStats.txt' }, function(appdata) {
    to get the battery data

    and this:
    Code:
    groovyAPI.do ( { read: '../Library/Stats/RAMStats.txt' }, function(appdata) {
    to get the RAM data..

    You can also use symlinks to point to RAMStats.txt and BatteryStats.txt if you want to place the links in the Documents folder.. That works too after my recent tests.
    Last edited by NewD; 2015-02-06 at 07:33 PM.

  14. The Following User Says Thank You to NewD For This Useful Post:

    Simon (2015-02-06)

  15. #372
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Got it. That makes sense now, good to know. So Michael would have to adjust his code above to compensate for the starting point being the documents folder. Looks like you missed that when you said to him everything there was correct.

  16. #373
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by undersea View Post
    Hi, right now, i am coding or modding based on WW2-Base-Chevymusclecar.
    I want to use it for GB+ and GL+. so i remove some redundant info. Like Moon, HourlyForecast, some in Daily Forecast v.v..
    Keep it simple as possible. Only keep important things like 5 or 6 days forecast, city, country, Calendar, Clock... for anyone can use for modding.
    And how to do show it all on the springboard with No Touch.
    I am learning more about it. Pls help me with it.
    What you're asking is beyond the scope of this particular thread, Undersea.. You need to learn a certain level of coding on your own to even speak a language we both can understand.. Please ask a more specific question about one function you want to add/delete.. and maybe we can help you with that on thing.

    But what you describe there is a massive rewrite. Maybe Dacal or Chevy can help you in the WidgetWeather 2.0 thread.. since they are the original creators/modders of the 02_WidgetWeather_Base.

  17. The Following User Says Thank You to NewD For This Useful Post:

    undersea (2015-02-07)

  18. #374
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by Simon View Post
    Got it. That makes sense now, good to know. So Michael would have to adjust his code above to compensate for the starting point being the documents folder. Looks like you missed that when you said to him everything there was correct.
    Edited my post a bit ago..

  19. #375
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Quote Originally Posted by NewdestinyX View Post
    Edited my post a bit ago..
    ya, 6 minutes lol. After my post informing you about it

  20. #376
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    That's why I said 'a bit ago'.. And actually no, bro.. Didn't even see your post until after I'd made the updates to Michael's post.. Promise.. (yours was at 1:21 I was typing my update {copying/pasting} then and hit send at 1:24 ). Your post had no influence.

    And I just found out the new read paradigm.. from Jake about 30 minutes ago.. and my original post to Michael was well before that at 8:37am this am.. . Michael's general concepts about how many times you'd potentially need to use groovyAPI, were correct.. But his syntax was not correct..
    Last edited by NewD; 2015-02-06 at 07:41 PM.

  21. #377
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Dude, I was here, I saw. And there are still time stamps on your edit and these posts that show you edited it after. It isn't a big deal, I just thought it was funny. Lower your defenses

  22. The Following User Says Thank You to Simon For This Useful Post:

    Boots (2015-02-08)

  23. #378
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by Simon View Post
    Dude, I was here, I saw. And there are still time stamps on your edit and these posts that show you edited it after. It isn't a big deal, I just thought it was funny. Lower your defenses
    The stamps show you when I hit POST, bro.. I know how the forum works.. And I assure you - your post had zero influence on my rewrite to Michael. I did that for clarity's sake.. You know me...!. My defenses aren't up at all. Just knew I wanted to update the post, for clarity's sake, before I even read your post.

  24. #379
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Ok ok, I believe you, like I said no big deal. I do know you can sometimes have a post sitting there for a while to make sure it is perfect lol. What made you ask Jake about how groovyapi reads a file location?

  25. #380
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by Simon View Post
    Ok ok, I believe you, like I said no big deal. I do know you can sometimes have a post sitting there for a while to make sure it is perfect lol.
    Thanks! You very often influence me, bro.. LOL! just not in this one case...

    What made you ask Jake about how groovyapi reads a file location?
    Just wanted to find a way to have mods (like several of Michael's) that use InfoStats data be able to work in GL+/GB+.. Knew it would likely take another groovyAPI.do call replacing the jQuery call.. but wondered how we'd get at the .txt files that aren't in the Documents folder. I remembered that Jake told us groovyAPI.do only reads from the var/mobile/Documents folder - but I wondered if there was a way around.. and he let me know, 'yes'.. but he considers it a potential 'security bug' and will close 'that hole' in his next update of GL+/GB+. Before I contacted Jake, King had told me to try making a symlink in Documents from var/mobile/Library/Stats/BatteryStats.txt and RAMStats.txt... and that also worked.. So we have a way to get at that data - even if Jake doesn't allow 'up directory' navigation in future updates. We could always get Matt to redirect the infostats.txt files to Documents.
    Last edited by NewD; 2015-02-06 at 07:57 PM.

  26. The Following User Says Thank You to NewD For This Useful Post:

    Simon (2015-02-06)

Page 19 of 42 FirstFirst ... 9171819202129 ... LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •