How to send a user to the main iPhone Settings screen from within your iPhone App - iphone

I currently have an application that requires the user to maintain a VPN tunnel. On load I check if the VPN tunnel is available.
I am wondering if there is any way for me to display an UIAlertView which on clicking "OK" takes the user to the iPhone main settings screen, so they can turn on VPN.
I know how to store app specific settings and that seem to be the most common articles out there, but is there any way to get your app to redirect the user to the main iPhone settings page?

As said, there's no way to do this currently. You'll have to create your own settings screen inside your app.
See a similar thread here:
How do I open the Settings application from my application?

iPhone has it's own NSURL protocols for apps, such as youtube:, mail:, etc. Judging by the "Airplane Mode" alert, there is clearly one for the Settings app. I imagine it is open, but don't know what the syntax would be off the top of my head. Check the docs about the protocols.

Related

using guided access in iPhone 6 programmatically

Until now asper my knowledge it was not possible to restrict the app from exiting. User could press the home button and app will exit. Then came multitasking and when we press home button app would go in background, but on long press user can still close the app.
I am working on developing anti-theft kind of application and needed to lock the phone programatically, but seems that it is not possible.
Also another problem was if user exits app then there is no way it will get notifications from the web. After some research I found the we can restrict the application from being exited using GUIDED ACCESS facility provided by iPhone6.
But all the links that I found states the procedure to do it from settings menu of iPhone.
I wanted to know if there is any way to do it programmatically or at least display relevent iphone settings screen directly.
It is not possible to restrict your app from exiting or allowing it to lock the iPhone programatically.
This is FAR beyond the scope and bounds of security for your app to infect the system this way.
As for Guided Access it is a feature provided in iOS6 allowing parents to use their device with their kids and prevent accidental app exits or unintentional taps outside a certain bounds. It also has availability in a kiosk mode for small businesses using iPads as public information access points that want the iPad locked to an app or webpage. It is not a public API allowing your app to turn such blocks on. This again is for the security of the device.

Embeding multiple apps in an app?

I am a newcomer to application development and I'm wondering if the concept I have can actually be created.
My concept involves creating an app that has the ability to embed another app within itself.
I'll do an example which is also a very bad one but you'll at least get the point.
Picture an app on the iphone that's called "Kwesi's app". Once you tap on it, it opens up a page with 3 icons. A facebook icon, a gmail icon and a hotmail icon. Now tap your finger on the gmail icon and instantly your gmail opens up withing "Kwesi's app" and you have full access. There is also a button in the top left corner that says "Main Menu". Once you tap the "Main Menu" icon, you go back to the three icons and can now rinse and repeat.
I hope this example is clear enough.
The question I seem to be coming back to is, would it be possible having an application that embeds or links you to other apps in that manner? I can only guess that it'd be really weird since they'd have to be installed seperately on your phone but I don't want that. I want one app that can handle an already set amount of apps within itself as the above example shows.
Thank you very much for reading and any thought would be very much appreciated.
/Kwesi
No, that is not possible in iOS for security reasons. But you have the following choices to modify your idea:
Register a protocol for the app : This will allow you to send data between applications using protocols. However, if the app wasn't made by you and doesn't have a protocol, then you can't use it.
Using this idea, it is possible to open an application. For example, opening Facebook with "fb://" or evernote with "evernote://". I am sure there are other applications that have these protocols. Just be aware that you don't have control on the application in this case. You can only open it and send data to it.
Since your example was about Facebook, Gmail. Then I would suggest using their corresponding API and build everything in your application. Many famous applications provide APIs for a fee or free usage. You have to check with each one separately.

Application which work in background only iPhone

I have requirement for an application which work in background only.
When first time application install on device then after installation that will be go to background. And after two minutes a view will popup on screen.
Now problem is that after installation how to redirect application into background?
i get answer for this that if we want to send our app into background then we have to open another app like as safari. so i get this solution.
Now problem is that how show a view after two minutes from background. I have to create as a demo not for app store. So if anyone have any solution then suggest me.
Thanks
It is not possible to do so in iOS. You can't send an app into the background
If you want your app to get displayed, the only way to do so is through push (from server) or local (from phone) notifications, and the user has to explicitly accept it.
Unfortunately, you can't make it open automatically.
iOS is not designed to run code in the background. There are a few exceptions, for example a music streaming app, or a GPS navigation app, but in general it cannot be done.
Instead, you should run your app on a server in the cloud, and send a push notification to the phone when you want something to happen on the phone. You may also be able to achieve this with "local notifications", depending on what you're trying to do.

Possible to alert server to iphone settings change?

I'm working on giving our users context-specific PUSH notification settings, similar to what Facebook has in their settings menu.
As far as I can tell though, there's no way to actually notify our server of these changes until the user actually launches the app.
Is this correct? Is there any mechanism provided for immediately alerting our servers to a settings change?
That's correct: you can't detect changes made in the settings app until the next time your app launches.
The closest option to what you're describing would be to put the settings in your app somewhere and notify the server from there.

Opening one app from another app without closing the app

In the home page of my iphone app, there is a button added. When that button is clicked some other iphone app needs to be opened in a new viewcontroller (with out closing the parent app).There will be a back button on this view controller. When the back button is clicked, the new viewcontroller which is showing the another app needs to be closed and our parent app's home page needs to be shown.
Please give me some ideas on how to do this. I googled for this i didnt get any solutions.
Thanks,
Raja.
-- the following applies to iOS versions previous than 4.0 :)
Actually, there can be only one iPhone application running at once (with exceptions of Safari, Phone and some other system applications). The iPhone Human Interface Guidelines say so:
Only one iPhone application can run at a time, and third-party applications never run in the background. This means that when users switch to another application, answer the phone, or check their email, the application they were using quits.
However, if you only need to e.g. show a webpage, you can do it using UIWebView
Also, if you need to open another application, you should use URLs as pointed by Steve Harrison. This will, however, close your application. The recommended behavior in this case is to remember your application state and restore it when the application is run again, as Nithin writes.
According to apples documentation, they are not allowing any applications to be run in the background, except system generated ones. So you will be unable to do the thing you are going to implement. However, there is one thing that can make the same result.
You told that you are calling other application to run on a button click. Before initiating that application, save the current state of your application, may be using sqlite3 or core-data, and then open the other one. While returning back, load the pre-saved data from the database or wherever you have stored it. Every time you start the application, you check for the persisted data, if exists, load it or otherwise load your basic view
I don't think that you can run other iPhone apps within your own one. It doesn't make sense. You can open another iPhone app via a URL (see here and here), but this will close your app.
Like it has been stated: running two apps is not allowed by apple. You can however implement this apps features into you're app and have both get and save data to the same server...
Or like Nithin said: this functionality is available on JB iphones. Look into "backgrounder" for implementing one solution for normal users and one for thouse that has jailbroken.