Futuristic and Cydget

You guys know I love cydgets. The ability to mix Javascript and Obj-C is an amazing thing. I can't thank Saurik enough for this ability. My latest creation for Cydget is Futuristic LS.

You can now download it in Cydia for $1.99 Direct Link: http://cydia.saurik.com/package/com.macciti.futuristiccydget/

Futuristic has a bunch of features, and most are documented on my main site http://JunesiPhone.com I wont go into much detail but it is pretty badass.

Now for cydget. Why did I use cydget and why do I only use cydget.

This is pretty easy to answer. The ability to use Javascript and Obj-c. Javascript is what runs our internet. Without it we would not still have this thing we love to call the web/www/W3. It gives our pages interaction, animations, it runs scripts to allow us to further extend the boring html.

Obj-c is what apple has written most of their OS in. It is another coding language that allows connection to their created methods, objects etc. For example the status bar. With obj-c and cycript we can easily open terminal type in a short command and pretty much have full control over this by using its obj-c method. To find this all we do is open apples header files. This is pretty much a script file compared to javascript. It shows everything that the iPhone Libraries have. By combing through these headers we are able to construct lines of code that can manipulate these objects.

Futuristic uses one of these lines of code. [[SBAppStatusBarManager sharedInstance] hideStatusBar] Just as it seems it hides the status bar. I will tell you how I found this.

First find the iOS7 Header files. Google iOS7 Headers and you will find these hosted on github.

Look for the header SBAppStatusBarManager. Here is the header file: SBAppStatusBarManager

As you can see there is a lot in this header as with most header files, but if you look closely you can see things that look as if they are enabling things. First thing I look for is anything with a + sign in front of it. This is usually the second part of our line of code. As you see with statusbar hide we have [SBAppStatusBarManager sharedInstance] So first is our header, second is our variable. Now we need to find an action for it. Searching a bit further we see -(void)hideStatusBar; Boom. this is the command to hide the status bar. Now you see more of these -(void)showStatusBar; < will show status bar again. -(BOOL)isStatusBarHidden; < will tell us if the status bar is hidden or not with a true or false return. Bool is boolean which returns always true or false.

We aren't worried about what else we can use. hideStatusBar is what we need for this example. Now I mentioned that cycript and cydget can run these commands with Javascript. We are merging what kept the world wide web and the library of our iPhone together. Now this can only be done with cydget. you cannot make a website and say if this user clicks this button then run [[SBAppStatusBarManager sharedInstance] hideStatusBar]. Not how it works, but if you create a lockscreen with cydget you have gained this godly ability. Example.

<div id="press me" onclick="hidestatusbar()">Press to hide Statusbar</div>  
Simple div that when pressed it runs a function

<script>
function hidestatusbar() {
    [[SBAppStatusBarManager sharedInstance] hideStatusBar]
}
</script>

The simple script that WILL hide your status bar. This is magical and I use it quite alot in my cydgets. I wish more people would adapt this instead of selling these simple lockscreens.

Features you get from cydget still may be unclear so more examples.

One of the biggest
Putting all settings in the settings.app instead of making your users edit code. They are users not coders. This is done by having cydget read a dictionary that is created from a simple plist.
Video: Lockscreen Preference Settings

You can have Dim Delay Control, Hide Status Bar or even run GPS services. GPS is in LockBuilder GPS. It uses no mobile substrates, and gets your current location perfectly fine, and probably saves you more battery then the mobile substrates myLocation or WidgetWeather.

Read images directly from the camera roll. Add multiple files to a folder. Javascript cannot read a directory of files (security reasons for the web) but obj-c can. Mix obj-c and javascript together and you can do this. Why make users name images a specific name to put into a slideshow? You should want to make things as easy as possible for them.

Why use a mobile substrate when you don't have to? Why rely on other devs to keep packages updated to make your lockscreen work? You should be in full control of that, and Cydget gives you this ability.

This is just a few things you can do with cydget. Hope it helps a few and intrigues them to try out cydget. Everything mentioned above is used in Futuristc. Would be a good place to start learning imo. I'm always available to help my contact info is on http://JunesiPhone.com Thanks

Read more about cydgets








JunesiPhone.com