How do I open the Settings application from my application? [duplicate] - iphone

This question already has answers here:
is it possible to open Settings App using openURL?
(4 answers)
Closed 7 years ago.
In an iPhone app I'm working on, the user needs to enter some configuration via the settings application before my app will be able to connect to a server and run. Right now when the user first launches my app, I display an alert explaining that the user should go to settings, enter the config details and then relaunch, but this isn't ideal.
Unfortunately there's no way for me to provide sensible defaults for this app, the server host names, user accounts etc. will vary for each user. I think the best I can hope for is to show an alert explaining that some configuration needs to be entered via settings, and provide a "Take me there..." button that will open settings and then open the section in settings for my app. If that's not possible, opening settings is better than nothing.
I vaguely remember that the iPhone jailbreaking people had figured out a way to launch settings or other apps via a funny URL or phone number in the Addressbook, but I'm not finding any info about it in Google.
:(

As far as I know there's no sanctioned way to open Settings from another app.
In my opinion you should just ask for the values if you need them at launch, storing them in your NSUserDefaults and possibly directing your users to look in Settings.app if they need to change those settings in the future.
Unfortunately that means maintaining some minimal UI for your user to fill in their settings during that first launch, but it seems better from a UX perspective to me than denying the user the joy of using the app immediately.

In its current form, Settings is not really up to the task you want to use it for.
The problem you'll run into, if you haven't already, is that you'll want to verify the user's information somehow. Maybe they entered the server name wrong, or made a mistake in their password. What then? Keep sending the user back to Settings to try again, then switching back to your app to find out if they got it right this time? That's going to be a lousy user experience, and the best way to fix it is to give the user the option of changing the settings in your app so you can verify the information immediately.
Only once you've done that, poof, you don't need to use Settings for this anymore. You can just send users to that account-edit view immediately when your app launches for the first time. Your users get a better experience, and you're saved the trouble of trying to find a good way to get users to find your app's configuration in the Settings app.
Apple does this already-- just look at mobile mail.

One of possible solutions suggested above is to write own settings dialog. I have found this project http://www.inappsettingskit.com/ which you can include to your app and it shows the same settings as iOS does. I did not test it yet, but going to do now.

Related

Is there a neat way to tell if iPhone/iPad has been set a passcode by user

I have asked this question long before.
I know it maybe impossible, but as far as I know, 'Find my friends' has this features and it works just so well, so I wonder if now there is a neat and legitimate way of doing that.
Just because Apple's Find My Friends app has a feature does not mean the API is publicly available. If this app is not an enterprise app, you can't use private APIs and have your app put on the app store. If it is an enterprise app, you may want to look into setting up a configuration profile for the device. In order to access the VPN for my employer, I had to install a configuration profile (visible in Settings) that requires a passcode to be entered every time I unlock my iPad. Without that, I cannot VPN into their intranet. TestFlight uses a similar approach with profiles to register a device to receive builds. I would check out this link from Apple on setting up these sorts of profiles for enterprise applications: http://www.apple.com/iphone/business/resources/
There's no way to detect this programmatically from within an iPhone SDK-based application. If you need to, you should file an enhancement request with Apple at http://bugreporter.apple.com

Can I disable Home Button on my App? (full screen browser kiosk mode)

I have to put a lot of iPads on a stantd on a tourist fair to show our web, and we don't want that people can use these iPads to play/enter facebook/etc. Is for this that I was searching an application that put the iPad on kiosk mode to show fullscreen our web, but that's ridiculous if the user can press home button an go to springboard...
Is for this that I start to develop a fullscreen browser without address bar, only show a URL that is selected programatically, and I think to deploy this app on our iPads (we have a developer account), but we have the same problem: if the user press home button, he can select Safari and enter to any website.
In conclusion, we need to disable home button to hold the user on our website (I know that if press and hold home button + power button, iPad reboot, but the power button will be disable physically on the stand), and I also know that this app will not be approved by Apple, but as I said before, this app will be only to the fair stand.
Thanks.
Four years after, I found the response.
No, you cannot disable the home button. (And thank Apple for that. Who knows how many people would believe that their app is so fantastic that people ought not stop using it ever.)
Why do you need to disable the home button anyway? Why not build a stand for the iPad that blocks access to the home button?
Could you not use the parental controls to restrict/prevent access to Safari, Mail app's etc?
On iPad,
Settings > General > Restrictions
You can then easily remove app's such as Safari from the ipad's springboard, and to enable access requires a code (which you set) so no one would be able to access default app's that you don't want them to :)
Of course people would still be able to exit your app by pressing the home button, although they would not be able to do anything, and you can even stop them from deleting apps through the restrictions settings.
The only way to prevent exiting via the home button would be to physical stop people from pressing it by having the stand cover it over.
There are companies that make specific products for this type of thing. Here is a write up a couple (they are not cheap)...
http://www.tuaw.com/2010/04/26/ibracket-turns-your-ipad-into-an-ikiosk/
Steven
Probably too late for the OP but for anyone else trying to do this then see my answer here Lock-down iPhone/iPod/iPad so it can only run one app
I had been trying to do the same use case and pretty much everyone on stack overflow is saying it's not possible. Turns out that it is.
More than 4 years after, I found the answer, haha.
I'm not sure since when, but now we can block to use only one app from Settings > General > Accessibility > Guided Access
After that, we can do triple tap with our app opened, and it will be locked.
Also, we can use Apple Configurator to "Lock to App", but this way required to install a profile in the iPads (it wouldn't be a problem four years ago...).
It is possible. But I think Apple may reject your app. I found a link with good explanation here
And this might help also.
http://www.akadia.com/services/ssh_test_certificate.html
http://www.verisign.com/support/verisign-intermediate-ca/code-signing-intermediate/index.html
Blocking home button access is desirable where these units are used commercially as promotional displays or in point of sale environments. It would be useful, actually, if Apple licensed developers of point of sale apps to be able to do this - it would be no problem for this function to be specific to registered ipad units....and it would also make the ipad less of a theft target. it would be useless to anyone but the owner. right now the only answer is to physically cover the button in an enclosure, thus concealing Apple's investment in a beautiful product design.
Achieveable in software like so:
Settings > General > Accessibility > Guided Access
Set a pin if your iOS device has public access.
once in the app you want to lock down, triple click the home button to enable guided access. With this on users will be restricted to your app (or webclip) and required to enter the pin to exit to iOS home if they hit the home button.
There is no solution for this issue, maybe if you jailbreak your device, there is one, but I don't think so.
Please see: Temporarily Lock or Disable iphone home button
Why do you need to block the button? If it's some kind of evil plot to make developers only use the device for developing, the home button IS important: you must test what happens when the real user do that.

How to exit an iPhone app if the terms are rejected?

When the user selects "Reject" on my Terms and Conditions page, I'm able to display an alert, but I can't figure out how to exit from the application completely. Is there a way to do that?
Apple discourages apps from quitting themselves—it gives the user the impression that the app has crashed—and based on the fact that I've never seen an app display terms-and-conditions nonsense when it starts up, I'd guess that that's a surefire way to get your app rejected from the Store in any case. iTunes Connect allows you to provide custom license text when you're submitting the app; I'd recommend just using that.
I just faced this challenge and thanks to #Noah Witherspoon I found how to set a custom license in order to be shown before downloading the app from AppStore. Please refer page 52 of the iTunes Connect Developer Guide in order to see what would happen when you do that.

Is there any way to prevent the user from deleting the installed application?

Is there any way to prevent the user from deleting the installed application? I know the system application can not be deleted. But we can delete all the installed application. But is there any API to capture the application deletion.
You certainly can't prevent any user from deleting your app. To be honest I'm rather glad it's not possible! Imagine the rubbish you'd end up with stuck on your device..
However, if you have physical access to the device and want to prevent your kids from deleting apps, or (I guess) your employees in a business setting you can do the following:
Go to Settings / General / Restrictions
Ensure restrictions are set to ON.
Provide a passcode
Scroll down to 'Deleting Apps' and set it to 'OFF'
You can do the same for installing new apps here, and a bunch of other options.

Can I hide or make my iphone Application unsearchable on the App Store?

I want my application to be unsearchable from the App Store. I would like that only those users who sign in to my web site and then click the link of my iPhone application on app store, can install and use my application.
Is there any way to do that?
To hide your application you have to remove all the App Store countries in iTunes Connect:
Go in Manage your Applications > [Your Application Name] > Rights and Pricing
Click on "Deselect All" App Stores and "Save". The Application will change state to "Developer Removed".
To get it back on the App Store, choose the countries where you want it publish.
PS: it might take more than some hours for changes to be reflected on the App Stores.
Your application will be found when they search for the name of the app or your name. There's no special option in iTunes Connect to hide your app.
While your application will be found when searched for, as long as it's not installed in large numbers, it won't show up in the top 50 lists. Which kind of is the same.
Tip: don't specify any keywords when registering your app, as these will improve the "searchability".
Edit: you might want to implement some kind of authentication in your app, so users who do have installed your app need to register first, before they can actually use it. Relying on your app not being found, isn't very "clean".
I think, without meaningful keywords your app should vanish amongst the 99.999 other apps.
As an alternative you could let everyone (search and) download the app and disable it until the user signed in.
You can also use in-house-distribution with the enterprise program (see here).
Apple sells special developer licenses if you want to control the installation. They are meant for Enterprises to develop and deploy applications for only their use. Here's an article about it:
http://www.infoworld.com/t/platforms/new-iphone-enterprise-developer-program-299-musings-about-iphone-app-licensing-648
Since iTunes Connect has been redesigned a bit, go to My Apps > Select your app > Pricing and Availability > Availability (2nd section) > Select Remove from sale.
The best bet is to use obscure keywords on submission along with an obscure app name.
Not sure if this is going to work, but it may be worth a try:
You can set the release date of the application to the future. This removes the app from the catalog, which is a common way to remove an app temporarily (e.g. when it has problems) until an update appears.
However (this is possibly the catch) I don't know if the app will then be still available for sale via link or if the link will become unusable too.
if i were you i'd implement a "key generator", which will produce a serial that will be used to activate your application. this key generator would be free to access on your site, so whoever downloads your application through your site, would know what to do.
for those who access the application through itunes, i would also place a small text which basically says that you need to visit your site to generate a key. this way, you'd ensure that anyone who has access to your site has access to your app, and whoever finds your app will access your site.
this is i think hack proof by definition as well because noone would bother hacking it, would they? you basically give away your own serial generator for free, so it defeats the whole purpose of hacking. im assuming your concern is site traffic though.