how to stop snapshot in iphone programmatically? - iphone

HI all ,
I need a functionality by which i can restrict user when he is using my app he cann't take the screenshot of the application .as he exit from the app he can take snapshot in normal mode .Is there any thing by whcih we can restrict the user to stop to take the screen shot of the application.
Thanks
Balraj

As far as I know, Apple won't let you use "hardware"-control to stop the user from the phones intended functions.
Taptaptap wanted to use the volume-control button as a shutter to their camera app. But the app got rejected. You can read more on this issue on their blog: Camera+ VolumeSnap: Rejected
Answer on the question:
No, I don't think that is possible.

Related

Executing code of app without opening view for user

I want to execute code on background, when user clicks on app icon? Is it possible? I want to turn bluetooth when I click on app icon on Iphone. Thanks a lot !
As per this answer, there is no way to turn on Bluetooth without Apple rejecting your app. Therefore, the best way to have the user turn on Bluetooth is to tell the user to do so(e.g. through an alert/popup).
As for executing code in the background, check out this answer, which describes how threading works in Swift.

passworded exit from the app

I am developing an iPhone app, that will not be distributed on AppStores. I have tried to search for private api but no luck. When the user tries to quit the app, I want to prompt the user to enter the correct password so as to enable him to exit the app. How can I achieve this? Thanks in advance.
Cheers!!
It sounds like you need something similar to iOS "Kiosk Mode" as described in this answer:
Put an iPhone or iPad into 'Store Demo' mode
Using that description in conjunction with the following steps might achieve precisely what you want:
Have a "Quit" button
Show a password dialogue when it is pressed
If it was correct, read an out of bounds array location (or do whatever) to crash the app
With that config installed you'd get stuck in whatever app you launch next, though.
You can't! You'll have to password protect the launch instead.
If you want to prevent the user from quitting your app, you'll need to physically cover the home button. This isn't a bad solution if your goal is to do something like a kiosk or a point of sale system, where you probably want to mount an iPad in a secure enclosure to prevent tampering or theft anyway. There are quite a few such enclosures on the market in a variety of styles.
For a normal app, though, there's really no solution -- iOS isn't designed for whatever you're trying to do.
The only way I could think to do what you want (which is to prevent access to certain apps) would be to replace the SpringBoard application (this is the method used by Apple itself in the App store models of the iPhone and iPad that restrict the things you can do on the devices). #owenfi pointed at one way to do that without jailbreaking, but in general it is limited: you won't be able to "exit" the app, you will basically just be able to run a single app.

Device auto-lock

I have an application in which I want to lock the iPhone programmatically so that the user can't perform any action.
How can I determine the user is not working with the iPhone for some period, and after that period automatically lock the phone?
Such applications are used in all phone devices, where the user can set an auto-lock time and then the device will automatically lock if the user does not handle the device.
How is it done programmatically? Please give me one example of the code so I can perform this easily.
I am new to iPhone programming, and I am struggling in my application. Help me. Thanks in advance.
(For your lock the iphone device through programatic only )
Impossible.
But , you could prevent your phone from locking when your app is running.
[UIApplication sharedApplication].idleTimerDisabled = YES
There is no way to disable the Home Button in iOS using the documented API. The user will always be able to get back to the home screen or close your application using the Home Button.
Even if you find a way do it (which is very unlikely) your app will be definitely rejected from the App Store for a blatant violation of the iOS Human Interface Guidelines. If I were you I would reconsider implementing this behaviour, frankly, it's just not a good idea.
If you're only looking for blocking the the UI of your app, check out the answers to this question, more specifically, check out the incredibly useful MBProgressHUD library:

How to use the camera device in an iPhone app

I am working on an image editing app and therefore googled for it.
I have found some links which says that we can work with camera by ourselves, like here.
They say we can:
capture images from within our app (ColorSplash app)
using accelerometer with camera and some other features
So far my coding doing just opening camera and lets user do the rest.
But I want above listed features... at least the first one.
Can it be done?
i use code from this site to do what your first task do:
http://www.zimbio.com/iPhone/articles/1109/Picking+Images+iPhone+SDK+UIImagePickerController
http://trailsinthesand.com/picking-images-with-the-iphone-sdk-uiimagepickercontroller/
these both were links really helpful.
#Sawan yes you can do the things u want,capturing of image and its selection please take help from here and also u can use accelerometer in the same way we use in our apps

iPhone - is it possible to "awaken" an app after a certain time?

I was wondering if it was possible to have an "alarm" style app that would run at a certain time? Would the application have to be run and then left open?
I know with multi-tasking on the iPhone 4 a user could open the app and run it in the background. If my original question isn't possible, is it possible to bring an app running in the background back into the foreground after a certain time?
Thank you very much for your help.
Have a look at the new 4.0 feature called Local Notifications. Local and Push Notification Programming Guide
You can use EventKit to put certain alarms. It is however not possible to schedule to launch of your app. You can not bring your app forward like you suggest. You could however send a push notification. The link suggested by Jessedc gives a lot of in-depth information about the use of this.