+ Reply
Results 1 to 1 of 1

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


Thread: Ch40s-Utilties

is a discussion within the

Native iPhone / iPod Touch App Launches

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
Alrighty, here we go, new tools for everyone to enjoy! I spent months working on all of these perfecting them and making them as stable as I could (hopefully, there
...
  1. #1
    What's Jailbreak?
    Join Date
    Jan 2011
    Location
    Watching you
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Ch40s-Utilties
    Alrighty, here we go, new tools for everyone to enjoy!

    I spent months working on all of these perfecting them and making them as stable as I could (hopefully, there are always some bugs). These are pretty developer friendly too


    This is a way of making apps for iOS without knowing any obj-c. You can make them using shell

    I will be making tutorials at some point in the future

    Have you ever had an idea for a really simple app or some little script that you wished could have a GUI? (although it doesn't need to be simple!) This uses the preference panes that the Settings app uses, to make GUI's. (And a lot of other code that I made so you don't need to worry about it.).

    Every time you toggle something in the settings app, it changes a value in a .plist. So, I made a bunch of tools to work into that, to read them, and do something if a specific one you wanted was changed.

    Sorry if this doesn't really make sense right now, but stay tuned

    Also, if you select something that doesn't close the app, you will need to close it out of the app switcher... otherwise it won't restart the launcher for the app. So, close the app from the switcher I will work around this in the future

    I will just document them, and how to use them so yeah. :P
    all of these require root access
    Plist Utilities
    These are some handy things for making a GUI on the fly without needing a whole bunch of loops and whatnot.

    PlistGenStart
    This command will start the generation of a .plist for you, simply call it off using
    Code:
    PlistGenStart Plist AppName
    Notice I didn't say Plist.plist, or AppName.app, if you do that, it won't work. You can also leave the AppName blank if you want to just have it use the Preferences app (Just a little time saver)

    PlistLinkGen
    In case you need to create a list of cells that link to subpages in your app (Say, a bunch of programs dynamically generated, or something, the OTA settings use this)

    So you make your GUI previously, and then you call this off, and it will make a bunch of link cells using the names from a file specified.
    You can also add padding above and below the set of links (to make it look a little more separated from everything else)
    Code:
    PlistLinkGen Plist /Library/file_with_names top AppName
    top is the area which it adds padding too, you can say bottom, or all (to get it on the top and bottom).

    PlistLinkGen_PAGE
    Creates just a simple page with a whole bunch of link cells. Call it off like this
    Code:
    PlistToggleGen Plist /Library/file_with_names AppName
    file_with_names is any file that contains a list of names like:
    Code:
    Waffle
    Cookie
    Apple
    Cake
    and it simply makes a page with cells like that.

    PlistToggleGen
    Makes a bunch of toggles, very very VERY useful for a list of options or things which you want to know if they are on or off Run it like so:
    Code:
    PlistToggleGen Plist /Library/file_with_names com.yourname.program top AppName true
    Simple yeah? com.yourname.program is the identifier, and this is important So remember this :P
    the true at the end is whether these should all be as default, enabled or disabled. They can be true or false

    PlistToggleGen_PAGE
    Same as above, but it creates a whole page of toggles
    Code:
    PlistToggleGen Plist /Library/file_with_names com.yourname.program top AppName true
    PlistGenEnd
    Ends the creation of the plist. Call it off like this:
    Code:
    PlistGenEnd Plist Title AppName
    Title is the text displayed at the top of the page


    Ok, so there are all those. Dynamically building pages, to accommodate for multiple things in your code
    Now, onto some other little tools Handy things I made for me mainly, but also to be used by you

    package
    Simple tool to set ownership and permissions on a .deb layout folder and it's contents, and then package it up, and then ask you to install it.
    This can do
    • Daemons
    • Apps
    • All other basic files as 775


    place your project folder in /var/mobile, and then call it off like:
    Code:
    package Project_Folder
    and then it will go through it, and then ask you if you want to install. Enter y or n to either install or exit the program

    donate
    generates a donate button for your GUI and code backend to execute it. This will create a very simple program and then add it into Ch40s-Launcher, so when the button is pushed in your app, it will run it and open up the link specified
    You will find your code and sample cell for your GUI in /Library/Ch40s-Utilities/Donate/Donate-yourname/sample_cell
    Code:
    donate yourname "http://yourlink.com"
    yourname is your developer name or whatever. no spaces.

    follower
    Makes a twitter follow button for your app and code behind it. Same as the donate command really, except it is for twitter links when pressed, it opens up Safari and loads your profile.
    You can find a sample cell and your code generated in /Library/Ch40s-Utilities/Follower/Follower-yourname/sample_cell
    Code:
    follower yourname
    yourname is your twitter username.

    Main Stuff
    ok, now, the main stuff. The really redone code. I'm assuming you knew how to use the older Ch40s-Launcher, so yeah. I'm tired right now. I have had maybe 5 hours of sleep for the past two days total. I might update it later. This is simply documentation, not tutorials


    Ch40s-Launcher
    NOTE: Call this off in your apps code to open it up (where the daemon launching thing used to be) as
    Code:
    Ch40s-Launcher Start

    Now, to add a program to Ch40s-Launcher, do this:
    Code:
    Ch40s-Launcher Update program com.yourname.program Type key /path/to/your/program
    program is the name of your program (Like MAC-Spoofer (no, don't use, I have one already made))
    Type is the type of thing to check. It can be any of these:
    • Switch
    • String
    • Button


    key is the key to check for to see if it has changed in it's variable, or is enabled.
    /path/to/your/program is the location of your program to call off if the key has changed :P

    In your code, if you need to respring, please DO NOT tell it to in the app. Use
    Code:
    Ch40s-Launcher Respring
    to tell it to. This will have a popup allowing the user to choose to respring, and also it does some cleanup code for Ch40s-Launcher

    If you need it to reboot, use:
    Code:
    Ch40s-Launcher Reboot
    and if you don't need it to, just use:
    Code:
    exit 0
    So there. All done with Ch40s-Launcher (I made a lot of changes, along with a root access thing, but I don't really want to explain how that works right now :P )

    OTA
    Finally, my OTA code, completely recoded from scratch It is usable by anyone. So yeah. Cool right?
    It will create code that runs the OTA app checking off some stuff, and a button for your GUI to check for updates, and adds it into Ch40s-Launcher to check stuff
    add your program in like this:
    Code:
    ota Update program "http://yoursite.com/somefolder" 1.6
    program is your program
    "http://yoursite.com/somefolder" is the site and then the folder the program is located in.
    1.6 is the version of the program. This actually only needs to be done once, the version being put in (well, keep it in there, but you don't need to worry update changing the value)

    Then on the http://yoursite.com/somefolder make the program update in there called update.deb, make a file called info and a file called changelog
    In the info file, make the contents like this:
    Code:
    Source: http://yoursite/somefolder
    Version: 2.0
    Just make sure the version in the info file is higher than in the original package and if you make this file in windows, convert it to unix/linux format, otherwise it will have issues :/ or edit it on your iPhone/iPod then don't modify it until you upload it online

    you can find the sample cell for it in /Library/Ch40s-Utilities/OTA/your_program/sample_cell.

    onBoot
    Forgot about this one This will run a program on boot up of the device
    Code:
    onBoot yourprogram /path/to/program
    Nothing more to do there

    rootthis
    New tool, this runs on the start of an app or something, separate of ch40s-launcher. This calls your program, and also passes an argument of your choice to it.
    Code:
    rootthis MyApp /path/to/script Argument none
    self explanatory, except for the "none". That is simply a placeholder. If you want this to run in the background, then just have it set to "sub" and it will run it as a subprogram. Otherwise, you must wait for your code to execute before it loads up your app. This is handy for dynamic generation of an app, as demonstrated in LogoMii's ability to get all the boot logos, and new ones

    And there you go. All done. All my new utilities. They all work fine. it needs sbutils, which the version I have attached below is needed, because the other one says incompatible with 3.1.3 but it works fine .

    This took me a couple months of trying and retrying, debugging, and thinking of a lot of new ideas. Lots of work. You can see some of the code demonstrated in this video (kind of unintentionally ) :
    Whited00r/redd00r progress - YouTube


    Downloads:
    http://www.mediafire.com/?4itpbffo3ofqpt1

    Ok, I will post my repo, just for the sake of people being able to get all the dependencies in one go... If that is not allowed, please tell me and I will remove it I really don't want to upset anyone.

    my repo:
    http://bcooperizcool.bplaced.net/repo

    Depends on
    adv-cmds, bash, basic-cmds, coreutils, coreutils-bin, diffutils, file-cmds, findutils, lzma, ncurses, grep, readline, sed, system-cmds, com.innoying.sbutils, wget (yeah, a lot of stuff :P)


    Mods, or whoever, I am sorry if this is the wrong section, or against the rules in any way.

    And yes, this really is kind of pointless, but I'm just putting it out there for everyone. It might help some people, even privately.
    Last edited by bcooperizcool; 06-16-2012 at 10:29 AM. Reason: updated link/version

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts