Objective-C restart iphone or possibly another method? - iphone

I read that there was no method to restart the iPhone (at least that will go through the app store), so I am wondering if you have any other ideas. Basically, at my desk, I receive "No Service"... When I go out to my car (in a service area), I remain in No Service without being able to make a call until I restart my iPhone. I've tried respringing winterboard, I've tried airplane mode on/off and that doesn't work either. The only way I've found is to restart the iPhone completely. Does anyone else have any ideas?
Thanks!

Your explanation is right on the money. Nothing you can do about this particular problem outside of jailbreaking.

Related

make the program automatically go to background

I want to click on a button to make my program into the background. How would I do this?
If it used to jailbreak the phone,
If you mean programmatically "minimize" the app (closing it while leaving it open in multitasking), I don't believe there's a way to do so using a public API.
Please have a look at the following anwsers
Send App to Background process
Suspend the application
Don’t Quit Programmatically
Never quit an iOS application programmatically because people tend to interpret this as a crash. However, if external circumstances prevent your application from functioning as intended, you need to tell your users about the situation and explain what they can do about it. Depending on how severe the application malfunction is, you have two choices.

Close all running apps on single UIButton touch?

I wana close all the application runing in the background by single button click. Is this possible? I read all the related post.They all describe about the single application but i want to close all the running apps.I know that apple doesn't allow this.But Is there any private api for this? Please help me.Help would be appricieted. Thank you very much.
I don't think So we can do anything like this as You want to do that from some app which is having its own Address Space i.e. sandBox. Means Every App is having its own Address Space which Other App Cannot Access it, as it will result in Crash.
So, sorry to say but we Cannot up to my Knowledge... :)
I don't think it is possible but Even if you do something like this your app is for sure be rejected from uploading on app store, this will be a virus for iphone,
There is no need to stop all running apps by any means, and there is no way to do this programmatically other than jail breaking your device and hacking something together.
But in the end it makes no sense at all, see: http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html

iPhone locked in portrait mode

My question is similar to this thread
which says to lock the iPhone in portrait mode and doesnot allow it to go to landscape mode.
This can be done easily but my concern is I want to lock all the applications running to the portrait mode in iOS 4.
That is if I have locked the orientation mode and has minimised my application then the none of the application in iPhone shall go to landscape mode.
So my question is
Is it possible
if yes then how? Any ideas or link will be really appreciated.
Edit: I know this is already available in iOs 4.0 but its hard to find also this is just for information purpose.
For those who disagree: check out the link
Thanks in advance...
Edit: Finally as per everyones suggestion I think it is not at all possible to lock other applications orientation through our application.
How would you feel if any 3rd application is accesing the orientation of your application and that of device.
So Its all handled out by Apple itself. Also as told no application is allowed to effect the system variable..
So in case you succeed in finding out the hack for this thing... Then also your application is gonna rejected by apple...
Still all the best for ur research :P
Sorry, but you can't lock the orientation via public APIs, and if you are going to use private APIs, Apple will never approve your app.
An iPhone app cant affect system wide variables such as screen lock. If you could, then there would be nothing keeping you from accessing all the other data on the device as well. Sorry, but if you want your app approved by Apple, you'll have to give up on this feature.

forbid exit from iphone/ipad application

is it possible and how to implement forbiden exit from application on iphone/ipad?
we have an application that must permanently work on ipad device. user should not have any way to exit from application. could you advise how to implement this functionality?
By jailbreaking it and installing custom software that enables you to do that.
Or putting a lot of tape over all the buttons.
Anyways, you can't do this with a standard app on a standard device. Just think about it - would be a pretty annoying thing for apps to do, wouldn't it?
Apple's own human interface design guidelines would forbid this. Your app can't encroach on the abilities of the OS that transcend your own application's responsibilities. The whole point is to have a consistent experience for the device and if you're modifying something as fundamental as switching apps, you're violating that principle.
If you can't exit the app, you're essentially turning your device into a single purpose unit. How do you expect to get back to the app list if you disable fast app switching and the home button?
Whatever solution you find would not be approved by the app store.
You should look at whether the current multitasking features can help chip away at your reasoning for needing the app to always run in the foreground.
If you are talking about an enterprise app locally distributed, you might be able to do this, though probably not.
The best idea would be to physically break or block the hardware button.
Or issue alerts to the device every 10 seconds making the thing effectively unusable when outside the application (you can ignore incoming notifications for you in-app).
Why do you have this requirement?
There is no way to implement this functionality. You cannot do it.
You can't do it, But if you jailbreak and configure the "Home-Button" settings you can :)
Btw, If you do it, the only way to quit will be a shutdown... And to shut down every time would be kinda annoying...

How do I kill a back ground running app in iphone?

I just want to know how to kill a back ground process/app in iphone. Just like in Auto Lock SBSettings where, the "process" toggle is able to list all the back ground process and allows user to kill any of them.
Thanks in advance.
Thanks 'refulgentis', 'Chuck' for your quick responses.
You're true and also I know that the Apple's public API doesn't allow me to do so. In a jail broken phone how could I do this? How "SBSettings" 'processes' toggle is doing the same?
My requirement is to kill and restart my "Phone (MobilePhone.app)" application. In this case how can I proceed further?
Can you please give me some sample piece of code?
You can't, using the public API. Anything you write wouldn't be allowed on the App Store.
For jailbroken apps, just use ps -ax and kill.
Since you aren't allowed to have any background apps running on the iPhone, this turns out to be something of a non-issue.