Page 12 of 28 FirstFirst ... 21011121314 22 ... LastLast
Results 221 to 240 of 560

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


Thread: miLock This changes everything

  1. #221
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    Of course it didn't. And won't. Uses other Cydia apps.

    Just by looking over that code. I bet it won't work. Option values don't even work on the lock screen. I will attempt and probably waste more time.

    And I'm not saying your code doesn't work. I just know it doesn't work on the lock screen.

  2. The Following User Says Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013)

  3. #222
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    You don't need the Option values part at all, I only need it for the graphical setup.
    All you need are the database function.

  4. The Following User Says Thank You to rasputin007 For This Useful Post:

    King_O_Hill (02-08-2013)

  5. #223
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    I'll give it a shot

  6. The Following User Says Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013)

  7. #224
    I would wager that it won't persist through respring, just like HTML5 localstorage and cookies don't.
    But may be worth a shot.
    Rasputin: have you had this work on a lockscreen theme?
    If so, then I reckon maybe it will work

  8. The Following User Says Thank You to vikemosabe For This Useful Post:

    King_O_Hill (02-08-2013)

  9. #225
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    I don't know exactly what data you want to save, but from that example you will get an idea how to use javascript to create a database, enter values into it, save it and change the values.
    All done from within LockBackground.html, the user will not see anything of this and there is no need to have any additional icon or something like this.

  10. The Following User Says Thank You to rasputin007 For This Useful Post:

    King_O_Hill (02-08-2013)

  11. #226
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    If the values change in the .txt then it will work. If it handles these in the HTML then no it will not. I have yet to see just an HTML write to file. So I'm am very interested.

    Oh bro. Watch my video or give me your Cydia #. All these items I've done are saved. Even after lock/unlock. But not after a respring.

    I am fighting the respring issue only. Just because I cannot make HTML and JavaScript write to a file locally. (Without a server)
    Last edited by June'sIphone; 02-08-2013 at 02:16 PM.

  12. The Following User Says Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013)

  13. #227
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    I used this in the same way Buuf Theme did. Simple 3 step process. Springboard icon opens html page where you set whatever, that gets saved into database, then LockBackground.html or Wallpaper.html reads that database and uses those values. Same principle as a config.js file, only without code editing for the end user.
    Anyway June does not need the graphical setup for the user input, he gets all the data already, including ZIP code and/or WOEID, only he can use a database to store these. Database will be still there after respring or reboot, cookies won't.

  14. The Following 4 Users Say Thank You to rasputin007 For This Useful Post:

    Hitchhiker1981 (02-09-2013), King_O_Hill (02-08-2013), oscarf (02-08-2013), The.Drifter (02-08-2013)

  15. #228
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    Quote Originally Posted by rasputin007 View Post
    I used this in the same way Buuf Theme did. Simple 3 step process. Springboard icon opens html page where you set whatever, that gets saved into database, then LockBackground.html or Wallpaper.html reads that database and uses those values. Same principle as a config.js file, only without code editing for the end user.
    Anyway June does not need the graphical setup for the user input, he gets all the data already, including ZIP code and/or WOEID, only he can use a database to store these. Database will be still there after respring or reboot, cookies won't.
    Thank you

    This isn't possible then without a server.

    The springboard icon HTML is on a server yea?

  16. The Following User Says Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013)

  17. #229
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    Yes is a deliberate limitation that html/javascript can not write to file or create them, for security reason.
    But html/javascript can read and write to database.

    iOS has database capability already, otherwise I would not be able to do this.
    iOS is actually full of databases it created itself, your camera roll is saved in a database.
    You just use what is already there.
    When using database you do not need web server at all.
    Last edited by rasputin007; 02-08-2013 at 02:23 PM.

  18. The Following 2 Users Say Thank You to rasputin007 For This Useful Post:

    King_O_Hill (02-08-2013), oscarf (02-08-2013)

  19. #230
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    So if .txt already exists, the html can write to .txt

    But it can not create a .txt?

  20. The Following User Says Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013)

  21. #231
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    No, not as far as I know. It can read txt files, but not change them.
    I can understand the reason why they limited this. Imagine html/javascript could create/write files, then every website you go to could put whatever on your computer.

  22. The Following 2 Users Say Thank You to rasputin007 For This Useful Post:

    June'sIphone (02-08-2013), King_O_Hill (02-08-2013)

  23. #232
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    Quote Originally Posted by rasputin007 View Post
    No, not as far as I know. It can read txt files, but not change them.
    I can understand the reason why they limited this. Imagine html/javascript could create/write files, then every website you go to could put whatever on your computer.
    Yes security reasons. This was patched a long time ago.

    There's still a work around. I know there is.

    Database does not seem to be the Solution. At least not in this problem.

    Or I'm just totally missing the idea.
    Last edited by June'sIphone; 02-08-2013 at 02:29 PM.

  24. The Following User Says Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013)

  25. #233
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    This is the way I would try.
    You have a certain set of data you want to save, like ZIP code/WOEID, weather data, fonts, font colors, positions whatever, right?
    Create a standard database with a set of default values for each item you want to save, put that database in /var/mobile/Library/WebKit/Databases/file_0/ and let LockBackground.html read the database and save changed values (other then default values).
    Should work.

  26. The Following 3 Users Say Thank You to rasputin007 For This Useful Post:

    June'sIphone (02-08-2013), King_O_Hill (02-08-2013), oscarf (02-08-2013)

  27. #234
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    Ooooh!!!! I was missing the point all together. Genius. Using apples database, you said that. my apologies.

    Your own database, but there database directory

  28. The Following 2 Users Say Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013), oscarf (02-08-2013)

  29. #235
    So I just checked this out and the HTML5 localstorage I was messing with seems to actually save and create files in the db directory.
    However, the values were never pulled back in or read when revisiting the page.
    If I'm doing something wrong in reading and it's simple to fix then that method is uber simple and as easy as setting cookies.
    May be worth looking into more.

  30. The Following 2 Users Say Thank You to vikemosabe For This Useful Post:

    June'sIphone (02-08-2013), King_O_Hill (02-08-2013)

  31. #236
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    I didn't know that existed. Should have thought about it. Thank you!

    Quote Originally Posted by vikemosabe View Post
    So I just checked this out and the HTML5 localstorage I was messing with seems to actually save and create files in the db directory.
    However, the values were never pulled back in or read when revisiting the page.
    If I'm doing something wrong in reading and it's simple to fix then that method is uber simple and as easy as setting cookies.
    May be worth looking into more.
    Right but since your in db. The phone will probably save to that directory above. Big piece of the puzzle here. I need my Mac 😖
    Last edited by June'sIphone; 02-08-2013 at 02:54 PM.

  32. The Following User Says Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013)

  33. #237
    If the browser supports it, which mobile safari does, setting and reading values is supposed to be as simple as:
    localStorage["varName"] = "test";
    &
    alert(localStorage["varName"]);
    I'm gonna look and see if maybe it needs initialized before reading or if I'm doing something else simple wrong.

  34. The Following User Says Thank You to vikemosabe For This Useful Post:

    King_O_Hill (02-08-2013)

  35. #238
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,776
    Thanks
    5,239
    Thanked 10,058 Times in 3,680 Posts

    You need getItem

    localStorage.setItem('test', '12');

    alert(localStorage.getItem('test'));
    Last edited by June'sIphone; 02-08-2013 at 03:08 PM.

  36. The Following 2 Users Say Thank You to June'sIphone For This Useful Post:

    King_O_Hill (02-08-2013), oscarf (02-08-2013)

  37. #239
    King Kong ain't got nothing on me! King_O_Hill's Avatar
    Join Date
    Apr 2011
    Location
    USA
    Posts
    9,507
    Thanks
    42,116
    Thanked 17,952 Times in 6,529 Posts

    Damn guys, I drove home and missed this whole conversation. Thanks for stopping by Ras, I figured if it could be done, you would have a direction!
    Widget-Weather App Now Available! Also with MyLocation Support!
    Check out the thread here - Widget-Weather
    To install the Widget-Weather app, just go to Cydia and install. This will also remove MyLocation, as it is built in!
    Want to protect your JailBreak! Add this repo http://cydia.myrepospace.com/iLEXiNFO/ & Install "iLEX R.A.T."
    It will allow you to bring your phone back to a fresh jailbroken state!

  38. The Following User Says Thank You to King_O_Hill For This Useful Post:

    June'sIphone (02-08-2013)

  39. #240
    Quote Originally Posted by June'sIphone View Post
    You need getItem

    localStorage.setItem('test', '12');

    alert(localStorage.getItem('test'));
    It's supposed to work either way.
    And it does save and read saved values.
    They just don't last through a respring.

  40. The Following User Says Thank You to vikemosabe For This Useful Post:

    King_O_Hill (02-08-2013)

Page 12 of 28 FirstFirst ... 21011121314 22 ... 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
  •