ModMyMotoModMyiModMyGphone







  Apple Forums | ModMyi.com | iPhone, iPod, Mac, OS X, Mods, More > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-27-2008, 06:00 PM
What's Jailbreak?
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
[2.0] Launching background processes

I can't see anyone else discussing this, but I am porting an application to 2.0 which should launch another application in the background, similar to the "Ants" application, but it seems launchctl will not work; Is there any way to get this functionality?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2 (permalink)  
Old 08-29-2008, 12:11 AM
NetMage's Avatar
Developer
 
Join Date: Aug 2007
Device + Firmware: iPhone 1.1.3
Operating System: Windows XP / OS X
Location: Virginia
Posts: 1,144
Thanks: 40
Thanked 187 Times in 151 Posts

Assuming jailbreak, can you not use the classic Unix fork/exec?

Or are LaunchServices available? (Looking around, I don't see LaunchServices.framework on the phone...)
__________________
Starlight Computer Wizardry
Pocket-sized Development

Last edited by NetMage; 08-29-2008 at 12:19 AM.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3 (permalink)  
Old 08-29-2008, 12:22 AM
jakecigar's Avatar
iPhoneaholic
 
Join Date: Aug 2007
Device + Firmware: 2 x 3G iPhone 2.2, pwned
Operating System: OS X 10.5.5
Location: San Francisco, CA
Posts: 437
Thanks: 21
Thanked 98 Times in 85 Posts
Send a message via AIM to jakecigar Send a message via Yahoo to jakecigar Send a message via Skype? to jakecigar

I did notice that Cydia has a launchctl'ed code file! com.saurik.Cydia.Startup

/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist

Code:
<?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>com.saurik.Cydia.Startup</string>
	<key>Program</key>
	<string>/usr/libexec/cydia/startup</string>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>
__________________
http://jpassoc.com/x -- with free itunes under the puppy!
If I help you out, please press THANKS!

3g QuickPWN'ed with 2.1
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4 (permalink)  
Old 08-31-2008, 06:05 AM
What's Jailbreak?
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

It definitely seems like system, fork and exec can be used to launch the executable, but can't use UIKit, or other ways to display graphics, similarly with launchctl -- in both approaches, `ps -A` shows that the process is running, but nothing is made visible.

The nearest thing I've managed to do is copy the binary to a new /Applications/Something.app directory with its own icon and Info.plist with a new CFBundleIdentifier, and use UIApplication launchApplicationWithIdentifier:suspended: -- this allows the application to start and display things, but it uses the whole screen, though my UIWindow is much smaller, and you cannot interact with anything 'behind' the application.

So, it's close, but not quite there yet; Does anyone know any apps on 2.0 which can do this? Looking for something similar to Ants, or the screenshot applications.

Last edited by iguessitisok; 08-31-2008 at 06:13 AM.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5 (permalink)  
Old 09-10-2008, 05:12 PM
What's Jailbreak?
 
Join Date: Sep 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

I'm trying to figure out the same thing. The information I've found so far is that you can setup something though launchctl only during the install of your application since that's done as root. After that you can't access launchctl. I've played around with exec and that seems to work, but it was only a very basic app. I'll let you know what else I find out. Keep us posted if you find out more.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #6 (permalink)  
Old 09-10-2008, 10:49 PM
NetMage's Avatar
Developer
 
Join Date: Aug 2007
Device + Firmware: iPhone 1.1.3
Operating System: Windows XP / OS X
Location: Virginia
Posts: 1,144
Thanks: 40
Thanked 187 Times in 151 Posts

Something that could help if you are looking at how Ants was done is to look at the source for Dock:
cre.ations.net - Creation: Dock 3.0: Quick app switching for jailbroken iPhone 2.0 phones

It runs in the background and displays over other programs - there was a special mode required for this to work, and the limitation used to be there can be only one program of this type.

Now he is using the WinterBoard module that allows injecting code into SpringBoard.
__________________
Starlight Computer Wizardry
Pocket-sized Development

Last edited by NetMage; 09-10-2008 at 10:49 PM. Reason: fix accidental doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums | ModMyi.com | iPhone, iPod, Mac, OS X, Mods, More > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion

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
Forum Jump


Go to Top
ModMyI

All times are GMT -6. The time now is 10:54 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 | Dedicated Server Hosting by SingleHop | Copyright © 2007-08 by ModMy, LLC. All rights reserved.

RSS - Contact Us / / ModMyi Home / Archive / Privacy Statement - Top
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315