The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 01-24-2009, 09:26 AM
What's Jailbreak?
 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Need help with launchd

Hi,

I'm working on a way to get a decent "Night Mode" on my iPhone.
I already figured out how to shut down audio completely (com.apple.mediaserverd.plist) but what I now need is a way to schedule my two scripts to turn audio off and back on. Normally I would do that kind of stuff with cronjobs, but since firmware 2 does not have cron, but launchd instead, I ran into problems.
I can't figure out how the XML file is supposed to look like, and I don't know If I have to load it every time I reboot my iPhone.

So I need to execute /private/var/mobile/silent.sh on Saturday 1:00 and /private/var/mobile/loud.sh on Sunday 13:00 and so on (different times on different weekdays...)

So I really need some help guys, especially since I'm a Linux guy and don't exactly now my way around Apples OS!
Maybe If someone of the more sophisticated developers has some time, we could whip up a real App with a GUI out of this!

Any help very much appreciated

Last edited by Ult_avatar; 01-24-2009 at 09:29 AM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 01-25-2009, 01:29 PM
What's Jailbreak?
 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

My plist now looks like this

Code:
 <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
    <key>Label</key>
    <string>com.silent-hour</string>
    <key>ProgramArguments</key>
    <array>
        <string>/private/var/mobile/silent.sh</string>
    </array>
    <key>StartCalenderInterval</key>
                        <dict>
                        <key>Hour</key>
                        <integer>20</integer>
                        <key>Minute</key>
                        <integer>15</integer>
                        </dict>

</dict>
</plist>
but it will not get executed at that time
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion

Tags
help needed, launchd, night mode

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 08:05 PM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top