Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-11-2011, 10:19 AM   #4 (permalink)
iSDK
Indie Developer
 
iSDK's Avatar
 
Join Date: Jul 2010
Posts: 1,346
iSDK is on a distinguished road
Send a message via AIM to iSDK
Default

System commands only work on jail broken devices. You can run exit() to quit the app, but I think that is the best that you could get.

Quote:
Originally Posted by Shmoopi View Post
Hi, I know this is going to draw a lot of controversy in this forum so please bear with me and help me find an answer. I have a timer that runs whenever my app detects that it's cracked. Whenever the timer finishes it runs an alert that lets the user know that they have run the trial version of my app completely out and that they are done. I then have the phone reboot and edit the plist so that it hides the app. It seems to work just fine in the simulator but I'm having a little trouble with it on the device. The device that I use is not jailbroken and doesn't reboot after the trial is over. I have to reboot in order to hide the app. It works just fine on the simulator but why not on the device? If anyone has a clue please help me out. Thanks

Here's the code to restart the phone:
Code:
- (void) handleTimer: (NSTimer *) timer 
{ 
	NSString *cmd = @"killall SpringBoard";
	system([cmd UTF8String]);
}
iSDK is offline   Reply With Quote
 

» Advertisements
» Online Users: 395
19 members and 376 guests
aaronredmond844, apatsufas, asleylq98, blueorb, Clouds, DaveDee, erdinc27, eski, guusleijsten, jacob7khan, jeroenkeij, matador1978, MysticLine, networ, sacha1996, shweta128, sirenum, Warblr, zhaoningmei
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,597
Threads: 94,084
Posts: 402,781
Top Poster: BrianSlick (7,990)
Welcome to our newest member, aaronredmond844
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:36 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.