1. surfero's Avatar
    It works perfectly, the only problem is the icon, but i change it with the older icon (tnks nuxun).
    I put the correct icon in airplane.zip.
    VSC, any idea to put your work on Cydia??
    Attached Images How to release an app?-icon.png 
    Last edited by surfero; 2008-10-06 at 11:50 AM.
    2008-10-06 11:46 AM
  2. nuxun's Avatar
    When airplane mode is disable my iphone enables wi-fi even if wi-fi was not enabled before. It's possibile to respect wi-fi precedent configuration?

    thank you!
    2008-10-06 01:50 PM
  3. vsc's Avatar
    Somewhere along the way Apple changed their frameworks such that when I disable airplane mode WiFi didn't get reenabled (if it was enabled in the first place). I started forcing WiFi back on in this case. Clearly this isn't always the best idea if WiFi was off to start out with.

    I'll look at this again and given that the frameworks have changed yet again maybe I'll see something I can take advantage of.
    2008-10-06 02:27 PM
  4. vsc's Avatar
    Here is a fix for the daemon. It appears to respect the WiFi state. Give it a shot and report back your results.

    Remember to set Airplane inactive or you might not be allowed to overwrite the file. Also you will need to purge the database and respring or the OS won't let this execute. Thus,

    rm ~mobile/Library/Caches/com.apple.mobile.installation.plist
    killall SpringBoard
    Attached Files
    2008-10-07 01:05 AM
  5. nuxun's Avatar
    Give it a shot and report back your results.
    Hei VSC,

    now it's ok. No wi-fi before... non wi-fi after

    thank you for rapid fixing!

    Off Topic:

    A little step beyond. What about a airplane pro commercial version with more features?

    Something like:

    * more action: not only airplane on/off but even silent mode on/off, ssh on/off, gps positioning on/off etc..

    * more scheduling like native Clock application: airplane on/off during working day (7:00-23:00), airplane on/off during weekend 9:00-22:00 etc..

    think about it, you can make a wonderful application!
    2008-10-08 09:15 AM
  6. nuxun's Avatar
    Unfortunately launchctl must be setuid for the Airplane to function properly (e.g. chmod +s /bin/lauchctl).
    Don't worry, look at this:

    -rwsr-xr-x 1 root wheel 59664 Jul 23 13:48

    -rwsr-xr-x 1 root wheel 59664 Aug 29 07:51 /bin/launchctl*

    2008-10-09 09:16 AM
  7. vsc's Avatar
    Interesting solution to the problem. Release your own copy. I will switch over to something similar.
    2008-10-09 01:52 PM
  8. vsc's Avatar
    Here is an update that included a fix to the icon that should work with and without Winterboard, as well as the updated daemon. Also there is no longer the need to setuid /bin/launchctl.
    Attached Files
    2008-10-10 03:16 AM
  9. surfero's Avatar
    Thanks VSC!!
    2008-10-10 10:37 AM
  10. nuxun's Avatar
    Here is an update that included a fix to the icon that should work with and without Winterboard, as well as the updated daemon. Also there is no longer the need to setuid /bin/launchctl.
    Sorry but it doesn't work for me. I have to setuid /Applications/Airplane.app/launchctl to make it work. After that everything it's ok.

    My two cent hint: your application don't affect battery almost at all. I have some problem with battery drain so I tried to disable and re-enable some daemons to find the cause. In 8 hours of usage with "auto airplane mode" active and no usage of iphone, battery remain at 100%. Not the some for other program that cause me a 16% battery lost with the same test :/. It was quickgold to eat my battery but seams that version 1.3.1 resolves the battery issue. By the way, thank you another time for your battery safer application
    Last edited by nuxun; 2008-10-12 at 02:47 PM.
    2008-10-12 02:44 PM
  11. vsc's Avatar
    Maybe I wasn't clear in my prior posting. All that I did was capture the launchctl application into the Airplane bundle. The private version of launchctl still needs to be suid. That said the zip I built had suid set for launchctl. Perhaps that was lost when it was unpacked on your system, or when it was uploaded to the iPhone.

    Clearly when the iPhone has the radios off and no application(s) eating into the battery life, the iPhone's battery life in this state is very long. Depending on your location with respect to the cell tower, battery life with the GMS (or CDMA in the 3G case) radio on can be very poor. What I mean is that if you are in an area of poor coverage the iPhone consumes a great deal of power transmitting to the cell tower.

    If an application is well written it shouldn't consume much power at all when running in background. Airplane's daemon is one such application that sits in background and only runs when an event occurs. Unfortunately how this is done is poorly documented by Apple or for that matter anywhere else on the web from my experience.

    Here is a out the box reason I wrote Airplane... I didn't want the phone ringing at night. And still in the morning it's like an alarm clock...
    Last edited by vsc; 2008-10-12 at 02:56 PM.
    2008-10-12 02:53 PM
  12. nuxun's Avatar
    I love your application for two things:

    -no ring at night
    -battery life: at home in 8 hours of stand-by with radio module on my iphone eats 5% of battery (with airplane mode active almost 0%) too much for me

    2008-10-14 02:01 PM
  13. surfero's Avatar
    Your aplication is VERY important for the iphone comunity, please release it on cydia or appstore (if apple permits).

    2008-10-14 11:06 PM
  14. jrentzke's Avatar
    vsc, thanks for porting this to v2.

    I am experiencing a weirdness though with the settings. I want it disabled at 5:59 am and enabled at 11:00 pm. I can set the disabled part no problem, but with enable, I'm only able to select 12 from the hours list (the rest are grey). The minutes selection is fine. With AM/PM I can only select PM. When select AM, it just jumps back to PM. I ended up editing the values in the .plist.

    Also, I don't actually know if it's working or not. It says it's active, but when I set my system clock to 10:59 pm, and wait for 11:00 pm, airplane mode doesn't kick in. And when I manually switch on airplane mode, then set my system clock to 5:58 am, airplane mode doesn't disable when it reaches 5:59 am. I'll wait for tonight to see what happens at 11:00 pm.

    What command could I run to see if the deamon is active or not?
    Last edited by jrentzke; 2008-10-16 at 03:01 PM.
    2008-10-16 02:28 PM
  15. vsc's Avatar
    When you start the app if the active button is highlighted then the daemon is in fact running. The app queries the OS.

    You always can do a "ps -A" and look for Airplaned

    Otherwise I just got back to town and will look at this in the morning.
    2008-10-18 03:09 AM
  16. jrentzke's Avatar
    vsc, thanks for that. It is indeed running, it just doesn't seem to be kicking in. I'll see tonight again what happens.
    2008-10-18 11:16 AM
  17. vsc's Avatar
    Right or wrong I set the limits for disable to the range of 12:00 through 23:59, and for enable the range is 00:00 through 11:59.
    2008-10-19 02:32 AM
  18. jrentzke's Avatar
    vsc, that range is fine if you want the enable at 00:00, but not at 23:00 like I tried. That's not a problem though, I just edit the plist to 11:00 pm.

    But in your program, under enable, only 12 is bold, the other digits are grey. So only 12 as the hour is selectable. Any if the minutes can be selected. AM or PM can be selected, but as soon as you select AM, it jumps back to PM.

    btw. it did kick in last night.
    Attached Thumbnails How to release an app?-img_0002.png  
    2008-10-19 12:55 PM
  19. vsc's Avatar
    Here is a version with the restrictions removed. You only need to replace Airplane is Airplane.app. That said I have included all the files.
    Attached Files
    2008-10-19 04:21 PM
  20. jrentzke's Avatar
    vsc, perfect thank you
    2008-10-19 10:11 PM
94 ... 2345