`

iphone 后台进程(守护进程)

 
阅读更多

1、越狱
2、写一个守护进程
3、在 /Library/LaunchDaemons放一个list文件。3

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>MyScript</string>
    <key>ProgramArguments</key>
    <array>
        <string>/path/to/Application.app/Application</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>900</integer>
</dict>
</plist>

 

 

path/to/Application.app/Application:指定运行的程序。

 

请注意啊,启动的程序必须为 守护进程即是没有界面的程序了,不可能启动一个app了

分享到:
评论
1 楼 hpy8804 2011-09-16  
能否说的详细些啊,还是不怎么懂,如何实现守护进程,可否给个demo 啊,不胜感激,我qq465738515

相关推荐

Global site tag (gtag.js) - Google Analytics